Skip to content

Commit

Permalink
🌿 Fern Regeneration -- May 22, 2024 (#157)
Browse files Browse the repository at this point in the history
* SDK regeneration

* /* webpackIgnore: true */

---------

Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Co-authored-by: Billy Trend <billy@cohere.com>
  • Loading branch information
fern-api[bot] and billytrend-cohere authored May 22, 2024
1 parent 61db210 commit 3b589c7
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 56 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cohere-ai",
"version": "7.10.0",
"version": "7.10.1",
"private": false,
"repository": "https://github.com/cohere-ai/cohere-typescript",
"main": "./index.js",
Expand Down
2 changes: 2 additions & 0 deletions src/api/client/requests/ChatRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,6 @@ export interface ChatRequest {
*
*/
toolResults?: Cohere.ToolResult[];
/** Forces the chat to be single step. Defaults to `false`. */
forceSingleStep?: boolean;
}
3 changes: 2 additions & 1 deletion src/api/client/requests/ChatStreamRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ import * as Cohere from "../../index";
* }
* }]
* }],
* enableMultiStep: true,
* forceSingleStep: true
* }
*/
Expand Down Expand Up @@ -311,4 +310,6 @@ export interface ChatStreamRequest {
*
*/
toolResults?: Cohere.ToolResult[];
/** Forces the chat to be single step. Defaults to `false`. */
forceSingleStep?: boolean;
}
2 changes: 1 addition & 1 deletion src/api/client/requests/ClassifyRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface ClassifyRequest {
examples?: Cohere.ClassifyExample[];
/** The identifier of the model. Currently available models are `embed-multilingual-v2.0`, `embed-english-light-v2.0`, and `embed-english-v2.0` (default). Smaller "light" models are faster, while larger models will perform better. [Fine-tuned models](https://docs.cohere.com/docs/fine-tuning) can also be supplied with their full ID. */
model?: string;
/** The ID of a custom playground preset. You can create presets in the [playground](https://dashboard.cohere.ai/playground/classify?model=large). If you use a preset, all other parameters become optional, and any included parameters will override the preset's parameters. */
/** The ID of a custom playground preset. You can create presets in the [playground](https://dashboard.cohere.com/playground/classify?model=large). If you use a preset, all other parameters become optional, and any included parameters will override the preset's parameters. */
preset?: string;
/**
* One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.
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 @@ -54,7 +54,7 @@ export interface GenerateRequest {
/** 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. */
seed?: number;
/**
* 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.ai/playground/generate).
* 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).
* When a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters.
*
*/
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 @@ -69,7 +69,7 @@ export interface GenerateStreamRequest {
/** 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. */
seed?: number;
/**
* 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.ai/playground/generate).
* 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).
* When a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters.
*
*/
Expand Down
12 changes: 6 additions & 6 deletions src/api/resources/connectors/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -159,7 +159,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -252,7 +252,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -344,7 +344,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -440,7 +440,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -546,7 +546,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
10 changes: 5 additions & 5 deletions src/api/resources/datasets/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -217,7 +217,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await _maybeEncodedRequest.getHeaders()),
Expand Down Expand Up @@ -297,7 +297,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -376,7 +376,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -455,7 +455,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
8 changes: 4 additions & 4 deletions src/api/resources/embedJobs/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class EmbedJobs {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -144,7 +144,7 @@ export class EmbedJobs {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -235,7 +235,7 @@ export class EmbedJobs {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -323,7 +323,7 @@ export class EmbedJobs {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
14 changes: 7 additions & 7 deletions src/api/resources/finetuning/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -186,7 +186,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -294,7 +294,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -397,7 +397,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -510,7 +510,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -634,7 +634,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -750,7 +750,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/models/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class Models {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -157,7 +157,7 @@ export class Models {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.0",
"X-Fern-SDK-Version": "7.10.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
2 changes: 1 addition & 1 deletion src/core/form-data-utils/FormDataWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class FormDataRequestBody {
if (this.encoder == null) {
await this.setup();
}
return (await import("node:stream")).Readable.from(this.encoder);
return (await import(/* webpackIgnore: true */"node:stream")).Readable.from(this.encoder);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

export const CohereEnvironment = {
Production: "https://api.cohere.ai/v1",
Production: "https://api.cohere.com/v1",
} as const;

export type CohereEnvironment = typeof CohereEnvironment.Production;
2 changes: 2 additions & 0 deletions src/serialization/client/requests/ChatRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const ChatRequest: core.serialization.Schema<serializers.ChatRequest.Raw,
returnPrompt: core.serialization.property("return_prompt", core.serialization.boolean().optional()),
tools: core.serialization.list(Tool).optional(),
toolResults: core.serialization.property("tool_results", core.serialization.list(ToolResult).optional()),
forceSingleStep: core.serialization.property("force_single_step", core.serialization.boolean().optional()),
});

export declare namespace ChatRequest {
Expand Down Expand Up @@ -68,5 +69,6 @@ export declare namespace ChatRequest {
return_prompt?: boolean | null;
tools?: Tool.Raw[] | null;
tool_results?: ToolResult.Raw[] | null;
force_single_step?: boolean | null;
}
}
2 changes: 2 additions & 0 deletions src/serialization/client/requests/ChatStreamRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const ChatStreamRequest: core.serialization.Schema<serializers.ChatStream
returnPrompt: core.serialization.property("return_prompt", core.serialization.boolean().optional()),
tools: core.serialization.list(Tool).optional(),
toolResults: core.serialization.property("tool_results", core.serialization.list(ToolResult).optional()),
forceSingleStep: core.serialization.property("force_single_step", core.serialization.boolean().optional()),
});

export declare namespace ChatStreamRequest {
Expand Down Expand Up @@ -71,5 +72,6 @@ export declare namespace ChatStreamRequest {
return_prompt?: boolean | null;
tools?: Tool.Raw[] | null;
tool_results?: ToolResult.Raw[] | null;
force_single_step?: boolean | null;
}
}
Loading

0 comments on commit 3b589c7

Please sign in to comment.