openai 4.52.0 → 4.52.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/index.d.mts +5 -3
- package/index.d.ts +5 -3
- package/index.d.ts.map +1 -1
- package/index.js +4 -2
- package/index.js.map +1 -1
- package/index.mjs +4 -2
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audio/speech.d.ts +2 -2
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/speech.js.map +1 -1
- package/resources/audio/speech.mjs.map +1 -1
- package/resources/audio/transcriptions.d.ts +2 -3
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js +25 -2
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs +2 -2
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/audio/translations.d.ts +2 -3
- package/resources/audio/translations.d.ts.map +1 -1
- package/resources/audio/translations.js +25 -2
- package/resources/audio/translations.js.map +1 -1
- package/resources/audio/translations.mjs +2 -2
- package/resources/audio/translations.mjs.map +1 -1
- package/resources/batches.d.ts +1 -1
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.js.map +1 -1
- package/resources/batches.mjs.map +1 -1
- package/resources/beta/assistants.d.ts +1 -1
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/assistants.js.map +1 -1
- package/resources/beta/assistants.mjs.map +1 -1
- package/resources/beta/threads/messages.d.ts +1 -1
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages.js.map +1 -1
- package/resources/beta/threads/messages.mjs.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +2 -2
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts +1 -1
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/runs/steps.js.map +1 -1
- package/resources/beta/threads/runs/steps.mjs.map +1 -1
- package/resources/beta/threads/threads.d.ts +2 -2
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/beta/vector-stores/file-batches.d.ts +1 -1
- package/resources/beta/vector-stores/file-batches.d.ts.map +1 -1
- package/resources/beta/vector-stores/file-batches.js.map +1 -1
- package/resources/beta/vector-stores/file-batches.mjs.map +1 -1
- package/resources/beta/vector-stores/files.d.ts +1 -1
- package/resources/beta/vector-stores/files.d.ts.map +1 -1
- package/resources/beta/vector-stores/files.js +1 -2
- package/resources/beta/vector-stores/files.js.map +1 -1
- package/resources/beta/vector-stores/files.mjs +1 -2
- package/resources/beta/vector-stores/files.mjs.map +1 -1
- package/resources/beta/vector-stores/vector-stores.d.ts +1 -1
- package/resources/beta/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/beta/vector-stores/vector-stores.js.map +1 -1
- package/resources/beta/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/chat/completions.d.ts +4 -3
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/completions.d.ts +2 -2
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs.map +1 -1
- package/resources/embeddings.d.ts +1 -1
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs.map +1 -1
- package/resources/files.d.ts +3 -4
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +2 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +2 -2
- package/resources/files.mjs.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.d.ts +1 -1
- package/resources/fine-tuning/jobs/checkpoints.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.js.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/images.d.ts +4 -5
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js +26 -3
- package/resources/images.js.map +1 -1
- package/resources/images.mjs +3 -3
- package/resources/images.mjs.map +1 -1
- package/resources/models.d.ts +1 -1
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js.map +1 -1
- package/resources/models.mjs.map +1 -1
- package/resources/moderations.d.ts +1 -1
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs.map +1 -1
- package/src/index.ts +6 -3
- package/src/resources/audio/speech.ts +2 -2
- package/src/resources/audio/transcriptions.ts +3 -4
- package/src/resources/audio/translations.ts +3 -4
- package/src/resources/batches.ts +1 -1
- package/src/resources/beta/assistants.ts +1 -1
- package/src/resources/beta/threads/messages.ts +1 -1
- package/src/resources/beta/threads/runs/runs.ts +2 -2
- package/src/resources/beta/threads/runs/steps.ts +1 -1
- package/src/resources/beta/threads/threads.ts +2 -2
- package/src/resources/beta/vector-stores/file-batches.ts +1 -1
- package/src/resources/beta/vector-stores/files.ts +2 -3
- package/src/resources/beta/vector-stores/vector-stores.ts +1 -1
- package/src/resources/chat/completions.ts +4 -3
- package/src/resources/completions.ts +2 -2
- package/src/resources/embeddings.ts +1 -1
- package/src/resources/files.ts +4 -5
- package/src/resources/fine-tuning/jobs/checkpoints.ts +1 -1
- package/src/resources/fine-tuning/jobs/jobs.ts +1 -1
- package/src/resources/images.ts +6 -7
- package/src/resources/models.ts +1 -1
- package/src/resources/moderations.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderations.d.ts","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"moderations.d.ts","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,cAAc,MAAM,eAAe,CAAC;AAEhD,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;CAG7C;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;IAElC;;OAEG;IACH,eAAe,EAAE,UAAU,CAAC,cAAc,CAAC;IAE3C;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,yBAAiB,UAAU,CAAC;IAC1B;;OAEG;IACH,UAAiB,UAAU;QACzB;;;WAGG;QACH,UAAU,EAAE,OAAO,CAAC;QAEpB;;;WAGG;QACH,wBAAwB,EAAE,OAAO,CAAC;QAElC;;;;;WAKG;QACH,IAAI,EAAE,OAAO,CAAC;QAEd;;;;WAIG;QACH,kBAAkB,EAAE,OAAO,CAAC;QAE5B;;;WAGG;QACH,WAAW,EAAE,OAAO,CAAC;QAErB;;;;WAIG;QACH,wBAAwB,EAAE,OAAO,CAAC;QAElC;;;WAGG;QACH,kBAAkB,EAAE,OAAO,CAAC;QAE5B;;;;WAIG;QACH,MAAM,EAAE,OAAO,CAAC;QAEhB;;WAEG;QACH,eAAe,EAAE,OAAO,CAAC;QAEzB;;WAEG;QACH,QAAQ,EAAE,OAAO,CAAC;QAElB;;WAEG;QACH,kBAAkB,EAAE,OAAO,CAAC;KAC7B;IAED;;OAEG;IACH,UAAiB,cAAc;QAC7B;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,wBAAwB,EAAE,MAAM,CAAC;QAEjC;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAE3B;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,wBAAwB,EAAE,MAAM,CAAC;QAEjC;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;QAE3B;;WAEG;QACH,MAAM,EAAE,MAAM,CAAC;QAEf;;WAEG;QACH,eAAe,EAAE,MAAM,CAAC;QAExB;;WAEG;QACH,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,kBAAkB,EAAE,MAAM,CAAC;KAC5B;CACF;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,wBAAwB,GAAG,wBAAwB,CAAC;CAC7E;AAED,yBAAiB,WAAW,CAAC;IAC3B,MAAM,QAAQ,UAAU,GAAG,cAAc,CAAC,UAAU,CAAC;IACrD,MAAM,QAAQ,wBAAwB,GAAG,cAAc,CAAC,wBAAwB,CAAC;IACjF,MAAM,QAAQ,sBAAsB,GAAG,cAAc,CAAC,sBAAsB,CAAC;CAC9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderations.js","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;
|
|
1
|
+
{"version":3,"file":"moderations.js","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAI1C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAVD,kCAUC;AAiMD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAI3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moderations.mjs","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"moderations.mjs","sourceRoot":"","sources":["../src/resources/moderations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAiMD,WAAiB,WAAW;AAI5B,CAAC,EAJgB,WAAW,KAAX,WAAW,QAI3B"}
|
package/src/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from './core';
|
|
4
3
|
import * as Errors from './error';
|
|
5
|
-
import { type Agent, type RequestInit } from './_shims/index';
|
|
6
4
|
import * as Uploads from './uploads';
|
|
5
|
+
import { type Agent, type RequestInit } from './_shims/index';
|
|
6
|
+
import * as Core from './core';
|
|
7
7
|
import * as Pagination from './pagination';
|
|
8
8
|
import * as API from './resources/index';
|
|
9
9
|
|
|
@@ -86,7 +86,9 @@ export interface ClientOptions {
|
|
|
86
86
|
dangerouslyAllowBrowser?: boolean;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* API Client for interfacing with the OpenAI API.
|
|
91
|
+
*/
|
|
90
92
|
export class OpenAI extends Core.APIClient {
|
|
91
93
|
apiKey: string;
|
|
92
94
|
organization: string | null;
|
|
@@ -143,6 +145,7 @@ export class OpenAI extends Core.APIClient {
|
|
|
143
145
|
maxRetries: options.maxRetries,
|
|
144
146
|
fetch: options.fetch,
|
|
145
147
|
});
|
|
148
|
+
|
|
146
149
|
this._options = options;
|
|
147
150
|
|
|
148
151
|
this.apiKey = apiKey;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
3
|
import { APIResource } from '../../resource';
|
|
5
|
-
import
|
|
4
|
+
import * as Core from '../../core';
|
|
6
5
|
import * as SpeechAPI from './speech';
|
|
6
|
+
import { type Response } from '../../_shims/index';
|
|
7
7
|
|
|
8
8
|
export class Speech extends APIResource {
|
|
9
9
|
/**
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
3
|
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
5
|
import * as TranscriptionsAPI from './transcriptions';
|
|
6
|
-
import { type Uploadable, multipartFormRequestOptions } from '../../core';
|
|
7
6
|
|
|
8
7
|
export class Transcriptions extends APIResource {
|
|
9
8
|
/**
|
|
10
9
|
* Transcribes audio into the input language.
|
|
11
10
|
*/
|
|
12
11
|
create(body: TranscriptionCreateParams, options?: Core.RequestOptions): Core.APIPromise<Transcription> {
|
|
13
|
-
return this._client.post('/audio/transcriptions', multipartFormRequestOptions({ body, ...options }));
|
|
12
|
+
return this._client.post('/audio/transcriptions', Core.multipartFormRequestOptions({ body, ...options }));
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
15
|
|
|
@@ -30,7 +29,7 @@ export interface TranscriptionCreateParams {
|
|
|
30
29
|
* The audio file object (not file name) to transcribe, in one of these formats:
|
|
31
30
|
* flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
32
31
|
*/
|
|
33
|
-
file: Uploadable;
|
|
32
|
+
file: Core.Uploadable;
|
|
34
33
|
|
|
35
34
|
/**
|
|
36
35
|
* ID of the model to use. Only `whisper-1` (which is powered by our open source
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
3
|
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
5
|
import * as TranslationsAPI from './translations';
|
|
6
|
-
import { type Uploadable, multipartFormRequestOptions } from '../../core';
|
|
7
6
|
|
|
8
7
|
export class Translations extends APIResource {
|
|
9
8
|
/**
|
|
10
9
|
* Translates audio into English.
|
|
11
10
|
*/
|
|
12
11
|
create(body: TranslationCreateParams, options?: Core.RequestOptions): Core.APIPromise<Translation> {
|
|
13
|
-
return this._client.post('/audio/translations', multipartFormRequestOptions({ body, ...options }));
|
|
12
|
+
return this._client.post('/audio/translations', Core.multipartFormRequestOptions({ body, ...options }));
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
15
|
|
|
@@ -23,7 +22,7 @@ export interface TranslationCreateParams {
|
|
|
23
22
|
* The audio file object (not file name) translate, in one of these formats: flac,
|
|
24
23
|
* mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
|
25
24
|
*/
|
|
26
|
-
file: Uploadable;
|
|
25
|
+
file: Core.Uploadable;
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
28
|
* ID of the model to use. Only `whisper-1` (which is powered by our open source
|
package/src/resources/batches.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
3
|
import { APIResource } from '../resource';
|
|
5
4
|
import { isRequestOptions } from '../core';
|
|
5
|
+
import * as Core from '../core';
|
|
6
6
|
import * as BatchesAPI from './batches';
|
|
7
7
|
import { CursorPage, type CursorPageParams } from '../pagination';
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
3
|
import { APIResource } from '../../resource';
|
|
5
4
|
import { isRequestOptions } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
6
|
import * as AssistantsAPI from './assistants';
|
|
7
7
|
import * as Shared from '../shared';
|
|
8
8
|
import * as MessagesAPI from './threads/messages';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../../core';
|
|
4
3
|
import { APIResource } from '../../../resource';
|
|
5
4
|
import { isRequestOptions } from '../../../core';
|
|
5
|
+
import * as Core from '../../../core';
|
|
6
6
|
import * as MessagesAPI from './messages';
|
|
7
7
|
import * as AssistantsAPI from '../assistants';
|
|
8
8
|
import { CursorPage, type CursorPageParams } from '../../../pagination';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../../../core';
|
|
4
|
-
import { APIPromise } from '../../../../core';
|
|
5
3
|
import { APIResource } from '../../../../resource';
|
|
6
4
|
import { isRequestOptions } from '../../../../core';
|
|
5
|
+
import { APIPromise } from '../../../../core';
|
|
6
|
+
import * as Core from '../../../../core';
|
|
7
7
|
import { AssistantStream, RunCreateParamsBaseStream } from '../../../../lib/AssistantStream';
|
|
8
8
|
import { sleep } from '../../../../core';
|
|
9
9
|
import { RunSubmitToolOutputsParamsStream } from '../../../../lib/AssistantStream';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../../../core';
|
|
4
3
|
import { APIResource } from '../../../../resource';
|
|
5
4
|
import { isRequestOptions } from '../../../../core';
|
|
5
|
+
import * as Core from '../../../../core';
|
|
6
6
|
import * as StepsAPI from './steps';
|
|
7
7
|
import { CursorPage, type CursorPageParams } from '../../../../pagination';
|
|
8
8
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../../core';
|
|
4
|
-
import { APIPromise } from '../../../core';
|
|
5
3
|
import { APIResource } from '../../../resource';
|
|
6
4
|
import { isRequestOptions } from '../../../core';
|
|
7
5
|
import { AssistantStream, ThreadCreateAndRunParamsBaseStream } from '../../../lib/AssistantStream';
|
|
6
|
+
import { APIPromise } from '../../../core';
|
|
7
|
+
import * as Core from '../../../core';
|
|
8
8
|
import * as ThreadsAPI from './threads';
|
|
9
9
|
import * as AssistantsAPI from '../assistants';
|
|
10
10
|
import * as MessagesAPI from './messages';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../../core';
|
|
4
3
|
import { APIResource } from '../../../resource';
|
|
5
4
|
import { isRequestOptions } from '../../../core';
|
|
6
5
|
import { sleep } from '../../../core';
|
|
7
6
|
import { Uploadable } from '../../../core';
|
|
8
7
|
import { allSettledWithThrow } from '../../../lib/Util';
|
|
8
|
+
import * as Core from '../../../core';
|
|
9
9
|
import * as FileBatchesAPI from './file-batches';
|
|
10
10
|
import * as FilesAPI from './files';
|
|
11
11
|
import { VectorStoreFilesPage } from './files';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../../core';
|
|
4
3
|
import { APIResource } from '../../../resource';
|
|
5
|
-
import { isRequestOptions } from '../../../core';
|
|
6
|
-
import
|
|
4
|
+
import { sleep, Uploadable, isRequestOptions } from '../../../core';
|
|
5
|
+
import * as Core from '../../../core';
|
|
7
6
|
import * as FilesAPI from './files';
|
|
8
7
|
import { CursorPage, type CursorPageParams } from '../../../pagination';
|
|
9
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../../core';
|
|
4
3
|
import { APIResource } from '../../../resource';
|
|
5
4
|
import { isRequestOptions } from '../../../core';
|
|
5
|
+
import * as Core from '../../../core';
|
|
6
6
|
import * as VectorStoresAPI from './vector-stores';
|
|
7
7
|
import * as FileBatchesAPI from './file-batches';
|
|
8
8
|
import * as FilesAPI from './files';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../core';
|
|
4
|
-
import { APIPromise } from '../../core';
|
|
5
3
|
import { APIResource } from '../../resource';
|
|
4
|
+
import { APIPromise } from '../../core';
|
|
5
|
+
import * as Core from '../../core';
|
|
6
6
|
import * as ChatCompletionsAPI from './completions';
|
|
7
7
|
import * as CompletionsAPI from '../completions';
|
|
8
8
|
import * as Shared from '../shared';
|
|
@@ -818,7 +818,8 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
818
818
|
*
|
|
819
819
|
* - If set to 'auto', the system will utilize scale tier credits until they are
|
|
820
820
|
* exhausted.
|
|
821
|
-
* - If set to 'default', the request will be processed
|
|
821
|
+
* - If set to 'default', the request will be processed using the default service
|
|
822
|
+
* tier with a lower uptime SLA and no latency guarentee.
|
|
822
823
|
*
|
|
823
824
|
* When this parameter is set, the response body will include the `service_tier`
|
|
824
825
|
* utilized.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
|
-
import { APIPromise } from '../core';
|
|
5
3
|
import { APIResource } from '../resource';
|
|
4
|
+
import { APIPromise } from '../core';
|
|
5
|
+
import * as Core from '../core';
|
|
6
6
|
import * as CompletionsAPI from './completions';
|
|
7
7
|
import * as ChatCompletionsAPI from './chat/completions';
|
|
8
8
|
import { Stream } from '../streaming';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
3
|
import { APIResource } from '../resource';
|
|
4
|
+
import * as Core from '../core';
|
|
5
5
|
import * as EmbeddingsAPI from './embeddings';
|
|
6
6
|
|
|
7
7
|
export class Embeddings extends APIResource {
|
package/src/resources/files.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
3
|
import { APIResource } from '../resource';
|
|
5
4
|
import { isRequestOptions } from '../core';
|
|
6
|
-
import { type Response } from '../_shims/index';
|
|
7
5
|
import { sleep } from '../core';
|
|
8
6
|
import { APIConnectionTimeoutError } from '../error';
|
|
7
|
+
import * as Core from '../core';
|
|
9
8
|
import * as FilesAPI from './files';
|
|
10
|
-
import { type Uploadable, multipartFormRequestOptions } from '../core';
|
|
11
9
|
import { Page } from '../pagination';
|
|
10
|
+
import { type Response } from '../_shims/index';
|
|
12
11
|
|
|
13
12
|
export class Files extends APIResource {
|
|
14
13
|
/**
|
|
@@ -35,7 +34,7 @@ export class Files extends APIResource {
|
|
|
35
34
|
* storage limits.
|
|
36
35
|
*/
|
|
37
36
|
create(body: FileCreateParams, options?: Core.RequestOptions): Core.APIPromise<FileObject> {
|
|
38
|
-
return this._client.post('/files', multipartFormRequestOptions({ body, ...options }));
|
|
37
|
+
return this._client.post('/files', Core.multipartFormRequestOptions({ body, ...options }));
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
/**
|
|
@@ -188,7 +187,7 @@ export interface FileCreateParams {
|
|
|
188
187
|
/**
|
|
189
188
|
* The File object (not file name) to be uploaded.
|
|
190
189
|
*/
|
|
191
|
-
file: Uploadable;
|
|
190
|
+
file: Core.Uploadable;
|
|
192
191
|
|
|
193
192
|
/**
|
|
194
193
|
* The intended purpose of the uploaded file.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../../core';
|
|
4
3
|
import { APIResource } from '../../../resource';
|
|
5
4
|
import { isRequestOptions } from '../../../core';
|
|
5
|
+
import * as Core from '../../../core';
|
|
6
6
|
import * as CheckpointsAPI from './checkpoints';
|
|
7
7
|
import { CursorPage, type CursorPageParams } from '../../../pagination';
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../../../core';
|
|
4
3
|
import { APIResource } from '../../../resource';
|
|
5
4
|
import { isRequestOptions } from '../../../core';
|
|
5
|
+
import * as Core from '../../../core';
|
|
6
6
|
import * as JobsAPI from './jobs';
|
|
7
7
|
import * as CheckpointsAPI from './checkpoints';
|
|
8
8
|
import { CursorPage, type CursorPageParams } from '../../../pagination';
|
package/src/resources/images.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
3
|
import { APIResource } from '../resource';
|
|
4
|
+
import * as Core from '../core';
|
|
5
5
|
import * as ImagesAPI from './images';
|
|
6
|
-
import { type Uploadable, multipartFormRequestOptions } from '../core';
|
|
7
6
|
|
|
8
7
|
export class Images extends APIResource {
|
|
9
8
|
/**
|
|
@@ -13,14 +12,14 @@ export class Images extends APIResource {
|
|
|
13
12
|
body: ImageCreateVariationParams,
|
|
14
13
|
options?: Core.RequestOptions,
|
|
15
14
|
): Core.APIPromise<ImagesResponse> {
|
|
16
|
-
return this._client.post('/images/variations', multipartFormRequestOptions({ body, ...options }));
|
|
15
|
+
return this._client.post('/images/variations', Core.multipartFormRequestOptions({ body, ...options }));
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
19
|
* Creates an edited or extended image given an original image and a prompt.
|
|
21
20
|
*/
|
|
22
21
|
edit(body: ImageEditParams, options?: Core.RequestOptions): Core.APIPromise<ImagesResponse> {
|
|
23
|
-
return this._client.post('/images/edits', multipartFormRequestOptions({ body, ...options }));
|
|
22
|
+
return this._client.post('/images/edits', Core.multipartFormRequestOptions({ body, ...options }));
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
/**
|
|
@@ -64,7 +63,7 @@ export interface ImageCreateVariationParams {
|
|
|
64
63
|
* The image to use as the basis for the variation(s). Must be a valid PNG file,
|
|
65
64
|
* less than 4MB, and square.
|
|
66
65
|
*/
|
|
67
|
-
image: Uploadable;
|
|
66
|
+
image: Core.Uploadable;
|
|
68
67
|
|
|
69
68
|
/**
|
|
70
69
|
* The model to use for image generation. Only `dall-e-2` is supported at this
|
|
@@ -104,7 +103,7 @@ export interface ImageEditParams {
|
|
|
104
103
|
* The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask
|
|
105
104
|
* is not provided, image must have transparency, which will be used as the mask.
|
|
106
105
|
*/
|
|
107
|
-
image: Uploadable;
|
|
106
|
+
image: Core.Uploadable;
|
|
108
107
|
|
|
109
108
|
/**
|
|
110
109
|
* A text description of the desired image(s). The maximum length is 1000
|
|
@@ -117,7 +116,7 @@ export interface ImageEditParams {
|
|
|
117
116
|
* indicate where `image` should be edited. Must be a valid PNG file, less than
|
|
118
117
|
* 4MB, and have the same dimensions as `image`.
|
|
119
118
|
*/
|
|
120
|
-
mask?: Uploadable;
|
|
119
|
+
mask?: Core.Uploadable;
|
|
121
120
|
|
|
122
121
|
/**
|
|
123
122
|
* The model to use for image generation. Only `dall-e-2` is supported at this
|
package/src/resources/models.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
3
|
import { APIResource } from '../resource';
|
|
4
|
+
import * as Core from '../core';
|
|
5
5
|
import * as ModelsAPI from './models';
|
|
6
6
|
import { Page } from '../pagination';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Core from '../core';
|
|
4
3
|
import { APIResource } from '../resource';
|
|
4
|
+
import * as Core from '../core';
|
|
5
5
|
import * as ModerationsAPI from './moderations';
|
|
6
6
|
|
|
7
7
|
export class Moderations extends APIResource {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.52.
|
|
1
|
+
export const VERSION = '4.52.2'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.52.
|
|
1
|
+
export declare const VERSION = "4.52.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.52.
|
|
1
|
+
export const VERSION = '4.52.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|