Skip to content

Commit

Permalink
SDK regeneration (#209)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored Nov 20, 2024
1 parent d08363f commit c430bc8
Show file tree
Hide file tree
Showing 52 changed files with 1,194 additions and 1,070 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{
"name": "cohere-ai",
"version": "7.14.0",
"version": "7.13.1",
"private": false,
"repository": "https://github.com/cohere-ai/cohere-typescript",
"main": "./index.js",
"types": "./index.d.ts",
"bin": "./src/test/cloud-tests/script.ts",
"scripts": {
"format": "prettier . --write --ignore-unknown",
"build": "tsc",
"prepack": "cp -rv dist/. .",
"test": "jest",
"cloud-tests": "npx ts-node src/test/cloud-tests/script.ts"
"test": "jest"
},
"dependencies": {
"url-join": "4.0.1",
Expand Down
10 changes: 6 additions & 4 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ await client.checkApiKey();
<dl>
<dd>

Generates a message from the model in response to a provided conversation. To learn more about the features of the Chat API follow our [Text Generation guides](https://docs.cohere.com/v2/docs/chat-api).
Generates a text response to a user message and streams it down, token by token. To learn how to use the Chat API with streaming follow our [Text Generation guides](https://docs.cohere.com/v2/docs/chat-api).

Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.

Expand Down Expand Up @@ -128,6 +128,7 @@ await client.v2.chatStream({
k: 1.1,
p: 1.1,
returnPrompt: true,
logprobs: true,
});
```

Expand Down Expand Up @@ -175,7 +176,7 @@ await client.v2.chatStream({
<dl>
<dd>

Generates a message from the model in response to a provided conversation. To learn more about the features of the Chat API follow our [Text Generation guides](https://docs.cohere.com/v2/docs/chat-api).
Generates a text response to a user message and streams it down, token by token. To learn how to use the Chat API with streaming follow our [Text Generation guides](https://docs.cohere.com/v2/docs/chat-api).

Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.

Expand All @@ -199,6 +200,7 @@ await client.v2.chat({
{
role: "tool",
toolCallId: "messages",
content: "messages",
},
],
});
Expand Down Expand Up @@ -252,7 +254,7 @@ This endpoint returns text embeddings. An embedding is a list of floating point

Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.

If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search).
If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](https://docs.cohere.com/docs/semantic-search).

</dd>
</dl>
Expand Down Expand Up @@ -1029,7 +1031,7 @@ await client.connectors.list();
<dl>
<dd>

Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/docs/creating-and-deploying-a-connector) for more information.
Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) for more information.

</dd>
</dl>
Expand Down
56 changes: 28 additions & 28 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Accepts: accepts != null ? accepts : undefined,
Expand Down Expand Up @@ -241,8 +241,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Accepts: accepts != null ? accepts : undefined,
Expand Down Expand Up @@ -360,7 +360,7 @@ export class CohereClient {

/**
* <Warning>
* This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* </Warning>
* Generates realistic text conditioned on a given input.
*/
Expand All @@ -382,8 +382,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -511,7 +511,7 @@ export class CohereClient {

/**
* <Warning>
* This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* </Warning>
* Generates realistic text conditioned on a given input.
*
Expand Down Expand Up @@ -553,8 +553,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -670,11 +670,11 @@ export class CohereClient {
}

/**
* This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
* This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents.
*
* Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
* Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
*
* If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search).
* If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](https://docs.cohere.com/docs/semantic-search).
*
* @param {Cohere.EmbedRequest} request
* @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
Expand Down Expand Up @@ -712,8 +712,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -867,8 +867,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1022,8 +1022,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1137,7 +1137,7 @@ export class CohereClient {

/**
* <Warning>
* This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API.
* </Warning>
* Generates a summary in English for a given text.
*
Expand Down Expand Up @@ -1179,8 +1179,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1334,8 +1334,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1489,8 +1489,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1637,8 +1637,8 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.14.0",
"User-Agent": "cohere-ai/7.14.0",
"X-Fern-SDK-Version": "7.13.1",
"User-Agent": "cohere-ai/7.13.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
6 changes: 3 additions & 3 deletions src/api/client/requests/ChatRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export interface ChatRequest {
*/
promptTruncation?: Cohere.ChatRequestPromptTruncation;
/**
* Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one.
* Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one.
*
* When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
*
Expand Down Expand Up @@ -264,12 +264,12 @@ export interface ChatRequest {
forceSingleStep?: boolean;
responseFormat?: Cohere.ResponseFormat;
/**
* Used to select the [safety instruction](/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
* Used to select the [safety instruction](https://docs.cohere.com/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
* When `NONE` is specified, the safety instruction will be omitted.
*
* Safety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.
*
* **Note**: This parameter is only compatible with models [Command R 08-2024](/docs/command-r#august-2024-release), [Command R+ 08-2024](/docs/command-r-plus#august-2024-release) and newer.
* **Note**: This parameter is only compatible with models [Command R 08-2024](https://docs.cohere.com/docs/command-r#august-2024-release), [Command R+ 08-2024](https://docs.cohere.com/docs/command-r-plus#august-2024-release) and newer.
*
* Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
*
Expand Down
6 changes: 3 additions & 3 deletions src/api/client/requests/ChatStreamRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export interface ChatStreamRequest {
*/
promptTruncation?: Cohere.ChatStreamRequestPromptTruncation;
/**
* Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/docs/creating-and-deploying-a-connector) one.
* Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one.
*
* When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
*
Expand Down Expand Up @@ -336,12 +336,12 @@ export interface ChatStreamRequest {
forceSingleStep?: boolean;
responseFormat?: Cohere.ResponseFormat;
/**
* Used to select the [safety instruction](/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
* Used to select the [safety instruction](https://docs.cohere.com/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
* When `NONE` is specified, the safety instruction will be omitted.
*
* Safety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.
*
* **Note**: This parameter is only compatible with models [Command R 08-2024](/docs/command-r#august-2024-release), [Command R+ 08-2024](/docs/command-r-plus#august-2024-release) and newer.
* **Note**: This parameter is only compatible with models [Command R 08-2024](https://docs.cohere.com/docs/command-r#august-2024-release), [Command R+ 08-2024](https://docs.cohere.com/docs/command-r-plus#august-2024-release) and newer.
*
* Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
*
Expand Down
2 changes: 1 addition & 1 deletion src/api/client/requests/EmbedRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface EmbedRequest {
/**
* Defaults to embed-english-v2.0
*
* The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID.
* The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-custom-models) can also be supplied with their full ID.
*
* Available models and corresponding embedding dimensions:
*
Expand Down
2 changes: 1 addition & 1 deletion src/api/client/requests/GenerateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface GenerateRequest {
prompt: string;
/**
* The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).
* Smaller, "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID.
* Smaller, "light" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-custom-models) can also be supplied with their full ID.
*/
model?: string;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/api/client/requests/GenerateStreamRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface GenerateStreamRequest {
prompt: string;
/**
* The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).
* Smaller, "light" models are faster, while larger models will perform better. [Custom models](/docs/training-custom-models) can also be supplied with their full ID.
* Smaller, "light" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-custom-models) can also be supplied with their full ID.
*/
model?: string;
/**
Expand Down
Loading

0 comments on commit c430bc8

Please sign in to comment.