Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌿 Fern Regeneration -- August 13, 2024 #194

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.12.0",
"version": "7.12.1",
"private": false,
"repository": "https://github.com/cohere-ai/cohere-typescript",
"main": "./index.js",
Expand Down
24 changes: 12 additions & 12 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 { V2 } from "./api/resources/v2/client/Client";
import { EmbedJobs } from "./api/resources/embedJobs/client/Client";
Expand Down Expand Up @@ -62,7 +62,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -232,7 +232,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -372,7 +372,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -543,7 +543,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -707,7 +707,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -862,7 +862,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1047,7 +1047,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1204,7 +1204,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1358,7 +1358,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1512,7 +1512,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -1659,7 +1659,7 @@ export class CohereClient {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
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 @@ -82,7 +82,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -232,7 +232,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -380,7 +380,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -526,7 +526,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -674,7 +674,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -833,7 +833,7 @@ export class Connectors {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.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 @@ -68,7 +68,7 @@ export class EmbedJobs {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -218,7 +218,7 @@ export class EmbedJobs {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -366,7 +366,7 @@ export class EmbedJobs {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -509,7 +509,7 @@ export class EmbedJobs {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.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 @@ -82,7 +82,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -180,7 +180,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -274,7 +274,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -363,7 +363,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -462,7 +462,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -572,7 +572,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -674,7 +674,7 @@ export class Finetuning {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.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 @@ -69,7 +69,7 @@ export class Models {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -233,7 +233,7 @@ export class Models {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
6 changes: 3 additions & 3 deletions src/api/resources/v2/client/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 "../../../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";

export declare namespace V2 {
Expand Down Expand Up @@ -52,7 +52,7 @@ export class V2 {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down Expand Up @@ -218,7 +218,7 @@ export class V2 {
: undefined,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "cohere-ai",
"X-Fern-SDK-Version": "7.12.0",
"X-Fern-SDK-Version": "7.12.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
42 changes: 21 additions & 21 deletions src/core/form-data-utils/FormDataWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export async function newFormData(): Promise<CrossPlatformFormData> {
class Node18FormData implements CrossPlatformFormData {
private fd:
| {
append(name: string, value: unknown, fileName?: string): void;
}
append(name: string, value: unknown, fileName?: string): void;
}
| undefined;

public async setup() {
Expand All @@ -50,7 +50,7 @@ class Node18FormData implements CrossPlatformFormData {
}

public async appendFile(key: string, value: unknown, fileName?: string): Promise<void> {
if (value instanceof (await import("readable-stream")).Readable) {
if (value instanceof (await import("stream")).Readable) {
this.fd?.append(key, {
type: undefined,
name: fileName,
Expand All @@ -67,7 +67,7 @@ class Node18FormData implements CrossPlatformFormData {
public async getRequest(): Promise<FormDataRequest<unknown>> {
const encoder = new (await import("form-data-encoder")).FormDataEncoder(this.fd as any);
return {
body: await (await import("readable-stream")).Readable.from(encoder),
body: await (await import("stream")).Readable.from(encoder),
headers: encoder.headers,
duplex: "half",
};
Expand All @@ -80,22 +80,22 @@ class Node18FormData implements CrossPlatformFormData {
class Node16FormData implements CrossPlatformFormData {
private fd:
| {
append(
name: string,
value: unknown,
options?:
| string
| {
header?: string | Headers;
knownLength?: number;
filename?: string;
filepath?: string;
contentType?: string;
}
): void;

getHeaders(): Record<string, string>;
}
append(
name: string,
value: unknown,
options?:
| string
| {
header?: string | Headers;
knownLength?: number;
filename?: string;
filepath?: string;
contentType?: string;
}
): void;

getHeaders(): Record<string, string>;
}
| undefined;

public async setup(): Promise<void> {
Expand All @@ -108,7 +108,7 @@ class Node16FormData implements CrossPlatformFormData {

public async appendFile(key: string, value: unknown, fileName?: string): Promise<void> {
let bufferedValue;
if (!(value instanceof (await import("readable-stream")).Readable)) {
if (!(value instanceof (await import("stream")).Readable)) {
bufferedValue = Buffer.from(await (value as any).arrayBuffer());
} else {
bufferedValue = value;
Expand Down
2 changes: 1 addition & 1 deletion src/core/streaming-fetcher/Stream.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Readable } from "readable-stream";
import { Readable } from "stream";
import { RUNTIME } from "../runtime";

export declare namespace Stream {
Expand Down
Loading
Loading