Skip to content

Commit c430bc8

Browse files
SDK regeneration (#209)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent d08363f commit c430bc8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1194
-1070
lines changed

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
22
"name": "cohere-ai",
3-
"version": "7.14.0",
3+
"version": "7.13.1",
44
"private": false,
55
"repository": "https://github.com/cohere-ai/cohere-typescript",
66
"main": "./index.js",
77
"types": "./index.d.ts",
8-
"bin": "./src/test/cloud-tests/script.ts",
98
"scripts": {
109
"format": "prettier . --write --ignore-unknown",
1110
"build": "tsc",
1211
"prepack": "cp -rv dist/. .",
13-
"test": "jest",
14-
"cloud-tests": "npx ts-node src/test/cloud-tests/script.ts"
12+
"test": "jest"
1513
},
1614
"dependencies": {
1715
"url-join": "4.0.1",

reference.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ await client.checkApiKey();
7171
<dl>
7272
<dd>
7373

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).
7575

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

@@ -128,6 +128,7 @@ await client.v2.chatStream({
128128
k: 1.1,
129129
p: 1.1,
130130
returnPrompt: true,
131+
logprobs: true,
131132
});
132133
```
133134

@@ -175,7 +176,7 @@ await client.v2.chatStream({
175176
<dl>
176177
<dd>
177178

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).
179180

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

@@ -199,6 +200,7 @@ await client.v2.chat({
199200
{
200201
role: "tool",
201202
toolCallId: "messages",
203+
content: "messages",
202204
},
203205
],
204206
});
@@ -252,7 +254,7 @@ This endpoint returns text embeddings. An embedding is a list of floating point
252254

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

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).
256258

257259
</dd>
258260
</dl>
@@ -1029,7 +1031,7 @@ await client.connectors.list();
10291031
<dl>
10301032
<dd>
10311033

1032-
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.
10331035

10341036
</dd>
10351037
</dl>

src/Client.ts

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export class CohereClient {
6363
: undefined,
6464
"X-Fern-Language": "JavaScript",
6565
"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",
6868
"X-Fern-Runtime": core.RUNTIME.type,
6969
"X-Fern-Runtime-Version": core.RUNTIME.version,
7070
Accepts: accepts != null ? accepts : undefined,
@@ -241,8 +241,8 @@ export class CohereClient {
241241
: undefined,
242242
"X-Fern-Language": "JavaScript",
243243
"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",
246246
"X-Fern-Runtime": core.RUNTIME.type,
247247
"X-Fern-Runtime-Version": core.RUNTIME.version,
248248
Accepts: accepts != null ? accepts : undefined,
@@ -360,7 +360,7 @@ export class CohereClient {
360360

361361
/**
362362
* <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.
364364
* </Warning>
365365
* Generates realistic text conditioned on a given input.
366366
*/
@@ -382,8 +382,8 @@ export class CohereClient {
382382
: undefined,
383383
"X-Fern-Language": "JavaScript",
384384
"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",
387387
"X-Fern-Runtime": core.RUNTIME.type,
388388
"X-Fern-Runtime-Version": core.RUNTIME.version,
389389
},
@@ -511,7 +511,7 @@ export class CohereClient {
511511

512512
/**
513513
* <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.
515515
* </Warning>
516516
* Generates realistic text conditioned on a given input.
517517
*
@@ -553,8 +553,8 @@ export class CohereClient {
553553
: undefined,
554554
"X-Fern-Language": "JavaScript",
555555
"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",
558558
"X-Fern-Runtime": core.RUNTIME.type,
559559
"X-Fern-Runtime-Version": core.RUNTIME.version,
560560
},
@@ -670,11 +670,11 @@ export class CohereClient {
670670
}
671671

672672
/**
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.
674674
*
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.
676676
*
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).
678678
*
679679
* @param {Cohere.EmbedRequest} request
680680
* @param {CohereClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -712,8 +712,8 @@ export class CohereClient {
712712
: undefined,
713713
"X-Fern-Language": "JavaScript",
714714
"X-Fern-SDK-Name": "cohere-ai",
715-
"X-Fern-SDK-Version": "7.14.0",
716-
"User-Agent": "cohere-ai/7.14.0",
715+
"X-Fern-SDK-Version": "7.13.1",
716+
"User-Agent": "cohere-ai/7.13.1",
717717
"X-Fern-Runtime": core.RUNTIME.type,
718718
"X-Fern-Runtime-Version": core.RUNTIME.version,
719719
},
@@ -867,8 +867,8 @@ export class CohereClient {
867867
: undefined,
868868
"X-Fern-Language": "JavaScript",
869869
"X-Fern-SDK-Name": "cohere-ai",
870-
"X-Fern-SDK-Version": "7.14.0",
871-
"User-Agent": "cohere-ai/7.14.0",
870+
"X-Fern-SDK-Version": "7.13.1",
871+
"User-Agent": "cohere-ai/7.13.1",
872872
"X-Fern-Runtime": core.RUNTIME.type,
873873
"X-Fern-Runtime-Version": core.RUNTIME.version,
874874
},
@@ -1022,8 +1022,8 @@ export class CohereClient {
10221022
: undefined,
10231023
"X-Fern-Language": "JavaScript",
10241024
"X-Fern-SDK-Name": "cohere-ai",
1025-
"X-Fern-SDK-Version": "7.14.0",
1026-
"User-Agent": "cohere-ai/7.14.0",
1025+
"X-Fern-SDK-Version": "7.13.1",
1026+
"User-Agent": "cohere-ai/7.13.1",
10271027
"X-Fern-Runtime": core.RUNTIME.type,
10281028
"X-Fern-Runtime-Version": core.RUNTIME.version,
10291029
},
@@ -1137,7 +1137,7 @@ export class CohereClient {
11371137

11381138
/**
11391139
* <Warning>
1140-
* 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.
11411141
* </Warning>
11421142
* Generates a summary in English for a given text.
11431143
*
@@ -1179,8 +1179,8 @@ export class CohereClient {
11791179
: undefined,
11801180
"X-Fern-Language": "JavaScript",
11811181
"X-Fern-SDK-Name": "cohere-ai",
1182-
"X-Fern-SDK-Version": "7.14.0",
1183-
"User-Agent": "cohere-ai/7.14.0",
1182+
"X-Fern-SDK-Version": "7.13.1",
1183+
"User-Agent": "cohere-ai/7.13.1",
11841184
"X-Fern-Runtime": core.RUNTIME.type,
11851185
"X-Fern-Runtime-Version": core.RUNTIME.version,
11861186
},
@@ -1334,8 +1334,8 @@ export class CohereClient {
13341334
: undefined,
13351335
"X-Fern-Language": "JavaScript",
13361336
"X-Fern-SDK-Name": "cohere-ai",
1337-
"X-Fern-SDK-Version": "7.14.0",
1338-
"User-Agent": "cohere-ai/7.14.0",
1337+
"X-Fern-SDK-Version": "7.13.1",
1338+
"User-Agent": "cohere-ai/7.13.1",
13391339
"X-Fern-Runtime": core.RUNTIME.type,
13401340
"X-Fern-Runtime-Version": core.RUNTIME.version,
13411341
},
@@ -1489,8 +1489,8 @@ export class CohereClient {
14891489
: undefined,
14901490
"X-Fern-Language": "JavaScript",
14911491
"X-Fern-SDK-Name": "cohere-ai",
1492-
"X-Fern-SDK-Version": "7.14.0",
1493-
"User-Agent": "cohere-ai/7.14.0",
1492+
"X-Fern-SDK-Version": "7.13.1",
1493+
"User-Agent": "cohere-ai/7.13.1",
14941494
"X-Fern-Runtime": core.RUNTIME.type,
14951495
"X-Fern-Runtime-Version": core.RUNTIME.version,
14961496
},
@@ -1637,8 +1637,8 @@ export class CohereClient {
16371637
: undefined,
16381638
"X-Fern-Language": "JavaScript",
16391639
"X-Fern-SDK-Name": "cohere-ai",
1640-
"X-Fern-SDK-Version": "7.14.0",
1641-
"User-Agent": "cohere-ai/7.14.0",
1640+
"X-Fern-SDK-Version": "7.13.1",
1641+
"User-Agent": "cohere-ai/7.13.1",
16421642
"X-Fern-Runtime": core.RUNTIME.type,
16431643
"X-Fern-Runtime-Version": core.RUNTIME.version,
16441644
},

src/api/client/requests/ChatRequest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export interface ChatRequest {
8585
*/
8686
promptTruncation?: Cohere.ChatRequestPromptTruncation;
8787
/**
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/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.
8989
*
9090
* When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
9191
*
@@ -264,12 +264,12 @@ export interface ChatRequest {
264264
forceSingleStep?: boolean;
265265
responseFormat?: Cohere.ResponseFormat;
266266
/**
267-
* 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`.
268268
* When `NONE` is specified, the safety instruction will be omitted.
269269
*
270270
* Safety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.
271271
*
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.
273273
*
274274
* Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
275275
*

src/api/client/requests/ChatStreamRequest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export interface ChatStreamRequest {
157157
*/
158158
promptTruncation?: Cohere.ChatStreamRequestPromptTruncation;
159159
/**
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/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.
161161
*
162162
* When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).
163163
*
@@ -336,12 +336,12 @@ export interface ChatStreamRequest {
336336
forceSingleStep?: boolean;
337337
responseFormat?: Cohere.ResponseFormat;
338338
/**
339-
* 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`.
340340
* When `NONE` is specified, the safety instruction will be omitted.
341341
*
342342
* Safety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.
343343
*
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.
345345
*
346346
* Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments
347347
*

src/api/client/requests/EmbedRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface EmbedRequest {
2020
/**
2121
* Defaults to embed-english-v2.0
2222
*
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.
2424
*
2525
* Available models and corresponding embedding dimensions:
2626
*

src/api/client/requests/GenerateRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface GenerateRequest {
1919
prompt: string;
2020
/**
2121
* 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.
2323
*/
2424
model?: string;
2525
/**

src/api/client/requests/GenerateStreamRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface GenerateStreamRequest {
3434
prompt: string;
3535
/**
3636
* 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.
3838
*/
3939
model?: string;
4040
/**

0 commit comments

Comments
 (0)