Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.8.0 #77

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.7.0"
".": "0.8.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 16
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2FTogetherAI-5e0a37829859a7e57d29be0ae29e5a1094a9f5ab1ca47c8ed224b77f74a3ccad.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2FTogetherAI-3950390ec89ef1e5aec351d8e841d511ebc0a3ccec5bbf0d4c73157d1f9d7c1d.yml
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.8.0 (2024-10-30)

Full Changelog: [v0.7.0...v0.8.0](https://github.com/togethercomputer/together-typescript/compare/v0.7.0...v0.8.0)

### Features

* **api:** api update ([#76](https://github.com/togethercomputer/together-typescript/issues/76)) ([26b7743](https://github.com/togethercomputer/together-typescript/commit/26b7743e989cc1239740ac99d03e2ec157da9905))
* **api:** api update ([#79](https://github.com/togethercomputer/together-typescript/issues/79)) ([eb34c86](https://github.com/togethercomputer/together-typescript/commit/eb34c86204618eb7f7bf8f4aed16af97a221dae2))


### Documentation

* **api:** Add back in required readme field ([#78](https://github.com/togethercomputer/together-typescript/issues/78)) ([74b457f](https://github.com/togethercomputer/together-typescript/commit/74b457f6a98046feb0805f3c8471c800fc6fc7b0))

## 0.7.0 (2024-10-23)

Full Changelog: [v0.6.0...v0.7.0](https://github.com/togethercomputer/together-typescript/compare/v0.6.0...v0.7.0)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "together-ai",
"version": "0.7.0",
"version": "0.8.0",
"description": "The official TypeScript library for the Together API",
"author": "Together <[email protected]>",
"types": "dist/index.d.ts",
Expand All @@ -10,7 +10,7 @@
"license": "Apache-2.0",
"packageManager": "[email protected]",
"files": [
"*"
"**/*"
],
"private": false,
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ export interface CompletionCreateParamsBase {

/**
* The name of the model to query.
*
* [See all of Together AI's chat models](https://docs.together.ai/docs/serverless-models#chat-models)
*/
model:
| 'Qwen/Qwen2.5-72B-Instruct-Turbo'
Expand Down
11 changes: 9 additions & 2 deletions src/resources/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,15 @@ export type CompletionCreateParams = CompletionCreateParamsNonStreaming | Comple
export interface CompletionCreateParamsBase {
/**
* The name of the model to query.
*
* [See all of Together AI's chat models](https://docs.together.ai/docs/serverless-models#chat-models)
*/
model: string;
model:
| 'meta-llama/Llama-2-70b-hf'
| 'mistralai/Mistral-7B-v0.1'
| 'mistralai/Mixtral-8x7B-v0.1'
| 'Meta-Llama/Llama-Guard-7b'
| (string & {});

/**
* A string providing context for the model to complete.
Expand Down Expand Up @@ -186,7 +193,7 @@ export interface CompletionCreateParamsBase {
* available moderation models found
* [here](https://docs.together.ai/docs/inference-models#moderation-models).
*/
safety_model?: string;
safety_model?: 'Meta-Llama/Llama-Guard-7b' | (string & {});

/**
* Seed value for reproducibility.
Expand Down
9 changes: 8 additions & 1 deletion src/resources/embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@ export interface EmbeddingCreateParams {

/**
* The name of the embedding model to use.
*
* [See all of Together AI's embedding models](https://docs.together.ai/docs/serverless-models#embedding-models)
*/
model: string;
model:
| 'WhereIsAI/UAE-Large-V1'
| 'BAAI/bge-large-en-v1.5'
| 'BAAI/bge-base-en-v1.5'
| 'togethercomputer/m2-bert-80M-8k-retrieval'
| (string & {});
}

export namespace Embeddings {
Expand Down
9 changes: 8 additions & 1 deletion src/resources/fine-tune.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,14 @@ export interface FineTuneDownloadParams {
ft_id: string;

/**
* Specifies step number for checkpoint to download.
* Specifies checkpoint type to download - `merged` vs `adapter`. This field is
* required if the checkpoint_step is not set.
*/
checkpoint?: 'merged' | 'adapter';

/**
* Specifies step number for checkpoint to download. Ignores `checkpoint` value if
* set.
*/
checkpoint_step?: number;

Expand Down
8 changes: 7 additions & 1 deletion src/resources/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ export namespace ImageFile {
export interface ImageCreateParams {
/**
* The model to use for image generation.
*
* [See all of Together AI's image models](https://docs.together.ai/docs/serverless-models#image-models)
*/
model: string;
model:
| 'black-forest-labs/FLUX.1-schnell-Free'
| 'black-forest-labs/FLUX.1-schnell'
| 'black-forest-labs/FLUX.1.1-pro'
| (string & {});

/**
* A description of the desired images. Maximum length varies by model.
Expand Down
4 changes: 3 additions & 1 deletion src/resources/top-level.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ export interface RerankParams {

/**
* The model to be used for the rerank request.
*
* [See all of Together AI's rerank models](https://docs.together.ai/docs/serverless-models#rerank-models)
*/
model: string;
model: 'Salesforce/Llama-Rank-v1' | (string & {});

/**
* The search query to be used for ranking.
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.7.0'; // x-release-please-version
export const VERSION = '0.8.0'; // x-release-please-version
4 changes: 2 additions & 2 deletions tests/api-resources/embeddings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('resource embeddings', () => {
test('create: only required params', async () => {
const responsePromise = client.embeddings.create({
input: 'Our solar system orbits the Milky Way galaxy at about 515,000 mph',
model: 'togethercomputer/m2-bert-80M-8k-retrieval',
model: 'WhereIsAI/UAE-Large-V1',
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -26,7 +26,7 @@ describe('resource embeddings', () => {
test('create: required and optional params', async () => {
const response = await client.embeddings.create({
input: 'Our solar system orbits the Milky Way galaxy at about 515,000 mph',
model: 'togethercomputer/m2-bert-80M-8k-retrieval',
model: 'WhereIsAI/UAE-Large-V1',
});
});
});
7 changes: 6 additions & 1 deletion tests/api-resources/fine-tune.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ describe('resource fineTune', () => {
});

test('download: required and optional params', async () => {
const response = await client.fineTune.download({ ft_id: 'ft_id', checkpoint_step: 0, output: 'output' });
const response = await client.fineTune.download({
ft_id: 'ft_id',
checkpoint: 'merged',
checkpoint_step: 0,
output: 'output',
});
});

test('listEvents', async () => {
Expand Down