openai 4.68.4 → 4.70.0
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 +36 -0
- package/README.md +5 -5
- package/core.d.ts +3 -3
- package/core.d.ts.map +1 -1
- package/core.js.map +1 -1
- package/core.mjs.map +1 -1
- package/error.d.ts.map +1 -1
- package/index.d.mts +38 -98
- package/index.d.ts +38 -98
- package/index.d.ts.map +1 -1
- package/index.js +43 -22
- package/index.js.map +1 -1
- package/index.mjs +30 -22
- package/index.mjs.map +1 -1
- package/lib/AssistantStream.d.ts +1 -2
- package/lib/AssistantStream.d.ts.map +1 -1
- package/lib/AssistantStream.js.map +1 -1
- package/lib/AssistantStream.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/audio/audio.d.ts +7 -18
- package/resources/audio/audio.d.ts.map +1 -1
- package/resources/audio/audio.js +6 -5
- package/resources/audio/audio.js.map +1 -1
- package/resources/audio/audio.mjs +6 -5
- package/resources/audio/audio.mjs.map +1 -1
- package/resources/audio/index.d.ts +4 -4
- package/resources/audio/index.d.ts.map +1 -1
- package/resources/audio/index.js.map +1 -1
- package/resources/audio/index.mjs.map +1 -1
- package/resources/audio/speech.d.ts +1 -3
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/speech.js +0 -2
- package/resources/audio/speech.js.map +1 -1
- package/resources/audio/speech.mjs +0 -2
- package/resources/audio/speech.mjs.map +1 -1
- package/resources/audio/transcriptions.d.ts +1 -7
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js +0 -2
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs +0 -2
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/audio/translations.d.ts +1 -5
- package/resources/audio/translations.d.ts.map +1 -1
- package/resources/audio/translations.js +0 -2
- package/resources/audio/translations.js.map +1 -1
- package/resources/audio/translations.mjs +0 -2
- package/resources/audio/translations.mjs.map +1 -1
- package/resources/batches.d.ts +1 -6
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.js +1 -27
- package/resources/batches.js.map +1 -1
- package/resources/batches.mjs +1 -4
- package/resources/batches.mjs.map +1 -1
- package/resources/beta/assistants.d.ts +1 -16
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/assistants.js +1 -27
- package/resources/beta/assistants.js.map +1 -1
- package/resources/beta/assistants.mjs +1 -4
- package/resources/beta/assistants.mjs.map +1 -1
- package/resources/beta/beta.d.ts +8 -45
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +9 -8
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +9 -8
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/chat/completions.d.ts +5 -5
- package/resources/beta/chat/completions.d.ts.map +1 -1
- package/resources/beta/chat/completions.js +5 -5
- package/resources/beta/chat/completions.js.map +1 -1
- package/resources/beta/chat/completions.mjs +3 -3
- package/resources/beta/chat/completions.mjs.map +1 -1
- package/resources/beta/index.d.ts +3 -3
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +5 -5
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/threads/index.d.ts +3 -3
- package/resources/beta/threads/index.d.ts.map +1 -1
- package/resources/beta/threads/index.js +3 -3
- package/resources/beta/threads/index.js.map +1 -1
- package/resources/beta/threads/index.mjs +1 -1
- package/resources/beta/threads/index.mjs.map +1 -1
- package/resources/beta/threads/messages.d.ts +1 -33
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages.js +1 -27
- package/resources/beta/threads/messages.js.map +1 -1
- package/resources/beta/threads/messages.mjs +1 -4
- package/resources/beta/threads/messages.mjs.map +1 -1
- package/resources/beta/threads/runs/index.d.ts +2 -2
- package/resources/beta/threads/runs/index.d.ts.map +1 -1
- package/resources/beta/threads/runs/index.js.map +1 -1
- package/resources/beta/threads/runs/index.mjs.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +3 -39
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js +4 -6
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs +4 -6
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts +1 -21
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/runs/steps.js +1 -27
- package/resources/beta/threads/runs/steps.js.map +1 -1
- package/resources/beta/threads/runs/steps.mjs +1 -4
- package/resources/beta/threads/runs/steps.mjs.map +1 -1
- package/resources/beta/threads/threads.d.ts +5 -64
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js +6 -6
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs +6 -6
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/beta/vector-stores/file-batches.d.ts +1 -4
- package/resources/beta/vector-stores/file-batches.d.ts.map +1 -1
- package/resources/beta/vector-stores/file-batches.js +0 -2
- package/resources/beta/vector-stores/file-batches.js.map +1 -1
- package/resources/beta/vector-stores/file-batches.mjs +0 -2
- package/resources/beta/vector-stores/file-batches.mjs.map +1 -1
- package/resources/beta/vector-stores/files.d.ts +1 -6
- package/resources/beta/vector-stores/files.d.ts.map +1 -1
- package/resources/beta/vector-stores/files.js +1 -27
- package/resources/beta/vector-stores/files.js.map +1 -1
- package/resources/beta/vector-stores/files.mjs +1 -4
- package/resources/beta/vector-stores/files.mjs.map +1 -1
- package/resources/beta/vector-stores/index.d.ts +3 -3
- package/resources/beta/vector-stores/index.d.ts.map +1 -1
- package/resources/beta/vector-stores/index.js +6 -6
- package/resources/beta/vector-stores/index.js.map +1 -1
- package/resources/beta/vector-stores/index.mjs +2 -2
- package/resources/beta/vector-stores/index.mjs.map +1 -1
- package/resources/beta/vector-stores/vector-stores.d.ts +5 -24
- package/resources/beta/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/beta/vector-stores/vector-stores.js +6 -7
- package/resources/beta/vector-stores/vector-stores.js.map +1 -1
- package/resources/beta/vector-stores/vector-stores.mjs +6 -7
- package/resources/beta/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/chat/chat.d.ts +3 -38
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js +2 -3
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs +2 -3
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +5 -39
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js +0 -2
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs +0 -2
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/chat/index.d.ts +2 -2
- package/resources/chat/index.d.ts.map +1 -1
- package/resources/chat/index.js +3 -3
- package/resources/chat/index.js.map +1 -1
- package/resources/chat/index.mjs +1 -1
- package/resources/chat/index.mjs.map +1 -1
- package/resources/completions.d.ts +1 -6
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js +0 -2
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs +0 -2
- package/resources/completions.mjs.map +1 -1
- package/resources/embeddings.d.ts +1 -5
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +0 -2
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +0 -2
- package/resources/embeddings.mjs.map +1 -1
- package/resources/files.d.ts +1 -8
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +1 -4
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +1 -4
- package/resources/files.mjs.map +1 -1
- package/resources/fine-tuning/fine-tuning.d.ts +2 -11
- package/resources/fine-tuning/fine-tuning.d.ts.map +1 -1
- package/resources/fine-tuning/fine-tuning.js +4 -5
- package/resources/fine-tuning/fine-tuning.js.map +1 -1
- package/resources/fine-tuning/fine-tuning.mjs +4 -5
- package/resources/fine-tuning/fine-tuning.mjs.map +1 -1
- package/resources/fine-tuning/index.d.ts +1 -1
- package/resources/fine-tuning/index.d.ts.map +1 -1
- package/resources/fine-tuning/index.js.map +1 -1
- package/resources/fine-tuning/index.mjs.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.d.ts +1 -4
- package/resources/fine-tuning/jobs/checkpoints.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.js +1 -27
- package/resources/fine-tuning/jobs/checkpoints.js.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.mjs +1 -4
- package/resources/fine-tuning/jobs/checkpoints.mjs.map +1 -1
- package/resources/fine-tuning/jobs/index.d.ts +2 -2
- package/resources/fine-tuning/jobs/index.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/index.js +4 -4
- package/resources/fine-tuning/jobs/index.js.map +1 -1
- package/resources/fine-tuning/jobs/index.mjs +1 -1
- package/resources/fine-tuning/jobs/index.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +3 -15
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js +5 -7
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs +5 -7
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/images.d.ts +1 -7
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js +0 -2
- package/resources/images.js.map +1 -1
- package/resources/images.mjs +0 -2
- package/resources/images.mjs.map +1 -1
- package/resources/index.d.ts +9 -9
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/models.d.ts +1 -4
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +1 -27
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +1 -4
- package/resources/models.mjs.map +1 -1
- package/resources/moderations.d.ts +1 -8
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +0 -2
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +0 -2
- package/resources/moderations.mjs.map +1 -1
- package/resources/uploads/index.d.ts +2 -2
- package/resources/uploads/index.d.ts.map +1 -1
- package/resources/uploads/index.js +3 -3
- package/resources/uploads/index.js.map +1 -1
- package/resources/uploads/index.mjs +1 -1
- package/resources/uploads/index.mjs.map +1 -1
- package/resources/uploads/parts.d.ts +1 -3
- package/resources/uploads/parts.d.ts.map +1 -1
- package/resources/uploads/parts.js +0 -2
- package/resources/uploads/parts.js.map +1 -1
- package/resources/uploads/parts.mjs +0 -2
- package/resources/uploads/parts.mjs.map +1 -1
- package/resources/uploads/uploads.d.ts +3 -7
- package/resources/uploads/uploads.d.ts.map +1 -1
- package/resources/uploads/uploads.js +2 -3
- package/resources/uploads/uploads.js.map +1 -1
- package/resources/uploads/uploads.mjs +2 -3
- package/resources/uploads/uploads.mjs.map +1 -1
- package/src/core.ts +5 -5
- package/src/error.ts +1 -1
- package/src/index.ts +240 -113
- package/src/lib/AssistantStream.ts +1 -2
- package/src/resources/audio/audio.ts +43 -27
- package/src/resources/audio/index.ts +12 -12
- package/src/resources/audio/speech.ts +2 -4
- package/src/resources/audio/transcriptions.ts +9 -12
- package/src/resources/audio/translations.ts +7 -10
- package/src/resources/batches.ts +11 -7
- package/src/resources/beta/assistants.ts +20 -17
- package/src/resources/beta/beta.ts +112 -46
- package/src/resources/beta/chat/completions.ts +19 -15
- package/src/resources/beta/index.ts +41 -41
- package/src/resources/beta/threads/index.ts +63 -63
- package/src/resources/beta/threads/messages.ts +37 -34
- package/src/resources/beta/threads/runs/index.ts +36 -36
- package/src/resources/beta/threads/runs/runs.ts +73 -40
- package/src/resources/beta/threads/runs/steps.ts +26 -22
- package/src/resources/beta/threads/threads.ts +133 -65
- package/src/resources/beta/vector-stores/file-batches.ts +6 -5
- package/src/resources/beta/vector-stores/files.ts +10 -7
- package/src/resources/beta/vector-stores/index.ts +24 -24
- package/src/resources/beta/vector-stores/vector-stores.ts +51 -25
- package/src/resources/chat/chat.ts +75 -39
- package/src/resources/chat/completions.ts +39 -40
- package/src/resources/chat/index.ts +33 -33
- package/src/resources/completions.ts +9 -7
- package/src/resources/embeddings.ts +7 -6
- package/src/resources/files.ts +12 -9
- package/src/resources/fine-tuning/fine-tuning.ts +31 -12
- package/src/resources/fine-tuning/index.ts +8 -8
- package/src/resources/fine-tuning/jobs/checkpoints.ts +8 -5
- package/src/resources/fine-tuning/jobs/index.ts +14 -14
- package/src/resources/fine-tuning/jobs/jobs.ts +31 -16
- package/src/resources/images.ts +9 -8
- package/src/resources/index.ts +37 -37
- package/src/resources/models.ts +4 -5
- package/src/resources/moderations.ts +10 -9
- package/src/resources/uploads/index.ts +2 -2
- package/src/resources/uploads/parts.ts +2 -4
- package/src/resources/uploads/uploads.ts +11 -8
- package/src/streaming.ts +2 -2
- package/src/version.ts +1 -1
- package/streaming.d.ts.map +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -3,9 +3,22 @@
|
|
|
3
3
|
import { APIResource } from '../../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../../core';
|
|
5
5
|
import * as Core from '../../../core';
|
|
6
|
-
import * as VectorStoresAPI from './vector-stores';
|
|
7
6
|
import * as FileBatchesAPI from './file-batches';
|
|
7
|
+
import {
|
|
8
|
+
FileBatchCreateParams,
|
|
9
|
+
FileBatchListFilesParams,
|
|
10
|
+
FileBatches,
|
|
11
|
+
VectorStoreFileBatch,
|
|
12
|
+
} from './file-batches';
|
|
8
13
|
import * as FilesAPI from './files';
|
|
14
|
+
import {
|
|
15
|
+
FileCreateParams,
|
|
16
|
+
FileListParams,
|
|
17
|
+
Files,
|
|
18
|
+
VectorStoreFile,
|
|
19
|
+
VectorStoreFileDeleted,
|
|
20
|
+
VectorStoreFilesPage,
|
|
21
|
+
} from './files';
|
|
9
22
|
import { CursorPage, type CursorPageParams } from '../../../pagination';
|
|
10
23
|
|
|
11
24
|
export class VectorStores extends APIResource {
|
|
@@ -371,28 +384,41 @@ export interface VectorStoreListParams extends CursorPageParams {
|
|
|
371
384
|
order?: 'asc' | 'desc';
|
|
372
385
|
}
|
|
373
386
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
export
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
export
|
|
397
|
-
|
|
387
|
+
VectorStores.VectorStoresPage = VectorStoresPage;
|
|
388
|
+
VectorStores.Files = Files;
|
|
389
|
+
VectorStores.VectorStoreFilesPage = VectorStoreFilesPage;
|
|
390
|
+
VectorStores.FileBatches = FileBatches;
|
|
391
|
+
|
|
392
|
+
export declare namespace VectorStores {
|
|
393
|
+
export {
|
|
394
|
+
type AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam,
|
|
395
|
+
type FileChunkingStrategy as FileChunkingStrategy,
|
|
396
|
+
type FileChunkingStrategyParam as FileChunkingStrategyParam,
|
|
397
|
+
type OtherFileChunkingStrategyObject as OtherFileChunkingStrategyObject,
|
|
398
|
+
type StaticFileChunkingStrategy as StaticFileChunkingStrategy,
|
|
399
|
+
type StaticFileChunkingStrategyObject as StaticFileChunkingStrategyObject,
|
|
400
|
+
type StaticFileChunkingStrategyParam as StaticFileChunkingStrategyParam,
|
|
401
|
+
type VectorStore as VectorStore,
|
|
402
|
+
type VectorStoreDeleted as VectorStoreDeleted,
|
|
403
|
+
VectorStoresPage as VectorStoresPage,
|
|
404
|
+
type VectorStoreCreateParams as VectorStoreCreateParams,
|
|
405
|
+
type VectorStoreUpdateParams as VectorStoreUpdateParams,
|
|
406
|
+
type VectorStoreListParams as VectorStoreListParams,
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
export {
|
|
410
|
+
Files as Files,
|
|
411
|
+
type VectorStoreFile as VectorStoreFile,
|
|
412
|
+
type VectorStoreFileDeleted as VectorStoreFileDeleted,
|
|
413
|
+
VectorStoreFilesPage as VectorStoreFilesPage,
|
|
414
|
+
type FileCreateParams as FileCreateParams,
|
|
415
|
+
type FileListParams as FileListParams,
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
export {
|
|
419
|
+
FileBatches as FileBatches,
|
|
420
|
+
type VectorStoreFileBatch as VectorStoreFileBatch,
|
|
421
|
+
type FileBatchCreateParams as FileBatchCreateParams,
|
|
422
|
+
type FileBatchListFilesParams as FileBatchListFilesParams,
|
|
423
|
+
};
|
|
398
424
|
}
|
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
|
-
import * as ChatAPI from './chat';
|
|
5
4
|
import * as CompletionsAPI from './completions';
|
|
5
|
+
import {
|
|
6
|
+
ChatCompletion,
|
|
7
|
+
ChatCompletionAssistantMessageParam,
|
|
8
|
+
ChatCompletionAudio,
|
|
9
|
+
ChatCompletionAudioParam,
|
|
10
|
+
ChatCompletionChunk,
|
|
11
|
+
ChatCompletionContentPart,
|
|
12
|
+
ChatCompletionContentPartImage,
|
|
13
|
+
ChatCompletionContentPartInputAudio,
|
|
14
|
+
ChatCompletionContentPartRefusal,
|
|
15
|
+
ChatCompletionContentPartText,
|
|
16
|
+
ChatCompletionCreateParams,
|
|
17
|
+
ChatCompletionCreateParamsNonStreaming,
|
|
18
|
+
ChatCompletionCreateParamsStreaming,
|
|
19
|
+
ChatCompletionFunctionCallOption,
|
|
20
|
+
ChatCompletionFunctionMessageParam,
|
|
21
|
+
ChatCompletionMessage,
|
|
22
|
+
ChatCompletionMessageParam,
|
|
23
|
+
ChatCompletionMessageToolCall,
|
|
24
|
+
ChatCompletionModality,
|
|
25
|
+
ChatCompletionNamedToolChoice,
|
|
26
|
+
ChatCompletionRole,
|
|
27
|
+
ChatCompletionStreamOptions,
|
|
28
|
+
ChatCompletionSystemMessageParam,
|
|
29
|
+
ChatCompletionTokenLogprob,
|
|
30
|
+
ChatCompletionTool,
|
|
31
|
+
ChatCompletionToolChoiceOption,
|
|
32
|
+
ChatCompletionToolMessageParam,
|
|
33
|
+
ChatCompletionUserMessageParam,
|
|
34
|
+
CompletionCreateParams,
|
|
35
|
+
CompletionCreateParamsNonStreaming,
|
|
36
|
+
CompletionCreateParamsStreaming,
|
|
37
|
+
Completions,
|
|
38
|
+
CreateChatCompletionRequestMessage,
|
|
39
|
+
} from './completions';
|
|
6
40
|
|
|
7
41
|
export class Chat extends APIResource {
|
|
8
42
|
completions: CompletionsAPI.Completions = new CompletionsAPI.Completions(this._client);
|
|
@@ -43,42 +77,44 @@ export type ChatModel =
|
|
|
43
77
|
| 'gpt-3.5-turbo-0125'
|
|
44
78
|
| 'gpt-3.5-turbo-16k-0613';
|
|
45
79
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export
|
|
50
|
-
|
|
51
|
-
export
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
Chat.Completions = Completions;
|
|
81
|
+
|
|
82
|
+
export declare namespace Chat {
|
|
83
|
+
export { type ChatModel as ChatModel };
|
|
84
|
+
|
|
85
|
+
export {
|
|
86
|
+
Completions as Completions,
|
|
87
|
+
type ChatCompletion as ChatCompletion,
|
|
88
|
+
type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam,
|
|
89
|
+
type ChatCompletionAudio as ChatCompletionAudio,
|
|
90
|
+
type ChatCompletionAudioParam as ChatCompletionAudioParam,
|
|
91
|
+
type ChatCompletionChunk as ChatCompletionChunk,
|
|
92
|
+
type ChatCompletionContentPart as ChatCompletionContentPart,
|
|
93
|
+
type ChatCompletionContentPartImage as ChatCompletionContentPartImage,
|
|
94
|
+
type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio,
|
|
95
|
+
type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal,
|
|
96
|
+
type ChatCompletionContentPartText as ChatCompletionContentPartText,
|
|
97
|
+
type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption,
|
|
98
|
+
type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam,
|
|
99
|
+
type ChatCompletionMessage as ChatCompletionMessage,
|
|
100
|
+
type ChatCompletionMessageParam as ChatCompletionMessageParam,
|
|
101
|
+
type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall,
|
|
102
|
+
type ChatCompletionModality as ChatCompletionModality,
|
|
103
|
+
type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice,
|
|
104
|
+
type ChatCompletionRole as ChatCompletionRole,
|
|
105
|
+
type ChatCompletionStreamOptions as ChatCompletionStreamOptions,
|
|
106
|
+
type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam,
|
|
107
|
+
type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob,
|
|
108
|
+
type ChatCompletionTool as ChatCompletionTool,
|
|
109
|
+
type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption,
|
|
110
|
+
type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam,
|
|
111
|
+
type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam,
|
|
112
|
+
type CreateChatCompletionRequestMessage as CreateChatCompletionRequestMessage,
|
|
113
|
+
type ChatCompletionCreateParams as ChatCompletionCreateParams,
|
|
114
|
+
type CompletionCreateParams as CompletionCreateParams,
|
|
115
|
+
type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming,
|
|
116
|
+
type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
|
|
117
|
+
type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming,
|
|
118
|
+
type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
|
|
119
|
+
};
|
|
84
120
|
}
|
|
@@ -250,10 +250,10 @@ export interface ChatCompletionAudioParam {
|
|
|
250
250
|
format: 'wav' | 'mp3' | 'flac' | 'opus' | 'pcm16';
|
|
251
251
|
|
|
252
252
|
/**
|
|
253
|
-
*
|
|
254
|
-
* `
|
|
253
|
+
* The voice the model uses to respond. Supported voices are `alloy`, `ash`,
|
|
254
|
+
* `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.
|
|
255
255
|
*/
|
|
256
|
-
voice: 'alloy' | '
|
|
256
|
+
voice: 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
/**
|
|
@@ -308,7 +308,7 @@ export interface ChatCompletionChunk {
|
|
|
308
308
|
* contains a null value except for the last chunk which contains the token usage
|
|
309
309
|
* statistics for the entire request.
|
|
310
310
|
*/
|
|
311
|
-
usage?: CompletionsAPI.CompletionUsage;
|
|
311
|
+
usage?: CompletionsAPI.CompletionUsage | null;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
export namespace ChatCompletionChunk {
|
|
@@ -1185,40 +1185,39 @@ export interface ChatCompletionCreateParamsStreaming extends ChatCompletionCreat
|
|
|
1185
1185
|
*/
|
|
1186
1186
|
export type CompletionCreateParamsStreaming = ChatCompletionCreateParamsStreaming;
|
|
1187
1187
|
|
|
1188
|
-
export namespace Completions {
|
|
1189
|
-
export
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
export import CompletionCreateParamsStreaming = ChatCompletionsAPI.CompletionCreateParamsStreaming;
|
|
1188
|
+
export declare namespace Completions {
|
|
1189
|
+
export {
|
|
1190
|
+
type ChatCompletion as ChatCompletion,
|
|
1191
|
+
type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam,
|
|
1192
|
+
type ChatCompletionAudio as ChatCompletionAudio,
|
|
1193
|
+
type ChatCompletionAudioParam as ChatCompletionAudioParam,
|
|
1194
|
+
type ChatCompletionChunk as ChatCompletionChunk,
|
|
1195
|
+
type ChatCompletionContentPart as ChatCompletionContentPart,
|
|
1196
|
+
type ChatCompletionContentPartImage as ChatCompletionContentPartImage,
|
|
1197
|
+
type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio,
|
|
1198
|
+
type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal,
|
|
1199
|
+
type ChatCompletionContentPartText as ChatCompletionContentPartText,
|
|
1200
|
+
type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption,
|
|
1201
|
+
type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam,
|
|
1202
|
+
type ChatCompletionMessage as ChatCompletionMessage,
|
|
1203
|
+
type ChatCompletionMessageParam as ChatCompletionMessageParam,
|
|
1204
|
+
type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall,
|
|
1205
|
+
type ChatCompletionModality as ChatCompletionModality,
|
|
1206
|
+
type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice,
|
|
1207
|
+
type ChatCompletionRole as ChatCompletionRole,
|
|
1208
|
+
type ChatCompletionStreamOptions as ChatCompletionStreamOptions,
|
|
1209
|
+
type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam,
|
|
1210
|
+
type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob,
|
|
1211
|
+
type ChatCompletionTool as ChatCompletionTool,
|
|
1212
|
+
type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption,
|
|
1213
|
+
type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam,
|
|
1214
|
+
type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam,
|
|
1215
|
+
type CreateChatCompletionRequestMessage as CreateChatCompletionRequestMessage,
|
|
1216
|
+
type ChatCompletionCreateParams as ChatCompletionCreateParams,
|
|
1217
|
+
type CompletionCreateParams as CompletionCreateParams,
|
|
1218
|
+
type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming,
|
|
1219
|
+
type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
|
|
1220
|
+
type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming,
|
|
1221
|
+
type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
|
|
1222
|
+
};
|
|
1224
1223
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export { Chat, type ChatModel } from './chat';
|
|
3
4
|
export {
|
|
4
|
-
ChatCompletion,
|
|
5
|
-
ChatCompletionAssistantMessageParam,
|
|
6
|
-
ChatCompletionAudio,
|
|
7
|
-
ChatCompletionAudioParam,
|
|
8
|
-
ChatCompletionChunk,
|
|
9
|
-
ChatCompletionContentPart,
|
|
10
|
-
ChatCompletionContentPartImage,
|
|
11
|
-
ChatCompletionContentPartInputAudio,
|
|
12
|
-
ChatCompletionContentPartRefusal,
|
|
13
|
-
ChatCompletionContentPartText,
|
|
14
|
-
ChatCompletionFunctionCallOption,
|
|
15
|
-
ChatCompletionFunctionMessageParam,
|
|
16
|
-
ChatCompletionMessage,
|
|
17
|
-
ChatCompletionMessageParam,
|
|
18
|
-
ChatCompletionMessageToolCall,
|
|
19
|
-
ChatCompletionModality,
|
|
20
|
-
ChatCompletionNamedToolChoice,
|
|
21
|
-
ChatCompletionRole,
|
|
22
|
-
ChatCompletionStreamOptions,
|
|
23
|
-
ChatCompletionSystemMessageParam,
|
|
24
|
-
ChatCompletionTokenLogprob,
|
|
25
|
-
ChatCompletionTool,
|
|
26
|
-
ChatCompletionToolChoiceOption,
|
|
27
|
-
ChatCompletionToolMessageParam,
|
|
28
|
-
ChatCompletionUserMessageParam,
|
|
29
|
-
CreateChatCompletionRequestMessage,
|
|
30
|
-
ChatCompletionCreateParams,
|
|
31
|
-
CompletionCreateParams,
|
|
32
|
-
ChatCompletionCreateParamsNonStreaming,
|
|
33
|
-
CompletionCreateParamsNonStreaming,
|
|
34
|
-
ChatCompletionCreateParamsStreaming,
|
|
35
|
-
CompletionCreateParamsStreaming,
|
|
36
5
|
Completions,
|
|
6
|
+
type ChatCompletion,
|
|
7
|
+
type ChatCompletionAssistantMessageParam,
|
|
8
|
+
type ChatCompletionAudio,
|
|
9
|
+
type ChatCompletionAudioParam,
|
|
10
|
+
type ChatCompletionChunk,
|
|
11
|
+
type ChatCompletionContentPart,
|
|
12
|
+
type ChatCompletionContentPartImage,
|
|
13
|
+
type ChatCompletionContentPartInputAudio,
|
|
14
|
+
type ChatCompletionContentPartRefusal,
|
|
15
|
+
type ChatCompletionContentPartText,
|
|
16
|
+
type ChatCompletionFunctionCallOption,
|
|
17
|
+
type ChatCompletionFunctionMessageParam,
|
|
18
|
+
type ChatCompletionMessage,
|
|
19
|
+
type ChatCompletionMessageParam,
|
|
20
|
+
type ChatCompletionMessageToolCall,
|
|
21
|
+
type ChatCompletionModality,
|
|
22
|
+
type ChatCompletionNamedToolChoice,
|
|
23
|
+
type ChatCompletionRole,
|
|
24
|
+
type ChatCompletionStreamOptions,
|
|
25
|
+
type ChatCompletionSystemMessageParam,
|
|
26
|
+
type ChatCompletionTokenLogprob,
|
|
27
|
+
type ChatCompletionTool,
|
|
28
|
+
type ChatCompletionToolChoiceOption,
|
|
29
|
+
type ChatCompletionToolMessageParam,
|
|
30
|
+
type ChatCompletionUserMessageParam,
|
|
31
|
+
type CreateChatCompletionRequestMessage,
|
|
32
|
+
type ChatCompletionCreateParams,
|
|
33
|
+
type CompletionCreateParams,
|
|
34
|
+
type ChatCompletionCreateParamsNonStreaming,
|
|
35
|
+
type CompletionCreateParamsNonStreaming,
|
|
36
|
+
type ChatCompletionCreateParamsStreaming,
|
|
37
|
+
type CompletionCreateParamsStreaming,
|
|
37
38
|
} from './completions';
|
|
38
|
-
export { ChatModel, Chat } from './chat';
|
|
@@ -361,11 +361,13 @@ export interface CompletionCreateParamsStreaming extends CompletionCreateParamsB
|
|
|
361
361
|
stream: true;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
-
export namespace Completions {
|
|
365
|
-
export
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
364
|
+
export declare namespace Completions {
|
|
365
|
+
export {
|
|
366
|
+
type Completion as Completion,
|
|
367
|
+
type CompletionChoice as CompletionChoice,
|
|
368
|
+
type CompletionUsage as CompletionUsage,
|
|
369
|
+
type CompletionCreateParams as CompletionCreateParams,
|
|
370
|
+
type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
|
|
371
|
+
type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
|
|
372
|
+
};
|
|
371
373
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../resource';
|
|
4
4
|
import * as Core from '../core';
|
|
5
|
-
import * as EmbeddingsAPI from './embeddings';
|
|
6
5
|
|
|
7
6
|
export class Embeddings extends APIResource {
|
|
8
7
|
/**
|
|
@@ -120,9 +119,11 @@ export interface EmbeddingCreateParams {
|
|
|
120
119
|
user?: string;
|
|
121
120
|
}
|
|
122
121
|
|
|
123
|
-
export namespace Embeddings {
|
|
124
|
-
export
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
export declare namespace Embeddings {
|
|
123
|
+
export {
|
|
124
|
+
type CreateEmbeddingResponse as CreateEmbeddingResponse,
|
|
125
|
+
type Embedding as Embedding,
|
|
126
|
+
type EmbeddingModel as EmbeddingModel,
|
|
127
|
+
type EmbeddingCreateParams as EmbeddingCreateParams,
|
|
128
|
+
};
|
|
128
129
|
}
|
package/src/resources/files.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { isRequestOptions } from '../core';
|
|
|
5
5
|
import { sleep } from '../core';
|
|
6
6
|
import { APIConnectionTimeoutError } from '../error';
|
|
7
7
|
import * as Core from '../core';
|
|
8
|
-
import * as FilesAPI from './files';
|
|
9
8
|
import { Page } from '../pagination';
|
|
10
9
|
import { type Response } from '../_shims/index';
|
|
11
10
|
|
|
@@ -221,12 +220,16 @@ export interface FileListParams {
|
|
|
221
220
|
purpose?: string;
|
|
222
221
|
}
|
|
223
222
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
export
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
223
|
+
Files.FileObjectsPage = FileObjectsPage;
|
|
224
|
+
|
|
225
|
+
export declare namespace Files {
|
|
226
|
+
export {
|
|
227
|
+
type FileContent as FileContent,
|
|
228
|
+
type FileDeleted as FileDeleted,
|
|
229
|
+
type FileObject as FileObject,
|
|
230
|
+
type FilePurpose as FilePurpose,
|
|
231
|
+
FileObjectsPage as FileObjectsPage,
|
|
232
|
+
type FileCreateParams as FileCreateParams,
|
|
233
|
+
type FileListParams as FileListParams,
|
|
234
|
+
};
|
|
232
235
|
}
|
|
@@ -2,21 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as JobsAPI from './jobs/jobs';
|
|
5
|
+
import {
|
|
6
|
+
FineTuningJob,
|
|
7
|
+
FineTuningJobEvent,
|
|
8
|
+
FineTuningJobEventsPage,
|
|
9
|
+
FineTuningJobIntegration,
|
|
10
|
+
FineTuningJobWandbIntegration,
|
|
11
|
+
FineTuningJobWandbIntegrationObject,
|
|
12
|
+
FineTuningJobsPage,
|
|
13
|
+
JobCreateParams,
|
|
14
|
+
JobListEventsParams,
|
|
15
|
+
JobListParams,
|
|
16
|
+
Jobs,
|
|
17
|
+
} from './jobs/jobs';
|
|
5
18
|
|
|
6
19
|
export class FineTuning extends APIResource {
|
|
7
20
|
jobs: JobsAPI.Jobs = new JobsAPI.Jobs(this._client);
|
|
8
21
|
}
|
|
9
22
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
FineTuning.Jobs = Jobs;
|
|
24
|
+
FineTuning.FineTuningJobsPage = FineTuningJobsPage;
|
|
25
|
+
FineTuning.FineTuningJobEventsPage = FineTuningJobEventsPage;
|
|
26
|
+
|
|
27
|
+
export declare namespace FineTuning {
|
|
28
|
+
export {
|
|
29
|
+
Jobs as Jobs,
|
|
30
|
+
type FineTuningJob as FineTuningJob,
|
|
31
|
+
type FineTuningJobEvent as FineTuningJobEvent,
|
|
32
|
+
type FineTuningJobIntegration as FineTuningJobIntegration,
|
|
33
|
+
type FineTuningJobWandbIntegration as FineTuningJobWandbIntegration,
|
|
34
|
+
type FineTuningJobWandbIntegrationObject as FineTuningJobWandbIntegrationObject,
|
|
35
|
+
FineTuningJobsPage as FineTuningJobsPage,
|
|
36
|
+
FineTuningJobEventsPage as FineTuningJobEventsPage,
|
|
37
|
+
type JobCreateParams as JobCreateParams,
|
|
38
|
+
type JobListParams as JobListParams,
|
|
39
|
+
type JobListEventsParams as JobListEventsParams,
|
|
40
|
+
};
|
|
22
41
|
}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
export { FineTuning } from './fine-tuning';
|
|
4
4
|
export {
|
|
5
|
-
FineTuningJob,
|
|
6
|
-
FineTuningJobEvent,
|
|
7
|
-
FineTuningJobIntegration,
|
|
8
|
-
FineTuningJobWandbIntegration,
|
|
9
|
-
FineTuningJobWandbIntegrationObject,
|
|
10
|
-
JobCreateParams,
|
|
11
|
-
JobListParams,
|
|
12
|
-
JobListEventsParams,
|
|
13
5
|
FineTuningJobsPage,
|
|
14
6
|
FineTuningJobEventsPage,
|
|
15
7
|
Jobs,
|
|
8
|
+
type FineTuningJob,
|
|
9
|
+
type FineTuningJobEvent,
|
|
10
|
+
type FineTuningJobIntegration,
|
|
11
|
+
type FineTuningJobWandbIntegration,
|
|
12
|
+
type FineTuningJobWandbIntegrationObject,
|
|
13
|
+
type JobCreateParams,
|
|
14
|
+
type JobListParams,
|
|
15
|
+
type JobListEventsParams,
|
|
16
16
|
} from './jobs/index';
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../../core';
|
|
5
5
|
import * as Core from '../../../core';
|
|
6
|
-
import * as CheckpointsAPI from './checkpoints';
|
|
7
6
|
import { CursorPage, type CursorPageParams } from '../../../pagination';
|
|
8
7
|
|
|
9
8
|
export class Checkpoints extends APIResource {
|
|
@@ -101,8 +100,12 @@ export namespace FineTuningJobCheckpoint {
|
|
|
101
100
|
|
|
102
101
|
export interface CheckpointListParams extends CursorPageParams {}
|
|
103
102
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
export
|
|
103
|
+
Checkpoints.FineTuningJobCheckpointsPage = FineTuningJobCheckpointsPage;
|
|
104
|
+
|
|
105
|
+
export declare namespace Checkpoints {
|
|
106
|
+
export {
|
|
107
|
+
type FineTuningJobCheckpoint as FineTuningJobCheckpoint,
|
|
108
|
+
FineTuningJobCheckpointsPage as FineTuningJobCheckpointsPage,
|
|
109
|
+
type CheckpointListParams as CheckpointListParams,
|
|
110
|
+
};
|
|
108
111
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
JobListParams,
|
|
11
|
-
JobListEventsParams,
|
|
4
|
+
FineTuningJobCheckpointsPage,
|
|
5
|
+
Checkpoints,
|
|
6
|
+
type FineTuningJobCheckpoint,
|
|
7
|
+
type CheckpointListParams,
|
|
8
|
+
} from './checkpoints';
|
|
9
|
+
export {
|
|
12
10
|
FineTuningJobsPage,
|
|
13
11
|
FineTuningJobEventsPage,
|
|
14
12
|
Jobs,
|
|
13
|
+
type FineTuningJob,
|
|
14
|
+
type FineTuningJobEvent,
|
|
15
|
+
type FineTuningJobIntegration,
|
|
16
|
+
type FineTuningJobWandbIntegration,
|
|
17
|
+
type FineTuningJobWandbIntegrationObject,
|
|
18
|
+
type JobCreateParams,
|
|
19
|
+
type JobListParams,
|
|
20
|
+
type JobListEventsParams,
|
|
15
21
|
} from './jobs';
|
|
16
|
-
export {
|
|
17
|
-
FineTuningJobCheckpoint,
|
|
18
|
-
CheckpointListParams,
|
|
19
|
-
FineTuningJobCheckpointsPage,
|
|
20
|
-
Checkpoints,
|
|
21
|
-
} from './checkpoints';
|