Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jun 19, 2024
1 parent 30ac111 commit c3d263a
Show file tree
Hide file tree
Showing 20 changed files with 380 additions and 368 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.6",
"version": "7.10.7",
"private": false,
"repository": "https://github.com/cohere-ai/cohere-typescript",
"main": "./index.js",
Expand Down
42 changes: 21 additions & 21 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as core from "./core";
import * as Cohere from "./api/index";
import * as serializers from "./serialization/index";
import urlJoin from "url-join";
import * as stream from "readable-stream";
import * as stream from "stream";
import * as errors from "./errors/index";
import { EmbedJobs } from "./api/resources/embedJobs/client/Client";
import { Datasets } from "./api/resources/datasets/client/Client";
Expand Down Expand Up @@ -55,7 +55,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -200,7 +200,7 @@ export class CohereClient {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.chat({
* await client.chat({
* message: "Can you give me a global market overview of solar panels?",
* stream: false,
* promptTruncation: Cohere.ChatRequestPromptTruncation.Off,
Expand All @@ -225,7 +225,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -364,7 +364,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -512,7 +512,7 @@ export class CohereClient {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.generate({
* await client.generate({
* prompt: "Please explain to me how LLMs work",
* stream: false
* })
Expand All @@ -535,7 +535,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -672,7 +672,7 @@ export class CohereClient {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.embed({
* await client.embed({
* texts: ["string"],
* model: "string",
* inputType: Cohere.EmbedInputType.SearchDocument,
Expand All @@ -698,7 +698,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -828,7 +828,7 @@ export class CohereClient {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.rerank({
* await client.rerank({
* model: "rerank-english-v3.0",
* query: "What is the capital of the United States?",
* documents: ["Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."]
Expand All @@ -852,7 +852,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -983,7 +983,7 @@ export class CohereClient {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.classify({
* await client.classify({
* inputs: ["Confirm your email address", "hey i need u to send some $"],
* examples: [{
* text: "Dermatologists don't like her!",
Expand Down Expand Up @@ -1036,7 +1036,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1170,7 +1170,7 @@ export class CohereClient {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.summarize({
* await client.summarize({
* text: "Ice cream is a sweetened frozen food typically eaten as a snack or dessert. It may be made from milk or cream and is flavoured with a sweetener, either sugar or an alternative, and a spice, such as cocoa or vanilla, or with fruit such as strawberries or peaches. It can also be made by whisking a flavored cream base and liquid nitrogen together. Food coloring is sometimes added, in addition to stabilizers. The mixture is cooled below the freezing point of water and stirred to incorporate air spaces and to prevent detectable ice crystals from forming. The result is a smooth, semi-solid foam that is solid at very low temperatures (below 2 \u00B0C or 35 \u00B0F). It becomes more malleable as its temperature increases.\n\nThe meaning of the name \"ice cream\" varies from one country to another. In some countries, such as the United States, \"ice cream\" applies only to a specific variety, and most governments regulate the commercial use of the various terms according to the relative quantities of the main ingredients, notably the amount of cream. Products that do not meet the criteria to be called ice cream are sometimes labelled \"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, one word is used fo\r all variants. Analogues made from dairy alternatives, such as goat's or sheep's milk, or milk substitutes (e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are lactose intolerant, allergic to dairy protein or vegan."
* })
*/
Expand All @@ -1192,7 +1192,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1322,7 +1322,7 @@ export class CohereClient {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.tokenize({
* await client.tokenize({
* text: "tokenize me! :D",
* model: "command"
* })
Expand All @@ -1345,7 +1345,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1475,7 +1475,7 @@ export class CohereClient {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.detokenize({
* await client.detokenize({
* tokens: [10104, 12221, 1315, 34, 1420, 69],
* model: "command"
* })
Expand All @@ -1498,7 +1498,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1627,7 +1627,7 @@ export class CohereClient {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.checkApiKey()
* await client.checkApiKey()
*/
public async checkApiKey(requestOptions?: CohereClient.RequestOptions): Promise<Cohere.CheckApiKeyResponse> {
const _response = await (this._options.fetcher ?? core.fetcher)({
Expand All @@ -1644,7 +1644,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
24 changes: 12 additions & 12 deletions src/api/resources/connectors/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class Connectors {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.connectors.list()
* await client.connectors.list()
*/
public async list(
request: Cohere.ConnectorsListRequest = {},
Expand Down Expand Up @@ -76,7 +76,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -202,7 +202,7 @@ export class Connectors {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.connectors.create({
* await client.connectors.create({
* name: "name",
* url: "url"
* })
Expand All @@ -225,7 +225,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -355,7 +355,7 @@ export class Connectors {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.connectors.get("id")
* await client.connectors.get("id")
*/
public async get(id: string, requestOptions?: Connectors.RequestOptions): Promise<Cohere.GetConnectorResponse> {
const _response = await (this._options.fetcher ?? core.fetcher)({
Expand All @@ -372,7 +372,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -497,7 +497,7 @@ export class Connectors {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.connectors.delete("id")
* await client.connectors.delete("id")
*/
public async delete(
id: string,
Expand All @@ -517,7 +517,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -643,7 +643,7 @@ export class Connectors {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.connectors.update("id")
* await client.connectors.update("id")
*/
public async update(
id: string,
Expand All @@ -664,7 +664,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -795,7 +795,7 @@ export class Connectors {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.connectors.oAuthAuthorize("id")
* await client.connectors.oAuthAuthorize("id")
*/
public async oAuthAuthorize(
id: string,
Expand All @@ -822,7 +822,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
20 changes: 10 additions & 10 deletions src/api/resources/datasets/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class Datasets {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.datasets.list()
* await client.datasets.list()
*/
public async list(
request: Cohere.DatasetsListRequest = {},
Expand Down Expand Up @@ -93,7 +93,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -221,7 +221,7 @@ export class Datasets {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.datasets.create(fs.createReadStream("/path/to/your/file"), fs.createReadStream("/path/to/your/file"), {
* await client.datasets.create(fs.createReadStream("/path/to/your/file"), fs.createReadStream("/path/to/your/file"), {
* name: "name",
* type: Cohere.DatasetType.EmbedInput
* })
Expand Down Expand Up @@ -292,7 +292,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await _maybeEncodedRequest.getHeaders()),
Expand Down Expand Up @@ -418,7 +418,7 @@ export class Datasets {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.datasets.getUsage()
* await client.datasets.getUsage()
*/
public async getUsage(requestOptions?: Datasets.RequestOptions): Promise<Cohere.DatasetsGetUsageResponse> {
const _response = await (this._options.fetcher ?? core.fetcher)({
Expand All @@ -435,7 +435,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -560,7 +560,7 @@ export class Datasets {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.datasets.get("id")
* await client.datasets.get("id")
*/
public async get(id: string, requestOptions?: Datasets.RequestOptions): Promise<Cohere.DatasetsGetResponse> {
const _response = await (this._options.fetcher ?? core.fetcher)({
Expand All @@ -577,7 +577,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -702,7 +702,7 @@ export class Datasets {
* @throws {@link Cohere.GatewayTimeoutError}
*
* @example
* await cohere.datasets.delete("id")
* await client.datasets.delete("id")
*/
public async delete(id: string, requestOptions?: Datasets.RequestOptions): Promise<Record<string, unknown>> {
const _response = await (this._options.fetcher ?? core.fetcher)({
Expand All @@ -719,7 +719,7 @@ export class Datasets {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.10.6",
"X-Fern-SDK-Version": "7.10.7",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
Loading

0 comments on commit c3d263a

Please sign in to comment.