You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference.md
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ await client.checkApiKey();
71
71
<dl>
72
72
<dd>
73
73
74
-
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).
74
+
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).
75
75
76
76
Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.
77
77
@@ -128,6 +128,7 @@ await client.v2.chatStream({
128
128
k: 1.1,
129
129
p: 1.1,
130
130
returnPrompt: true,
131
+
logprobs: true,
131
132
});
132
133
```
133
134
@@ -175,7 +176,7 @@ await client.v2.chatStream({
175
176
<dl>
176
177
<dd>
177
178
178
-
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).
179
+
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).
179
180
180
181
Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.
181
182
@@ -199,6 +200,7 @@ await client.v2.chat({
199
200
{
200
201
role: "tool",
201
202
toolCallId: "messages",
203
+
content: "messages",
202
204
},
203
205
],
204
206
});
@@ -252,7 +254,7 @@ This endpoint returns text embeddings. An embedding is a list of floating point
252
254
253
255
Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
254
256
255
-
If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search).
257
+
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).
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.
1034
+
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.
Copy file name to clipboardExpand all lines: src/Client.ts
+28-28Lines changed: 28 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -63,8 +63,8 @@ export class CohereClient {
63
63
: undefined,
64
64
"X-Fern-Language": "JavaScript",
65
65
"X-Fern-SDK-Name": "cohere-ai",
66
-
"X-Fern-SDK-Version": "7.14.0",
67
-
"User-Agent": "cohere-ai/7.14.0",
66
+
"X-Fern-SDK-Version": "7.13.1",
67
+
"User-Agent": "cohere-ai/7.13.1",
68
68
"X-Fern-Runtime": core.RUNTIME.type,
69
69
"X-Fern-Runtime-Version": core.RUNTIME.version,
70
70
Accepts: accepts!=null ? accepts : undefined,
@@ -241,8 +241,8 @@ export class CohereClient {
241
241
: undefined,
242
242
"X-Fern-Language": "JavaScript",
243
243
"X-Fern-SDK-Name": "cohere-ai",
244
-
"X-Fern-SDK-Version": "7.14.0",
245
-
"User-Agent": "cohere-ai/7.14.0",
244
+
"X-Fern-SDK-Version": "7.13.1",
245
+
"User-Agent": "cohere-ai/7.13.1",
246
246
"X-Fern-Runtime": core.RUNTIME.type,
247
247
"X-Fern-Runtime-Version": core.RUNTIME.version,
248
248
Accepts: accepts!=null ? accepts : undefined,
@@ -360,7 +360,7 @@ export class CohereClient {
360
360
361
361
/**
362
362
* <Warning>
363
-
* 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.
363
+
* 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.
364
364
* </Warning>
365
365
* Generates realistic text conditioned on a given input.
366
366
*/
@@ -382,8 +382,8 @@ export class CohereClient {
382
382
: undefined,
383
383
"X-Fern-Language": "JavaScript",
384
384
"X-Fern-SDK-Name": "cohere-ai",
385
-
"X-Fern-SDK-Version": "7.14.0",
386
-
"User-Agent": "cohere-ai/7.14.0",
385
+
"X-Fern-SDK-Version": "7.13.1",
386
+
"User-Agent": "cohere-ai/7.13.1",
387
387
"X-Fern-Runtime": core.RUNTIME.type,
388
388
"X-Fern-Runtime-Version": core.RUNTIME.version,
389
389
},
@@ -511,7 +511,7 @@ export class CohereClient {
511
511
512
512
/**
513
513
* <Warning>
514
-
* 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.
514
+
* 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.
515
515
* </Warning>
516
516
* Generates realistic text conditioned on a given input.
517
517
*
@@ -553,8 +553,8 @@ export class CohereClient {
553
553
: undefined,
554
554
"X-Fern-Language": "JavaScript",
555
555
"X-Fern-SDK-Name": "cohere-ai",
556
-
"X-Fern-SDK-Version": "7.14.0",
557
-
"User-Agent": "cohere-ai/7.14.0",
556
+
"X-Fern-SDK-Version": "7.13.1",
557
+
"User-Agent": "cohere-ai/7.13.1",
558
558
"X-Fern-Runtime": core.RUNTIME.type,
559
559
"X-Fern-Runtime-Version": core.RUNTIME.version,
560
560
},
@@ -670,11 +670,11 @@ export class CohereClient {
670
670
}
671
671
672
672
/**
673
-
* This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents.
673
+
* 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.
674
674
*
675
-
* Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
675
+
* Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.
676
676
*
677
-
* If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](/docs/semantic-search).
677
+
* 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).
* 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.
1140
+
* 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.
1141
1141
* </Warning>
1142
1142
* Generates a summary in English for a given text.
* 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.
88
+
* 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.
89
89
*
90
90
* When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
* Used to select the [safety instruction](/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
267
+
* Used to select the [safety instruction](https://docs.cohere.com/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
268
268
* When `NONE` is specified, the safety instruction will be omitted.
269
269
*
270
270
* Safety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.
271
271
*
272
-
* **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.
272
+
* **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.
* 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.
160
+
* 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.
161
161
*
162
162
* When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
* Used to select the [safety instruction](/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
339
+
* Used to select the [safety instruction](https://docs.cohere.com/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.
340
340
* When `NONE` is specified, the safety instruction will be omitted.
341
341
*
342
342
* Safety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.
343
343
*
344
-
* **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.
344
+
* **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.
Copy file name to clipboardExpand all lines: src/api/client/requests/EmbedRequest.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ export interface EmbedRequest {
20
20
/**
21
21
* Defaults to embed-english-v2.0
22
22
*
23
-
* 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.
23
+
* 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.
24
24
*
25
25
* Available models and corresponding embedding dimensions:
* The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).
22
-
* 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.
22
+
* 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.
* The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental).
37
-
* 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.
37
+
* 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.
0 commit comments