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
package/src/index.ts
CHANGED
|
@@ -1,12 +1,108 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
import * as Errors from './error';
|
|
4
|
-
import * as Uploads from './uploads';
|
|
5
3
|
import { type Agent, type RequestInit } from './_shims/index';
|
|
6
4
|
import * as qs from './internal/qs';
|
|
7
5
|
import * as Core from './core';
|
|
6
|
+
import * as Errors from './error';
|
|
8
7
|
import * as Pagination from './pagination';
|
|
8
|
+
import { type CursorPageParams, CursorPageResponse, PageResponse } from './pagination';
|
|
9
|
+
import * as Uploads from './uploads';
|
|
9
10
|
import * as API from './resources/index';
|
|
11
|
+
import {
|
|
12
|
+
Batch,
|
|
13
|
+
BatchCreateParams,
|
|
14
|
+
BatchError,
|
|
15
|
+
BatchListParams,
|
|
16
|
+
BatchRequestCounts,
|
|
17
|
+
Batches,
|
|
18
|
+
BatchesPage,
|
|
19
|
+
} from './resources/batches';
|
|
20
|
+
import {
|
|
21
|
+
Completion,
|
|
22
|
+
CompletionChoice,
|
|
23
|
+
CompletionCreateParams,
|
|
24
|
+
CompletionCreateParamsNonStreaming,
|
|
25
|
+
CompletionCreateParamsStreaming,
|
|
26
|
+
CompletionUsage,
|
|
27
|
+
Completions,
|
|
28
|
+
} from './resources/completions';
|
|
29
|
+
import {
|
|
30
|
+
CreateEmbeddingResponse,
|
|
31
|
+
Embedding,
|
|
32
|
+
EmbeddingCreateParams,
|
|
33
|
+
EmbeddingModel,
|
|
34
|
+
Embeddings,
|
|
35
|
+
} from './resources/embeddings';
|
|
36
|
+
import {
|
|
37
|
+
FileContent,
|
|
38
|
+
FileCreateParams,
|
|
39
|
+
FileDeleted,
|
|
40
|
+
FileListParams,
|
|
41
|
+
FileObject,
|
|
42
|
+
FileObjectsPage,
|
|
43
|
+
FilePurpose,
|
|
44
|
+
Files,
|
|
45
|
+
} from './resources/files';
|
|
46
|
+
import {
|
|
47
|
+
Image,
|
|
48
|
+
ImageCreateVariationParams,
|
|
49
|
+
ImageEditParams,
|
|
50
|
+
ImageGenerateParams,
|
|
51
|
+
ImageModel,
|
|
52
|
+
Images,
|
|
53
|
+
ImagesResponse,
|
|
54
|
+
} from './resources/images';
|
|
55
|
+
import { Model, ModelDeleted, Models, ModelsPage } from './resources/models';
|
|
56
|
+
import {
|
|
57
|
+
Moderation,
|
|
58
|
+
ModerationCreateParams,
|
|
59
|
+
ModerationCreateResponse,
|
|
60
|
+
ModerationImageURLInput,
|
|
61
|
+
ModerationModel,
|
|
62
|
+
ModerationMultiModalInput,
|
|
63
|
+
ModerationTextInput,
|
|
64
|
+
Moderations,
|
|
65
|
+
} from './resources/moderations';
|
|
66
|
+
import { Audio, AudioModel, AudioResponseFormat } from './resources/audio/audio';
|
|
67
|
+
import { Beta } from './resources/beta/beta';
|
|
68
|
+
import { Chat, ChatModel } from './resources/chat/chat';
|
|
69
|
+
import {
|
|
70
|
+
ChatCompletion,
|
|
71
|
+
ChatCompletionAssistantMessageParam,
|
|
72
|
+
ChatCompletionAudio,
|
|
73
|
+
ChatCompletionAudioParam,
|
|
74
|
+
ChatCompletionChunk,
|
|
75
|
+
ChatCompletionContentPart,
|
|
76
|
+
ChatCompletionContentPartImage,
|
|
77
|
+
ChatCompletionContentPartInputAudio,
|
|
78
|
+
ChatCompletionContentPartRefusal,
|
|
79
|
+
ChatCompletionContentPartText,
|
|
80
|
+
ChatCompletionCreateParams,
|
|
81
|
+
ChatCompletionCreateParamsNonStreaming,
|
|
82
|
+
ChatCompletionCreateParamsStreaming,
|
|
83
|
+
ChatCompletionFunctionCallOption,
|
|
84
|
+
ChatCompletionFunctionMessageParam,
|
|
85
|
+
ChatCompletionMessage,
|
|
86
|
+
ChatCompletionMessageParam,
|
|
87
|
+
ChatCompletionMessageToolCall,
|
|
88
|
+
ChatCompletionModality,
|
|
89
|
+
ChatCompletionNamedToolChoice,
|
|
90
|
+
ChatCompletionRole,
|
|
91
|
+
ChatCompletionStreamOptions,
|
|
92
|
+
ChatCompletionSystemMessageParam,
|
|
93
|
+
ChatCompletionTokenLogprob,
|
|
94
|
+
ChatCompletionTool,
|
|
95
|
+
ChatCompletionToolChoiceOption,
|
|
96
|
+
ChatCompletionToolMessageParam,
|
|
97
|
+
ChatCompletionUserMessageParam,
|
|
98
|
+
} from './resources/chat/completions';
|
|
99
|
+
import { FineTuning } from './resources/fine-tuning/fine-tuning';
|
|
100
|
+
import {
|
|
101
|
+
Upload,
|
|
102
|
+
UploadCompleteParams,
|
|
103
|
+
UploadCreateParams,
|
|
104
|
+
Uploads as UploadsAPIUploads,
|
|
105
|
+
} from './resources/uploads/uploads';
|
|
10
106
|
|
|
11
107
|
export interface ClientOptions {
|
|
12
108
|
/**
|
|
@@ -209,7 +305,7 @@ export class OpenAI extends Core.APIClient {
|
|
|
209
305
|
static fileFromPath = Uploads.fileFromPath;
|
|
210
306
|
}
|
|
211
307
|
|
|
212
|
-
export
|
|
308
|
+
export {
|
|
213
309
|
OpenAIError,
|
|
214
310
|
APIError,
|
|
215
311
|
APIConnectionError,
|
|
@@ -223,124 +319,155 @@ export const {
|
|
|
223
319
|
InternalServerError,
|
|
224
320
|
PermissionDeniedError,
|
|
225
321
|
UnprocessableEntityError,
|
|
226
|
-
}
|
|
322
|
+
} from './error';
|
|
227
323
|
|
|
228
324
|
export import toFile = Uploads.toFile;
|
|
229
325
|
export import fileFromPath = Uploads.fileFromPath;
|
|
230
326
|
|
|
231
|
-
|
|
232
|
-
|
|
327
|
+
OpenAI.Completions = Completions;
|
|
328
|
+
OpenAI.Chat = Chat;
|
|
329
|
+
OpenAI.Embeddings = Embeddings;
|
|
330
|
+
OpenAI.Files = Files;
|
|
331
|
+
OpenAI.FileObjectsPage = FileObjectsPage;
|
|
332
|
+
OpenAI.Images = Images;
|
|
333
|
+
OpenAI.Audio = Audio;
|
|
334
|
+
OpenAI.Moderations = Moderations;
|
|
335
|
+
OpenAI.Models = Models;
|
|
336
|
+
OpenAI.ModelsPage = ModelsPage;
|
|
337
|
+
OpenAI.FineTuning = FineTuning;
|
|
338
|
+
OpenAI.Beta = Beta;
|
|
339
|
+
OpenAI.Batches = Batches;
|
|
340
|
+
OpenAI.BatchesPage = BatchesPage;
|
|
341
|
+
OpenAI.Uploads = UploadsAPIUploads;
|
|
342
|
+
|
|
343
|
+
export declare namespace OpenAI {
|
|
344
|
+
export type RequestOptions = Core.RequestOptions;
|
|
233
345
|
|
|
234
346
|
export import Page = Pagination.Page;
|
|
235
|
-
export
|
|
347
|
+
export { type PageResponse as PageResponse };
|
|
236
348
|
|
|
237
349
|
export import CursorPage = Pagination.CursorPage;
|
|
238
|
-
export
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
export
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
export
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
export
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
export
|
|
313
|
-
|
|
314
|
-
export
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
export
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
export
|
|
335
|
-
|
|
336
|
-
export
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
350
|
+
export { type CursorPageParams as CursorPageParams, type CursorPageResponse as CursorPageResponse };
|
|
351
|
+
|
|
352
|
+
export {
|
|
353
|
+
Completions as Completions,
|
|
354
|
+
type Completion as Completion,
|
|
355
|
+
type CompletionChoice as CompletionChoice,
|
|
356
|
+
type CompletionUsage as CompletionUsage,
|
|
357
|
+
type CompletionCreateParams as CompletionCreateParams,
|
|
358
|
+
type CompletionCreateParamsNonStreaming as CompletionCreateParamsNonStreaming,
|
|
359
|
+
type CompletionCreateParamsStreaming as CompletionCreateParamsStreaming,
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
export {
|
|
363
|
+
Chat as Chat,
|
|
364
|
+
type ChatModel as ChatModel,
|
|
365
|
+
type ChatCompletion as ChatCompletion,
|
|
366
|
+
type ChatCompletionAssistantMessageParam as ChatCompletionAssistantMessageParam,
|
|
367
|
+
type ChatCompletionAudio as ChatCompletionAudio,
|
|
368
|
+
type ChatCompletionAudioParam as ChatCompletionAudioParam,
|
|
369
|
+
type ChatCompletionChunk as ChatCompletionChunk,
|
|
370
|
+
type ChatCompletionContentPart as ChatCompletionContentPart,
|
|
371
|
+
type ChatCompletionContentPartImage as ChatCompletionContentPartImage,
|
|
372
|
+
type ChatCompletionContentPartInputAudio as ChatCompletionContentPartInputAudio,
|
|
373
|
+
type ChatCompletionContentPartRefusal as ChatCompletionContentPartRefusal,
|
|
374
|
+
type ChatCompletionContentPartText as ChatCompletionContentPartText,
|
|
375
|
+
type ChatCompletionFunctionCallOption as ChatCompletionFunctionCallOption,
|
|
376
|
+
type ChatCompletionFunctionMessageParam as ChatCompletionFunctionMessageParam,
|
|
377
|
+
type ChatCompletionMessage as ChatCompletionMessage,
|
|
378
|
+
type ChatCompletionMessageParam as ChatCompletionMessageParam,
|
|
379
|
+
type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall,
|
|
380
|
+
type ChatCompletionModality as ChatCompletionModality,
|
|
381
|
+
type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice,
|
|
382
|
+
type ChatCompletionRole as ChatCompletionRole,
|
|
383
|
+
type ChatCompletionStreamOptions as ChatCompletionStreamOptions,
|
|
384
|
+
type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam,
|
|
385
|
+
type ChatCompletionTokenLogprob as ChatCompletionTokenLogprob,
|
|
386
|
+
type ChatCompletionTool as ChatCompletionTool,
|
|
387
|
+
type ChatCompletionToolChoiceOption as ChatCompletionToolChoiceOption,
|
|
388
|
+
type ChatCompletionToolMessageParam as ChatCompletionToolMessageParam,
|
|
389
|
+
type ChatCompletionUserMessageParam as ChatCompletionUserMessageParam,
|
|
390
|
+
type ChatCompletionCreateParams as ChatCompletionCreateParams,
|
|
391
|
+
type ChatCompletionCreateParamsNonStreaming as ChatCompletionCreateParamsNonStreaming,
|
|
392
|
+
type ChatCompletionCreateParamsStreaming as ChatCompletionCreateParamsStreaming,
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
export {
|
|
396
|
+
Embeddings as Embeddings,
|
|
397
|
+
type CreateEmbeddingResponse as CreateEmbeddingResponse,
|
|
398
|
+
type Embedding as Embedding,
|
|
399
|
+
type EmbeddingModel as EmbeddingModel,
|
|
400
|
+
type EmbeddingCreateParams as EmbeddingCreateParams,
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
export {
|
|
404
|
+
Files as Files,
|
|
405
|
+
type FileContent as FileContent,
|
|
406
|
+
type FileDeleted as FileDeleted,
|
|
407
|
+
type FileObject as FileObject,
|
|
408
|
+
type FilePurpose as FilePurpose,
|
|
409
|
+
FileObjectsPage as FileObjectsPage,
|
|
410
|
+
type FileCreateParams as FileCreateParams,
|
|
411
|
+
type FileListParams as FileListParams,
|
|
412
|
+
};
|
|
413
|
+
|
|
414
|
+
export {
|
|
415
|
+
Images as Images,
|
|
416
|
+
type Image as Image,
|
|
417
|
+
type ImageModel as ImageModel,
|
|
418
|
+
type ImagesResponse as ImagesResponse,
|
|
419
|
+
type ImageCreateVariationParams as ImageCreateVariationParams,
|
|
420
|
+
type ImageEditParams as ImageEditParams,
|
|
421
|
+
type ImageGenerateParams as ImageGenerateParams,
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
export { Audio as Audio, type AudioModel as AudioModel, type AudioResponseFormat as AudioResponseFormat };
|
|
425
|
+
|
|
426
|
+
export {
|
|
427
|
+
Moderations as Moderations,
|
|
428
|
+
type Moderation as Moderation,
|
|
429
|
+
type ModerationImageURLInput as ModerationImageURLInput,
|
|
430
|
+
type ModerationModel as ModerationModel,
|
|
431
|
+
type ModerationMultiModalInput as ModerationMultiModalInput,
|
|
432
|
+
type ModerationTextInput as ModerationTextInput,
|
|
433
|
+
type ModerationCreateResponse as ModerationCreateResponse,
|
|
434
|
+
type ModerationCreateParams as ModerationCreateParams,
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
export {
|
|
438
|
+
Models as Models,
|
|
439
|
+
type Model as Model,
|
|
440
|
+
type ModelDeleted as ModelDeleted,
|
|
441
|
+
ModelsPage as ModelsPage,
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
export { FineTuning as FineTuning };
|
|
445
|
+
|
|
446
|
+
export { Beta as Beta };
|
|
447
|
+
|
|
448
|
+
export {
|
|
449
|
+
Batches as Batches,
|
|
450
|
+
type Batch as Batch,
|
|
451
|
+
type BatchError as BatchError,
|
|
452
|
+
type BatchRequestCounts as BatchRequestCounts,
|
|
453
|
+
BatchesPage as BatchesPage,
|
|
454
|
+
type BatchCreateParams as BatchCreateParams,
|
|
455
|
+
type BatchListParams as BatchListParams,
|
|
456
|
+
};
|
|
457
|
+
|
|
458
|
+
export {
|
|
459
|
+
UploadsAPIUploads as Uploads,
|
|
460
|
+
type Upload as Upload,
|
|
461
|
+
type UploadCreateParams as UploadCreateParams,
|
|
462
|
+
type UploadCompleteParams as UploadCompleteParams,
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
export type ErrorObject = API.ErrorObject;
|
|
466
|
+
export type FunctionDefinition = API.FunctionDefinition;
|
|
467
|
+
export type FunctionParameters = API.FunctionParameters;
|
|
468
|
+
export type ResponseFormatJSONObject = API.ResponseFormatJSONObject;
|
|
469
|
+
export type ResponseFormatJSONSchema = API.ResponseFormatJSONSchema;
|
|
470
|
+
export type ResponseFormatText = API.ResponseFormatText;
|
|
344
471
|
}
|
|
345
472
|
|
|
346
473
|
// ---------------------- Azure ----------------------
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Text,
|
|
7
7
|
ImageFile,
|
|
8
8
|
TextDelta,
|
|
9
|
-
|
|
9
|
+
MessageDelta,
|
|
10
10
|
MessageContent,
|
|
11
11
|
} from "../resources/beta/threads/messages";
|
|
12
12
|
import * as Core from "../core";
|
|
@@ -31,7 +31,6 @@ import {
|
|
|
31
31
|
import { RunStep, RunStepDelta, ToolCall, ToolCallDelta } from "../resources/beta/threads/runs/steps";
|
|
32
32
|
import { ThreadCreateAndRunParamsBase, Threads } from "../resources/beta/threads/threads";
|
|
33
33
|
import { BaseEvents, EventStream } from './EventStream';
|
|
34
|
-
import MessageDelta = Messages.MessageDelta;
|
|
35
34
|
|
|
36
35
|
export interface AssistantStreamEvents extends BaseEvents {
|
|
37
36
|
run: (run: Run) => void;
|
|
@@ -1,10 +1,26 @@
|
|
|
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 AudioAPI from './audio';
|
|
5
4
|
import * as SpeechAPI from './speech';
|
|
5
|
+
import { Speech, SpeechCreateParams, SpeechModel } from './speech';
|
|
6
6
|
import * as TranscriptionsAPI from './transcriptions';
|
|
7
|
+
import {
|
|
8
|
+
Transcription,
|
|
9
|
+
TranscriptionCreateParams,
|
|
10
|
+
TranscriptionCreateResponse,
|
|
11
|
+
TranscriptionSegment,
|
|
12
|
+
TranscriptionVerbose,
|
|
13
|
+
TranscriptionWord,
|
|
14
|
+
Transcriptions,
|
|
15
|
+
} from './transcriptions';
|
|
7
16
|
import * as TranslationsAPI from './translations';
|
|
17
|
+
import {
|
|
18
|
+
Translation,
|
|
19
|
+
TranslationCreateParams,
|
|
20
|
+
TranslationCreateResponse,
|
|
21
|
+
TranslationVerbose,
|
|
22
|
+
Translations,
|
|
23
|
+
} from './translations';
|
|
8
24
|
|
|
9
25
|
export class Audio extends APIResource {
|
|
10
26
|
transcriptions: TranscriptionsAPI.Transcriptions = new TranscriptionsAPI.Transcriptions(this._client);
|
|
@@ -20,30 +36,30 @@ export type AudioModel = 'whisper-1';
|
|
|
20
36
|
*/
|
|
21
37
|
export type AudioResponseFormat = 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt';
|
|
22
38
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export
|
|
39
|
+
Audio.Transcriptions = Transcriptions;
|
|
40
|
+
Audio.Translations = Translations;
|
|
41
|
+
Audio.Speech = Speech;
|
|
42
|
+
|
|
43
|
+
export declare namespace Audio {
|
|
44
|
+
export { type AudioModel as AudioModel, type AudioResponseFormat as AudioResponseFormat };
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
Transcriptions as Transcriptions,
|
|
48
|
+
type Transcription as Transcription,
|
|
49
|
+
type TranscriptionSegment as TranscriptionSegment,
|
|
50
|
+
type TranscriptionVerbose as TranscriptionVerbose,
|
|
51
|
+
type TranscriptionWord as TranscriptionWord,
|
|
52
|
+
type TranscriptionCreateResponse as TranscriptionCreateResponse,
|
|
53
|
+
type TranscriptionCreateParams as TranscriptionCreateParams,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export {
|
|
57
|
+
Translations as Translations,
|
|
58
|
+
type Translation as Translation,
|
|
59
|
+
type TranslationVerbose as TranslationVerbose,
|
|
60
|
+
type TranslationCreateResponse as TranslationCreateResponse,
|
|
61
|
+
type TranslationCreateParams as TranslationCreateParams,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export { Speech as Speech, type SpeechModel as SpeechModel, type SpeechCreateParams as SpeechCreateParams };
|
|
49
65
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { AudioModel, AudioResponseFormat
|
|
4
|
-
export { SpeechModel, SpeechCreateParams
|
|
3
|
+
export { Audio, type AudioModel, type AudioResponseFormat } from './audio';
|
|
4
|
+
export { Speech, type SpeechModel, type SpeechCreateParams } from './speech';
|
|
5
5
|
export {
|
|
6
|
-
Transcription,
|
|
7
|
-
TranscriptionSegment,
|
|
8
|
-
TranscriptionVerbose,
|
|
9
|
-
TranscriptionWord,
|
|
10
|
-
TranscriptionCreateResponse,
|
|
11
|
-
TranscriptionCreateParams,
|
|
12
6
|
Transcriptions,
|
|
7
|
+
type Transcription,
|
|
8
|
+
type TranscriptionSegment,
|
|
9
|
+
type TranscriptionVerbose,
|
|
10
|
+
type TranscriptionWord,
|
|
11
|
+
type TranscriptionCreateResponse,
|
|
12
|
+
type TranscriptionCreateParams,
|
|
13
13
|
} from './transcriptions';
|
|
14
14
|
export {
|
|
15
|
-
Translation,
|
|
16
|
-
TranslationVerbose,
|
|
17
|
-
TranslationCreateResponse,
|
|
18
|
-
TranslationCreateParams,
|
|
19
15
|
Translations,
|
|
16
|
+
type Translation,
|
|
17
|
+
type TranslationVerbose,
|
|
18
|
+
type TranslationCreateResponse,
|
|
19
|
+
type TranslationCreateParams,
|
|
20
20
|
} from './translations';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as Core from '../../core';
|
|
5
|
-
import * as SpeechAPI from './speech';
|
|
6
5
|
import { type Response } from '../../_shims/index';
|
|
7
6
|
|
|
8
7
|
export class Speech extends APIResource {
|
|
@@ -49,7 +48,6 @@ export interface SpeechCreateParams {
|
|
|
49
48
|
speed?: number;
|
|
50
49
|
}
|
|
51
50
|
|
|
52
|
-
export namespace Speech {
|
|
53
|
-
export
|
|
54
|
-
export import SpeechCreateParams = SpeechAPI.SpeechCreateParams;
|
|
51
|
+
export declare namespace Speech {
|
|
52
|
+
export { type SpeechModel as SpeechModel, type SpeechCreateParams as SpeechCreateParams };
|
|
55
53
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as Core from '../../core';
|
|
5
|
-
import * as TranscriptionsAPI from './transcriptions';
|
|
6
5
|
import * as AudioAPI from './audio';
|
|
7
6
|
|
|
8
7
|
export class Transcriptions extends APIResource {
|
|
@@ -205,15 +204,13 @@ export interface TranscriptionCreateParams<
|
|
|
205
204
|
timestamp_granularities?: Array<'word' | 'segment'>;
|
|
206
205
|
}
|
|
207
206
|
|
|
208
|
-
export namespace Transcriptions {
|
|
209
|
-
export
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
| undefined,
|
|
218
|
-
> = TranscriptionsAPI.TranscriptionCreateParams<ResponseFormat>;
|
|
207
|
+
export declare namespace Transcriptions {
|
|
208
|
+
export {
|
|
209
|
+
type Transcription as Transcription,
|
|
210
|
+
type TranscriptionSegment as TranscriptionSegment,
|
|
211
|
+
type TranscriptionVerbose as TranscriptionVerbose,
|
|
212
|
+
type TranscriptionWord as TranscriptionWord,
|
|
213
|
+
type TranscriptionCreateResponse as TranscriptionCreateResponse,
|
|
214
|
+
type TranscriptionCreateParams as TranscriptionCreateParams,
|
|
215
|
+
};
|
|
219
216
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as Core from '../../core';
|
|
5
|
-
import * as TranslationsAPI from './translations';
|
|
6
5
|
import * as AudioAPI from './audio';
|
|
7
6
|
import * as TranscriptionsAPI from './transcriptions';
|
|
8
7
|
|
|
@@ -98,13 +97,11 @@ export interface TranslationCreateParams<
|
|
|
98
97
|
temperature?: number;
|
|
99
98
|
}
|
|
100
99
|
|
|
101
|
-
export namespace Translations {
|
|
102
|
-
export
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
| undefined,
|
|
109
|
-
> = TranslationsAPI.TranslationCreateParams<ResponseFormat>;
|
|
100
|
+
export declare namespace Translations {
|
|
101
|
+
export {
|
|
102
|
+
type Translation as Translation,
|
|
103
|
+
type TranslationVerbose as TranslationVerbose,
|
|
104
|
+
type TranslationCreateResponse as TranslationCreateResponse,
|
|
105
|
+
type TranslationCreateParams as TranslationCreateParams,
|
|
106
|
+
};
|
|
110
107
|
}
|
package/src/resources/batches.ts
CHANGED
|
@@ -244,11 +244,15 @@ export interface BatchCreateParams {
|
|
|
244
244
|
|
|
245
245
|
export interface BatchListParams extends CursorPageParams {}
|
|
246
246
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
export
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
247
|
+
Batches.BatchesPage = BatchesPage;
|
|
248
|
+
|
|
249
|
+
export declare namespace Batches {
|
|
250
|
+
export {
|
|
251
|
+
type Batch as Batch,
|
|
252
|
+
type BatchError as BatchError,
|
|
253
|
+
type BatchRequestCounts as BatchRequestCounts,
|
|
254
|
+
BatchesPage as BatchesPage,
|
|
255
|
+
type BatchCreateParams as BatchCreateParams,
|
|
256
|
+
type BatchListParams as BatchListParams,
|
|
257
|
+
};
|
|
254
258
|
}
|