Skip to content

Commit c67a61b

Browse files
🌿 Fern Regeneration -- June 10, 2024 (#173)
* SDK regeneration * utils * chore: Update .fernignore and add aws-utils.ts * Restore --------- Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Billy Trend <billy@cohere.com>
1 parent beae7d9 commit c67a61b

36 files changed

+974
-961
lines changed

.fernignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ LICENSE
1010
src/BedrockClient.ts
1111
src/AwsClient.ts
1212
src/SagemakerClient.ts
13-
src/index.ts
13+
src/index.ts
14+
src/aws-utils.ts
15+
./src/core/streaming-fetcher/streaming-utils.ts

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cohere-ai",
3-
"version": "7.10.2",
3+
"version": "7.10.3",
44
"private": false,
55
"repository": "https://github.com/cohere-ai/cohere-typescript",
66
"main": "./index.js",
@@ -12,30 +12,31 @@
1212
"test": "jest"
1313
},
1414
"dependencies": {
15-
"@aws-sdk/client-sagemaker": "^3.583.0",
16-
"@aws-sdk/credential-providers": "^3.583.0",
17-
"@aws-sdk/protocol-http": "^3.374.0",
18-
"@aws-sdk/signature-v4": "^3.374.0",
15+
"url-join": "4.0.1",
1916
"form-data": "4.0.0",
20-
"form-data-encoder": "^4.0.2",
2117
"formdata-node": "^6.0.3",
22-
"js-base64": "3.7.2",
2318
"node-fetch": "2.7.0",
2419
"qs": "6.11.2",
20+
"js-base64": "3.7.2",
21+
"form-data-encoder": "^4.0.2",
2522
"readable-stream": "^4.5.2",
26-
"url-join": "4.0.1"
23+
"web-streams-polyfill": "^4.0.0",
24+
"@aws-sdk/client-sagemaker": "^3.583.0",
25+
"@aws-sdk/credential-providers": "^3.583.0",
26+
"@aws-sdk/protocol-http": "^3.374.0",
27+
"@aws-sdk/signature-v4": "^3.374.0"
2728
},
2829
"devDependencies": {
29-
"@types/jest": "29.5.5",
30-
"@types/node": "17.0.33",
31-
"@types/node-fetch": "2.6.9",
32-
"@types/qs": "6.9.8",
33-
"@types/readable-stream": "^4.0.14",
3430
"@types/url-join": "4.0.1",
31+
"@types/qs": "6.9.8",
32+
"@types/node-fetch": "2.6.9",
3533
"jest": "^29.7.0",
34+
"@types/jest": "29.5.5",
35+
"ts-jest": "^29.1.2",
3636
"jest-environment-jsdom": "29.7.0",
37+
"@types/node": "17.0.33",
3738
"prettier": "2.7.1",
38-
"ts-jest": "^29.1.2",
39-
"typescript": "4.6.4"
39+
"typescript": "4.6.4",
40+
"@types/readable-stream": "^4.0.14"
4041
}
4142
}

src/Client.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class CohereClient {
5555
: undefined,
5656
"X-Fern-Language": "JavaScript",
5757
"X-Fern-SDK-Name": "cohere-ai",
58-
"X-Fern-SDK-Version": "7.10.2",
58+
"X-Fern-SDK-Version": "7.10.3",
5959
"X-Fern-Runtime": core.RUNTIME.type,
6060
"X-Fern-Runtime-Version": core.RUNTIME.version,
6161
},
@@ -163,7 +163,7 @@ export class CohereClient {
163163
: undefined,
164164
"X-Fern-Language": "JavaScript",
165165
"X-Fern-SDK-Name": "cohere-ai",
166-
"X-Fern-SDK-Version": "7.10.2",
166+
"X-Fern-SDK-Version": "7.10.3",
167167
"X-Fern-Runtime": core.RUNTIME.type,
168168
"X-Fern-Runtime-Version": core.RUNTIME.version,
169169
},
@@ -250,7 +250,7 @@ export class CohereClient {
250250
: undefined,
251251
"X-Fern-Language": "JavaScript",
252252
"X-Fern-SDK-Name": "cohere-ai",
253-
"X-Fern-SDK-Version": "7.10.2",
253+
"X-Fern-SDK-Version": "7.10.3",
254254
"X-Fern-Runtime": core.RUNTIME.type,
255255
"X-Fern-Runtime-Version": core.RUNTIME.version,
256256
},
@@ -365,7 +365,7 @@ export class CohereClient {
365365
: undefined,
366366
"X-Fern-Language": "JavaScript",
367367
"X-Fern-SDK-Name": "cohere-ai",
368-
"X-Fern-SDK-Version": "7.10.2",
368+
"X-Fern-SDK-Version": "7.10.3",
369369
"X-Fern-Runtime": core.RUNTIME.type,
370370
"X-Fern-Runtime-Version": core.RUNTIME.version,
371371
},
@@ -472,7 +472,7 @@ export class CohereClient {
472472
: undefined,
473473
"X-Fern-Language": "JavaScript",
474474
"X-Fern-SDK-Name": "cohere-ai",
475-
"X-Fern-SDK-Version": "7.10.2",
475+
"X-Fern-SDK-Version": "7.10.3",
476476
"X-Fern-Runtime": core.RUNTIME.type,
477477
"X-Fern-Runtime-Version": core.RUNTIME.version,
478478
},
@@ -568,7 +568,7 @@ export class CohereClient {
568568
: undefined,
569569
"X-Fern-Language": "JavaScript",
570570
"X-Fern-SDK-Name": "cohere-ai",
571-
"X-Fern-SDK-Version": "7.10.2",
571+
"X-Fern-SDK-Version": "7.10.3",
572572
"X-Fern-Runtime": core.RUNTIME.type,
573573
"X-Fern-Runtime-Version": core.RUNTIME.version,
574574
},
@@ -692,7 +692,7 @@ export class CohereClient {
692692
: undefined,
693693
"X-Fern-Language": "JavaScript",
694694
"X-Fern-SDK-Name": "cohere-ai",
695-
"X-Fern-SDK-Version": "7.10.2",
695+
"X-Fern-SDK-Version": "7.10.3",
696696
"X-Fern-Runtime": core.RUNTIME.type,
697697
"X-Fern-Runtime-Version": core.RUNTIME.version,
698698
},
@@ -790,7 +790,7 @@ export class CohereClient {
790790
: undefined,
791791
"X-Fern-Language": "JavaScript",
792792
"X-Fern-SDK-Name": "cohere-ai",
793-
"X-Fern-SDK-Version": "7.10.2",
793+
"X-Fern-SDK-Version": "7.10.3",
794794
"X-Fern-Runtime": core.RUNTIME.type,
795795
"X-Fern-Runtime-Version": core.RUNTIME.version,
796796
},
@@ -883,7 +883,7 @@ export class CohereClient {
883883
: undefined,
884884
"X-Fern-Language": "JavaScript",
885885
"X-Fern-SDK-Name": "cohere-ai",
886-
"X-Fern-SDK-Version": "7.10.2",
886+
"X-Fern-SDK-Version": "7.10.3",
887887
"X-Fern-Runtime": core.RUNTIME.type,
888888
"X-Fern-Runtime-Version": core.RUNTIME.version,
889889
},
@@ -978,7 +978,7 @@ export class CohereClient {
978978
: undefined,
979979
"X-Fern-Language": "JavaScript",
980980
"X-Fern-SDK-Name": "cohere-ai",
981-
"X-Fern-SDK-Version": "7.10.2",
981+
"X-Fern-SDK-Version": "7.10.3",
982982
"X-Fern-Runtime": core.RUNTIME.type,
983983
"X-Fern-Runtime-Version": core.RUNTIME.version,
984984
},
@@ -1062,7 +1062,7 @@ export class CohereClient {
10621062
: undefined,
10631063
"X-Fern-Language": "JavaScript",
10641064
"X-Fern-SDK-Name": "cohere-ai",
1065-
"X-Fern-SDK-Version": "7.10.2",
1065+
"X-Fern-SDK-Version": "7.10.3",
10661066
"X-Fern-Runtime": core.RUNTIME.type,
10671067
"X-Fern-Runtime-Version": core.RUNTIME.version,
10681068
},

src/api/client/requests/ChatRequest.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,4 @@ export interface ChatRequest {
228228
toolResults?: Cohere.ToolResult[];
229229
/** Forces the chat to be single step. Defaults to `false`. */
230230
forceSingleStep?: boolean;
231-
/** (not public yet) Guidance parameters for the generation, forcing the model to output json. */
232-
responseFormat?: Cohere.ChatRequestResponseFormat;
233231
}

src/api/client/requests/ChatStreamRequest.ts

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,10 @@ import * as Cohere from "../../index";
4747
* maxInputTokens: 1,
4848
* k: 1,
4949
* p: 1.1,
50-
* seed: 1.1,
50+
* seed: 1,
5151
* stopSequences: ["string"],
5252
* connectorsSearchOptions: {
53-
* model: {
54-
* "key": "value"
55-
* },
56-
* temperature: {
57-
* "key": "value"
58-
* },
59-
* maxTokens: {
60-
* "key": "value"
61-
* },
62-
* preamble: {
63-
* "key": "value"
64-
* },
65-
* seed: 1.1
53+
* seed: 1
6654
* },
6755
* frequencyPenalty: 1.1,
6856
* presencePenalty: 1.1,
@@ -94,11 +82,7 @@ import * as Cohere from "../../index";
9482
* }
9583
* }]
9684
* }],
97-
* forceSingleStep: true,
98-
* responseFormat: {
99-
* type: "json_object",
100-
* schema: "string"
101-
* }
85+
* forceSingleStep: true
10286
* }
10387
*/
10488
export interface ChatStreamRequest {
@@ -316,6 +300,4 @@ export interface ChatStreamRequest {
316300
toolResults?: Cohere.ToolResult[];
317301
/** Forces the chat to be single step. Defaults to `false`. */
318302
forceSingleStep?: boolean;
319-
/** (not public yet) Guidance parameters for the generation, forcing the model to output json. */
320-
responseFormat?: Cohere.ChatStreamRequestResponseFormat;
321303
}

src/api/client/requests/GenerateRequest.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@ export interface GenerateRequest {
5151
*
5252
*/
5353
temperature?: number;
54-
/** If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinsim cannot be totally guaranteed. */
54+
/**
55+
* If specified, the backend will make a best effort to sample tokens
56+
* deterministically, such that repeated requests with the same
57+
* seed and parameters should return the same result. However,
58+
* determinism cannot be totally guaranteed.
59+
* Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker, Private Deployments
60+
*
61+
*/
5562
seed?: number;
5663
/**
5764
* Identifier of a custom preset. A preset is a combination of parameters, such as prompt, temperature etc. You can create presets in the [playground](https://dashboard.cohere.com/playground/generate).

src/api/client/requests/GenerateStreamRequest.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import * as Cohere from "../../index";
1414
* maxTokens: 1,
1515
* truncate: Cohere.GenerateStreamRequestTruncate.None,
1616
* temperature: 1.1,
17-
* seed: 1.1,
17+
* seed: 1,
1818
* preset: "string",
1919
* endSequences: ["string"],
2020
* stopSequences: ["string"],
@@ -66,7 +66,14 @@ export interface GenerateStreamRequest {
6666
*
6767
*/
6868
temperature?: number;
69-
/** If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinsim cannot be totally guaranteed. */
69+
/**
70+
* If specified, the backend will make a best effort to sample tokens
71+
* deterministically, such that repeated requests with the same
72+
* seed and parameters should return the same result. However,
73+
* determinism cannot be totally guaranteed.
74+
* Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker, Private Deployments
75+
*
76+
*/
7077
seed?: number;
7178
/**
7279
* Identifier of a custom preset. A preset is a combination of parameters, such as prompt, temperature etc. You can create presets in the [playground](https://dashboard.cohere.com/playground/generate).

src/api/resources/connectors/client/Client.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class Connectors {
6868
: undefined,
6969
"X-Fern-Language": "JavaScript",
7070
"X-Fern-SDK-Name": "cohere-ai",
71-
"X-Fern-SDK-Version": "7.10.2",
71+
"X-Fern-SDK-Version": "7.10.3",
7272
"X-Fern-Runtime": core.RUNTIME.type,
7373
"X-Fern-Runtime-Version": core.RUNTIME.version,
7474
},
@@ -162,7 +162,7 @@ export class Connectors {
162162
: undefined,
163163
"X-Fern-Language": "JavaScript",
164164
"X-Fern-SDK-Name": "cohere-ai",
165-
"X-Fern-SDK-Version": "7.10.2",
165+
"X-Fern-SDK-Version": "7.10.3",
166166
"X-Fern-Runtime": core.RUNTIME.type,
167167
"X-Fern-Runtime-Version": core.RUNTIME.version,
168168
},
@@ -256,7 +256,7 @@ export class Connectors {
256256
: undefined,
257257
"X-Fern-Language": "JavaScript",
258258
"X-Fern-SDK-Name": "cohere-ai",
259-
"X-Fern-SDK-Version": "7.10.2",
259+
"X-Fern-SDK-Version": "7.10.3",
260260
"X-Fern-Runtime": core.RUNTIME.type,
261261
"X-Fern-Runtime-Version": core.RUNTIME.version,
262262
},
@@ -349,7 +349,7 @@ export class Connectors {
349349
: undefined,
350350
"X-Fern-Language": "JavaScript",
351351
"X-Fern-SDK-Name": "cohere-ai",
352-
"X-Fern-SDK-Version": "7.10.2",
352+
"X-Fern-SDK-Version": "7.10.3",
353353
"X-Fern-Runtime": core.RUNTIME.type,
354354
"X-Fern-Runtime-Version": core.RUNTIME.version,
355355
},
@@ -446,7 +446,7 @@ export class Connectors {
446446
: undefined,
447447
"X-Fern-Language": "JavaScript",
448448
"X-Fern-SDK-Name": "cohere-ai",
449-
"X-Fern-SDK-Version": "7.10.2",
449+
"X-Fern-SDK-Version": "7.10.3",
450450
"X-Fern-Runtime": core.RUNTIME.type,
451451
"X-Fern-Runtime-Version": core.RUNTIME.version,
452452
},
@@ -553,7 +553,7 @@ export class Connectors {
553553
: undefined,
554554
"X-Fern-Language": "JavaScript",
555555
"X-Fern-SDK-Name": "cohere-ai",
556-
"X-Fern-SDK-Version": "7.10.2",
556+
"X-Fern-SDK-Version": "7.10.3",
557557
"X-Fern-Runtime": core.RUNTIME.type,
558558
"X-Fern-Runtime-Version": core.RUNTIME.version,
559559
},

src/api/resources/datasets/client/Client.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class Datasets {
8383
: undefined,
8484
"X-Fern-Language": "JavaScript",
8585
"X-Fern-SDK-Name": "cohere-ai",
86-
"X-Fern-SDK-Version": "7.10.2",
86+
"X-Fern-SDK-Version": "7.10.3",
8787
"X-Fern-Runtime": core.RUNTIME.type,
8888
"X-Fern-Runtime-Version": core.RUNTIME.version,
8989
},
@@ -220,7 +220,7 @@ export class Datasets {
220220
: undefined,
221221
"X-Fern-Language": "JavaScript",
222222
"X-Fern-SDK-Name": "cohere-ai",
223-
"X-Fern-SDK-Version": "7.10.2",
223+
"X-Fern-SDK-Version": "7.10.3",
224224
"X-Fern-Runtime": core.RUNTIME.type,
225225
"X-Fern-Runtime-Version": core.RUNTIME.version,
226226
...(await _maybeEncodedRequest.getHeaders()),
@@ -301,7 +301,7 @@ export class Datasets {
301301
: undefined,
302302
"X-Fern-Language": "JavaScript",
303303
"X-Fern-SDK-Name": "cohere-ai",
304-
"X-Fern-SDK-Version": "7.10.2",
304+
"X-Fern-SDK-Version": "7.10.3",
305305
"X-Fern-Runtime": core.RUNTIME.type,
306306
"X-Fern-Runtime-Version": core.RUNTIME.version,
307307
},
@@ -381,7 +381,7 @@ export class Datasets {
381381
: undefined,
382382
"X-Fern-Language": "JavaScript",
383383
"X-Fern-SDK-Name": "cohere-ai",
384-
"X-Fern-SDK-Version": "7.10.2",
384+
"X-Fern-SDK-Version": "7.10.3",
385385
"X-Fern-Runtime": core.RUNTIME.type,
386386
"X-Fern-Runtime-Version": core.RUNTIME.version,
387387
},
@@ -461,7 +461,7 @@ export class Datasets {
461461
: undefined,
462462
"X-Fern-Language": "JavaScript",
463463
"X-Fern-SDK-Name": "cohere-ai",
464-
"X-Fern-SDK-Version": "7.10.2",
464+
"X-Fern-SDK-Version": "7.10.3",
465465
"X-Fern-Runtime": core.RUNTIME.type,
466466
"X-Fern-Runtime-Version": core.RUNTIME.version,
467467
},

src/api/resources/embedJobs/client/Client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class EmbedJobs {
5454
: undefined,
5555
"X-Fern-Language": "JavaScript",
5656
"X-Fern-SDK-Name": "cohere-ai",
57-
"X-Fern-SDK-Version": "7.10.2",
57+
"X-Fern-SDK-Version": "7.10.3",
5858
"X-Fern-Runtime": core.RUNTIME.type,
5959
"X-Fern-Runtime-Version": core.RUNTIME.version,
6060
},
@@ -147,7 +147,7 @@ export class EmbedJobs {
147147
: undefined,
148148
"X-Fern-Language": "JavaScript",
149149
"X-Fern-SDK-Name": "cohere-ai",
150-
"X-Fern-SDK-Version": "7.10.2",
150+
"X-Fern-SDK-Version": "7.10.3",
151151
"X-Fern-Runtime": core.RUNTIME.type,
152152
"X-Fern-Runtime-Version": core.RUNTIME.version,
153153
},
@@ -239,7 +239,7 @@ export class EmbedJobs {
239239
: undefined,
240240
"X-Fern-Language": "JavaScript",
241241
"X-Fern-SDK-Name": "cohere-ai",
242-
"X-Fern-SDK-Version": "7.10.2",
242+
"X-Fern-SDK-Version": "7.10.3",
243243
"X-Fern-Runtime": core.RUNTIME.type,
244244
"X-Fern-Runtime-Version": core.RUNTIME.version,
245245
},
@@ -328,7 +328,7 @@ export class EmbedJobs {
328328
: undefined,
329329
"X-Fern-Language": "JavaScript",
330330
"X-Fern-SDK-Name": "cohere-ai",
331-
"X-Fern-SDK-Version": "7.10.2",
331+
"X-Fern-SDK-Version": "7.10.3",
332332
"X-Fern-Runtime": core.RUNTIME.type,
333333
"X-Fern-Runtime-Version": core.RUNTIME.version,
334334
},

0 commit comments

Comments
 (0)