Skip to content

Commit

Permalink
Release 7.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Nov 23, 2023
1 parent 89c12f0 commit 14d9b44
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 53 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.4.0",
"version": "7.4.1",
"private": false,
"repository": "https://github.com/cohere-ai/cohere-typescript",
"main": "./index.js",
Expand Down
20 changes: 10 additions & 10 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
body: {
...(await serializers.ChatStreamRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" })),
Expand Down Expand Up @@ -87,7 +87,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
contentType: "application/json",
body: {
Expand Down Expand Up @@ -148,7 +148,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
contentType: "application/json",
body: await serializers.GenerateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -217,7 +217,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
contentType: "application/json",
body: await serializers.EmbedRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -280,7 +280,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
contentType: "application/json",
body: await serializers.RerankRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -339,7 +339,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
contentType: "application/json",
body: await serializers.ClassifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -402,7 +402,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
contentType: "application/json",
body: await serializers.DetectLanguageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -458,7 +458,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
contentType: "application/json",
body: await serializers.SummarizeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -516,7 +516,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
contentType: "application/json",
body: await serializers.TokenizeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down Expand Up @@ -579,7 +579,7 @@ export class CohereClient {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.4.0",
"X-Fern-SDK-Version": "7.4.1",
},
contentType: "application/json",
body: await serializers.DetokenizeRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
Expand Down
2 changes: 1 addition & 1 deletion src/api/client/requests/ChatRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface ChatRequest {
*/
promptTruncation?: Cohere.ChatRequestPromptTruncation;
/**
* Currently only accepts `{"id": "web-search"}`.
* Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom connector, if you've made one.
* When specified, the model's reply will be enriched with information found by quering each of the connectors (RAG).
*
*/
Expand Down
2 changes: 1 addition & 1 deletion src/api/client/requests/ChatStreamRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface ChatStreamRequest {
*/
promptTruncation?: Cohere.ChatStreamRequestPromptTruncation;
/**
* Currently only accepts `{"id": "web-search"}`.
* Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom connector, if you've made one.
* When specified, the model's reply will be enriched with information found by quering each of the connectors (RAG).
*
*/
Expand Down
6 changes: 4 additions & 2 deletions src/api/types/SummarizeResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import * as Cohere from "..";

export interface SummarizeResponse {
/** List of languages, one per input text */
results?: Cohere.SummarizeResponseResultsItem[];
/** Generated ID for the summary */
id?: string;
/** Generated summary for the text */
summary?: string;
meta?: Cohere.ApiMeta;
}
10 changes: 0 additions & 10 deletions src/api/types/SummarizeResponseResultsItem.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/api/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export * from "./SummarizeRequestLength";
export * from "./SummarizeRequestFormat";
export * from "./SummarizeRequestExtractiveness";
export * from "./SummarizeResponse";
export * from "./SummarizeResponseResultsItem";
export * from "./TokenizeResponse";
export * from "./DetokenizeResponse";
export * from "./ChatMessage";
Expand Down
8 changes: 4 additions & 4 deletions src/serialization/types/SummarizeResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ export const SummarizeResponse: core.serialization.ObjectSchema<
serializers.SummarizeResponse.Raw,
Cohere.SummarizeResponse
> = core.serialization.object({
results: core.serialization
.list(core.serialization.lazyObject(async () => (await import("..")).SummarizeResponseResultsItem))
.optional(),
id: core.serialization.string().optional(),
summary: core.serialization.string().optional(),
meta: core.serialization.lazyObject(async () => (await import("..")).ApiMeta).optional(),
});

export declare namespace SummarizeResponse {
interface Raw {
results?: serializers.SummarizeResponseResultsItem.Raw[] | null;
id?: string | null;
summary?: string | null;
meta?: serializers.ApiMeta.Raw | null;
}
}
22 changes: 0 additions & 22 deletions src/serialization/types/SummarizeResponseResultsItem.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/serialization/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export * from "./SummarizeRequestLength";
export * from "./SummarizeRequestFormat";
export * from "./SummarizeRequestExtractiveness";
export * from "./SummarizeResponse";
export * from "./SummarizeResponseResultsItem";
export * from "./TokenizeResponse";
export * from "./DetokenizeResponse";
export * from "./ChatMessage";
Expand Down

0 comments on commit 14d9b44

Please sign in to comment.