openai 4.67.2 → 4.68.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 +16 -0
- package/README.md +1 -1
- package/core.d.ts +1 -1
- package/core.d.ts.map +1 -1
- package/core.js +1 -1
- package/core.js.map +1 -1
- package/core.mjs +1 -1
- package/core.mjs.map +1 -1
- package/index.d.mts +4 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/lib/AbstractChatCompletionRunner.js +1 -0
- package/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/lib/AbstractChatCompletionRunner.mjs +1 -0
- package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/assistants.d.ts +8 -0
- 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/chat/chat.d.ts +5 -1
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +129 -5
- 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/chat/index.d.ts +1 -1
- package/resources/chat/index.d.ts.map +1 -1
- package/resources/chat/index.js.map +1 -1
- package/resources/chat/index.mjs.map +1 -1
- package/src/core.ts +2 -2
- package/src/index.ts +4 -0
- package/src/lib/AbstractChatCompletionRunner.ts +3 -1
- package/src/resources/beta/assistants.ts +10 -0
- package/src/resources/chat/chat.ts +7 -0
- package/src/resources/chat/completions.ts +148 -5
- package/src/resources/chat/index.ts +4 -0
- 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":"index.d.ts","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,mCAAmC,EACnC,mBAAmB,EACnB,yBAAyB,EACzB,8BAA8B,EAC9B,gCAAgC,EAChC,6BAA6B,EAC7B,gCAAgC,EAChC,kCAAkC,EAClC,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,6BAA6B,EAC7B,kBAAkB,EAClB,2BAA2B,EAC3B,gCAAgC,EAChC,0BAA0B,EAC1B,kBAAkB,EAClB,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,kCAAkC,EAClC,0BAA0B,EAC1B,sBAAsB,EACtB,sCAAsC,EACtC,kCAAkC,EAClC,mCAAmC,EACnC,+BAA+B,EAC/B,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,cAAc,EACd,mCAAmC,EACnC,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,8BAA8B,EAC9B,mCAAmC,EACnC,gCAAgC,EAChC,6BAA6B,EAC7B,gCAAgC,EAChC,kCAAkC,EAClC,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,sBAAsB,EACtB,6BAA6B,EAC7B,kBAAkB,EAClB,2BAA2B,EAC3B,gCAAgC,EAChC,0BAA0B,EAC1B,kBAAkB,EAClB,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,kCAAkC,EAClC,0BAA0B,EAC1B,sBAAsB,EACtB,sCAAsC,EACtC,kCAAkC,EAClC,mCAAmC,EACnC,+BAA+B,EAC/B,WAAW,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAkCuB;AADrB,0GAAA,WAAW,OAAA;AAEb,kCAAyC;AAArB,4FAAA,IAAI,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/chat/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAiCL,WAAW,GACZ;OACM,EAAa,IAAI,EAAE"}
|
package/src/core.ts
CHANGED
|
@@ -116,9 +116,9 @@ export class APIPromise<T> extends Promise<WithRequestID<T>> {
|
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
_thenUnwrap<U>(transform: (data: T) => U): APIPromise<U> {
|
|
119
|
+
_thenUnwrap<U>(transform: (data: T, props: APIResponseProps) => U): APIPromise<U> {
|
|
120
120
|
return new APIPromise(this.responsePromise, async (props) =>
|
|
121
|
-
_addRequestID(transform(await this.parseResponse(props)), props.response),
|
|
121
|
+
_addRequestID(transform(await this.parseResponse(props), props), props.response),
|
|
122
122
|
);
|
|
123
123
|
}
|
|
124
124
|
|
package/src/index.ts
CHANGED
|
@@ -250,9 +250,12 @@ export namespace OpenAI {
|
|
|
250
250
|
export import ChatModel = API.ChatModel;
|
|
251
251
|
export import ChatCompletion = API.ChatCompletion;
|
|
252
252
|
export import ChatCompletionAssistantMessageParam = API.ChatCompletionAssistantMessageParam;
|
|
253
|
+
export import ChatCompletionAudio = API.ChatCompletionAudio;
|
|
254
|
+
export import ChatCompletionAudioParam = API.ChatCompletionAudioParam;
|
|
253
255
|
export import ChatCompletionChunk = API.ChatCompletionChunk;
|
|
254
256
|
export import ChatCompletionContentPart = API.ChatCompletionContentPart;
|
|
255
257
|
export import ChatCompletionContentPartImage = API.ChatCompletionContentPartImage;
|
|
258
|
+
export import ChatCompletionContentPartInputAudio = API.ChatCompletionContentPartInputAudio;
|
|
256
259
|
export import ChatCompletionContentPartRefusal = API.ChatCompletionContentPartRefusal;
|
|
257
260
|
export import ChatCompletionContentPartText = API.ChatCompletionContentPartText;
|
|
258
261
|
export import ChatCompletionFunctionCallOption = API.ChatCompletionFunctionCallOption;
|
|
@@ -260,6 +263,7 @@ export namespace OpenAI {
|
|
|
260
263
|
export import ChatCompletionMessage = API.ChatCompletionMessage;
|
|
261
264
|
export import ChatCompletionMessageParam = API.ChatCompletionMessageParam;
|
|
262
265
|
export import ChatCompletionMessageToolCall = API.ChatCompletionMessageToolCall;
|
|
266
|
+
export import ChatCompletionModality = API.ChatCompletionModality;
|
|
263
267
|
export import ChatCompletionNamedToolChoice = API.ChatCompletionNamedToolChoice;
|
|
264
268
|
export import ChatCompletionRole = API.ChatCompletionRole;
|
|
265
269
|
export import ChatCompletionStreamOptions = API.ChatCompletionStreamOptions;
|
|
@@ -105,7 +105,9 @@ export class AbstractChatCompletionRunner<
|
|
|
105
105
|
const message = this.messages[i];
|
|
106
106
|
if (isAssistantMessage(message)) {
|
|
107
107
|
const { function_call, ...rest } = message;
|
|
108
|
-
|
|
108
|
+
|
|
109
|
+
// TODO: support audio here
|
|
110
|
+
const ret: Omit<ChatCompletionMessage, 'audio'> = {
|
|
109
111
|
...rest,
|
|
110
112
|
content: (message as ChatCompletionMessage).content ?? null,
|
|
111
113
|
refusal: (message as ChatCompletionMessage).refusal ?? null,
|
|
@@ -298,6 +298,11 @@ export namespace AssistantStreamEvent {
|
|
|
298
298
|
data: ThreadsAPI.Thread;
|
|
299
299
|
|
|
300
300
|
event: 'thread.created';
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Whether to enable input audio transcription.
|
|
304
|
+
*/
|
|
305
|
+
enabled?: boolean;
|
|
301
306
|
}
|
|
302
307
|
|
|
303
308
|
/**
|
|
@@ -1084,6 +1089,11 @@ export interface ThreadStreamEvent {
|
|
|
1084
1089
|
data: ThreadsAPI.Thread;
|
|
1085
1090
|
|
|
1086
1091
|
event: 'thread.created';
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* Whether to enable input audio transcription.
|
|
1095
|
+
*/
|
|
1096
|
+
enabled?: boolean;
|
|
1087
1097
|
}
|
|
1088
1098
|
|
|
1089
1099
|
export interface AssistantCreateParams {
|
|
@@ -16,7 +16,10 @@ export type ChatModel =
|
|
|
16
16
|
| 'gpt-4o'
|
|
17
17
|
| 'gpt-4o-2024-08-06'
|
|
18
18
|
| 'gpt-4o-2024-05-13'
|
|
19
|
+
| 'gpt-4o-realtime-preview'
|
|
19
20
|
| 'gpt-4o-realtime-preview-2024-10-01'
|
|
21
|
+
| 'gpt-4o-audio-preview'
|
|
22
|
+
| 'gpt-4o-audio-preview-2024-10-01'
|
|
20
23
|
| 'chatgpt-4o-latest'
|
|
21
24
|
| 'gpt-4o-mini'
|
|
22
25
|
| 'gpt-4o-mini-2024-07-18'
|
|
@@ -45,9 +48,12 @@ export namespace Chat {
|
|
|
45
48
|
export import Completions = CompletionsAPI.Completions;
|
|
46
49
|
export import ChatCompletion = CompletionsAPI.ChatCompletion;
|
|
47
50
|
export import ChatCompletionAssistantMessageParam = CompletionsAPI.ChatCompletionAssistantMessageParam;
|
|
51
|
+
export import ChatCompletionAudio = CompletionsAPI.ChatCompletionAudio;
|
|
52
|
+
export import ChatCompletionAudioParam = CompletionsAPI.ChatCompletionAudioParam;
|
|
48
53
|
export import ChatCompletionChunk = CompletionsAPI.ChatCompletionChunk;
|
|
49
54
|
export import ChatCompletionContentPart = CompletionsAPI.ChatCompletionContentPart;
|
|
50
55
|
export import ChatCompletionContentPartImage = CompletionsAPI.ChatCompletionContentPartImage;
|
|
56
|
+
export import ChatCompletionContentPartInputAudio = CompletionsAPI.ChatCompletionContentPartInputAudio;
|
|
51
57
|
export import ChatCompletionContentPartRefusal = CompletionsAPI.ChatCompletionContentPartRefusal;
|
|
52
58
|
export import ChatCompletionContentPartText = CompletionsAPI.ChatCompletionContentPartText;
|
|
53
59
|
export import ChatCompletionFunctionCallOption = CompletionsAPI.ChatCompletionFunctionCallOption;
|
|
@@ -55,6 +61,7 @@ export namespace Chat {
|
|
|
55
61
|
export import ChatCompletionMessage = CompletionsAPI.ChatCompletionMessage;
|
|
56
62
|
export import ChatCompletionMessageParam = CompletionsAPI.ChatCompletionMessageParam;
|
|
57
63
|
export import ChatCompletionMessageToolCall = CompletionsAPI.ChatCompletionMessageToolCall;
|
|
64
|
+
export import ChatCompletionModality = CompletionsAPI.ChatCompletionModality;
|
|
58
65
|
export import ChatCompletionNamedToolChoice = CompletionsAPI.ChatCompletionNamedToolChoice;
|
|
59
66
|
export import ChatCompletionRole = CompletionsAPI.ChatCompletionRole;
|
|
60
67
|
export import ChatCompletionStreamOptions = CompletionsAPI.ChatCompletionStreamOptions;
|
|
@@ -11,7 +11,10 @@ import { Stream } from '../../streaming';
|
|
|
11
11
|
|
|
12
12
|
export class Completions extends APIResource {
|
|
13
13
|
/**
|
|
14
|
-
* Creates a model response for the given chat conversation.
|
|
14
|
+
* Creates a model response for the given chat conversation. Learn more in the
|
|
15
|
+
* [text generation](https://platform.openai.com/docs/guides/text-generation),
|
|
16
|
+
* [vision](https://platform.openai.com/docs/guides/vision), and
|
|
17
|
+
* [audio](https://platform.openai.com/docs/guides/audio) guides.
|
|
15
18
|
*/
|
|
16
19
|
create(
|
|
17
20
|
body: ChatCompletionCreateParamsNonStreaming,
|
|
@@ -138,6 +141,12 @@ export interface ChatCompletionAssistantMessageParam {
|
|
|
138
141
|
*/
|
|
139
142
|
role: 'assistant';
|
|
140
143
|
|
|
144
|
+
/**
|
|
145
|
+
* Data about a previous audio response from the model.
|
|
146
|
+
* [Learn more](https://platform.openai.com/docs/guides/audio).
|
|
147
|
+
*/
|
|
148
|
+
audio?: ChatCompletionAssistantMessageParam.Audio | null;
|
|
149
|
+
|
|
141
150
|
/**
|
|
142
151
|
* The contents of the assistant message. Required unless `tool_calls` or
|
|
143
152
|
* `function_call` is specified.
|
|
@@ -168,6 +177,17 @@ export interface ChatCompletionAssistantMessageParam {
|
|
|
168
177
|
}
|
|
169
178
|
|
|
170
179
|
export namespace ChatCompletionAssistantMessageParam {
|
|
180
|
+
/**
|
|
181
|
+
* Data about a previous audio response from the model.
|
|
182
|
+
* [Learn more](https://platform.openai.com/docs/guides/audio).
|
|
183
|
+
*/
|
|
184
|
+
export interface Audio {
|
|
185
|
+
/**
|
|
186
|
+
* Unique identifier for a previous audio response from the model.
|
|
187
|
+
*/
|
|
188
|
+
id: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
171
191
|
/**
|
|
172
192
|
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
|
|
173
193
|
* a function that should be called, as generated by the model.
|
|
@@ -188,6 +208,54 @@ export namespace ChatCompletionAssistantMessageParam {
|
|
|
188
208
|
}
|
|
189
209
|
}
|
|
190
210
|
|
|
211
|
+
/**
|
|
212
|
+
* If the audio output modality is requested, this object contains data about the
|
|
213
|
+
* audio response from the model.
|
|
214
|
+
* [Learn more](https://platform.openai.com/docs/guides/audio).
|
|
215
|
+
*/
|
|
216
|
+
export interface ChatCompletionAudio {
|
|
217
|
+
/**
|
|
218
|
+
* Unique identifier for this audio response.
|
|
219
|
+
*/
|
|
220
|
+
id: string;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Base64 encoded audio bytes generated by the model, in the format specified in
|
|
224
|
+
* the request.
|
|
225
|
+
*/
|
|
226
|
+
data: string;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The Unix timestamp (in seconds) for when this audio response will no longer be
|
|
230
|
+
* accessible on the server for use in multi-turn conversations.
|
|
231
|
+
*/
|
|
232
|
+
expires_at: number;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Transcript of the audio generated by the model.
|
|
236
|
+
*/
|
|
237
|
+
transcript: string;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Parameters for audio output. Required when audio output is requested with
|
|
242
|
+
* `modalities: ["audio"]`.
|
|
243
|
+
* [Learn more](https://platform.openai.com/docs/guides/audio).
|
|
244
|
+
*/
|
|
245
|
+
export interface ChatCompletionAudioParam {
|
|
246
|
+
/**
|
|
247
|
+
* Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`,
|
|
248
|
+
* or `pcm16`.
|
|
249
|
+
*/
|
|
250
|
+
format: 'wav' | 'mp3' | 'flac' | 'opus' | 'pcm16';
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Specifies the voice type. Supported voices are `alloy`, `echo`, `fable`, `onyx`,
|
|
254
|
+
* `nova`, and `shimmer`.
|
|
255
|
+
*/
|
|
256
|
+
voice: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer';
|
|
257
|
+
}
|
|
258
|
+
|
|
191
259
|
/**
|
|
192
260
|
* Represents a streamed chunk of a chat completion response returned by model,
|
|
193
261
|
* based on the provided input.
|
|
@@ -371,8 +439,18 @@ export namespace ChatCompletionChunk {
|
|
|
371
439
|
}
|
|
372
440
|
}
|
|
373
441
|
|
|
374
|
-
|
|
442
|
+
/**
|
|
443
|
+
* Learn about
|
|
444
|
+
* [text inputs](https://platform.openai.com/docs/guides/text-generation).
|
|
445
|
+
*/
|
|
446
|
+
export type ChatCompletionContentPart =
|
|
447
|
+
| ChatCompletionContentPartText
|
|
448
|
+
| ChatCompletionContentPartImage
|
|
449
|
+
| ChatCompletionContentPartInputAudio;
|
|
375
450
|
|
|
451
|
+
/**
|
|
452
|
+
* Learn about [image inputs](https://platform.openai.com/docs/guides/vision).
|
|
453
|
+
*/
|
|
376
454
|
export interface ChatCompletionContentPartImage {
|
|
377
455
|
image_url: ChatCompletionContentPartImage.ImageURL;
|
|
378
456
|
|
|
@@ -397,6 +475,32 @@ export namespace ChatCompletionContentPartImage {
|
|
|
397
475
|
}
|
|
398
476
|
}
|
|
399
477
|
|
|
478
|
+
/**
|
|
479
|
+
* Learn about [audio inputs](https://platform.openai.com/docs/guides/audio).
|
|
480
|
+
*/
|
|
481
|
+
export interface ChatCompletionContentPartInputAudio {
|
|
482
|
+
input_audio: ChatCompletionContentPartInputAudio.InputAudio;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* The type of the content part. Always `input_audio`.
|
|
486
|
+
*/
|
|
487
|
+
type: 'input_audio';
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
export namespace ChatCompletionContentPartInputAudio {
|
|
491
|
+
export interface InputAudio {
|
|
492
|
+
/**
|
|
493
|
+
* Base64 encoded audio data.
|
|
494
|
+
*/
|
|
495
|
+
data: string;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* The format of the encoded audio data. Currently supports "wav" and "mp3".
|
|
499
|
+
*/
|
|
500
|
+
format: 'wav' | 'mp3';
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
400
504
|
export interface ChatCompletionContentPartRefusal {
|
|
401
505
|
/**
|
|
402
506
|
* The refusal message generated by the model.
|
|
@@ -409,6 +513,10 @@ export interface ChatCompletionContentPartRefusal {
|
|
|
409
513
|
type: 'refusal';
|
|
410
514
|
}
|
|
411
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Learn about
|
|
518
|
+
* [text inputs](https://platform.openai.com/docs/guides/text-generation).
|
|
519
|
+
*/
|
|
412
520
|
export interface ChatCompletionContentPartText {
|
|
413
521
|
/**
|
|
414
522
|
* The text content.
|
|
@@ -471,6 +579,13 @@ export interface ChatCompletionMessage {
|
|
|
471
579
|
*/
|
|
472
580
|
role: 'assistant';
|
|
473
581
|
|
|
582
|
+
/**
|
|
583
|
+
* If the audio output modality is requested, this object contains data about the
|
|
584
|
+
* audio response from the model.
|
|
585
|
+
* [Learn more](https://platform.openai.com/docs/guides/audio).
|
|
586
|
+
*/
|
|
587
|
+
audio?: ChatCompletionAudio | null;
|
|
588
|
+
|
|
474
589
|
/**
|
|
475
590
|
* @deprecated: Deprecated and replaced by `tool_calls`. The name and arguments of
|
|
476
591
|
* a function that should be called, as generated by the model.
|
|
@@ -548,6 +663,8 @@ export namespace ChatCompletionMessageToolCall {
|
|
|
548
663
|
}
|
|
549
664
|
}
|
|
550
665
|
|
|
666
|
+
export type ChatCompletionModality = 'text' | 'audio';
|
|
667
|
+
|
|
551
668
|
/**
|
|
552
669
|
* Specifies a tool the model should use. Use to force the model to call a specific
|
|
553
670
|
* function.
|
|
@@ -743,6 +860,13 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
743
860
|
*/
|
|
744
861
|
model: (string & {}) | ChatAPI.ChatModel;
|
|
745
862
|
|
|
863
|
+
/**
|
|
864
|
+
* Parameters for audio output. Required when audio output is requested with
|
|
865
|
+
* `modalities: ["audio"]`.
|
|
866
|
+
* [Learn more](https://platform.openai.com/docs/guides/audio).
|
|
867
|
+
*/
|
|
868
|
+
audio?: ChatCompletionAudioParam | null;
|
|
869
|
+
|
|
746
870
|
/**
|
|
747
871
|
* Number between -2.0 and 2.0. Positive values penalize new tokens based on their
|
|
748
872
|
* existing frequency in the text so far, decreasing the model's likelihood to
|
|
@@ -812,10 +936,24 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
812
936
|
|
|
813
937
|
/**
|
|
814
938
|
* Developer-defined tags and values used for filtering completions in the
|
|
815
|
-
* [dashboard](https://platform.openai.com/completions).
|
|
939
|
+
* [dashboard](https://platform.openai.com/chat-completions).
|
|
816
940
|
*/
|
|
817
941
|
metadata?: Record<string, string> | null;
|
|
818
942
|
|
|
943
|
+
/**
|
|
944
|
+
* Output types that you would like the model to generate for this request. Most
|
|
945
|
+
* models are capable of generating text, which is the default:
|
|
946
|
+
*
|
|
947
|
+
* `["text"]`
|
|
948
|
+
*
|
|
949
|
+
* The `gpt-4o-audio-preview` model can also be used to
|
|
950
|
+
* [generate audio](https://platform.openai.com/docs/guides/audio). To request that
|
|
951
|
+
* this model generate both text and audio responses, you can use:
|
|
952
|
+
*
|
|
953
|
+
* `["text", "audio"]`
|
|
954
|
+
*/
|
|
955
|
+
modalities?: Array<ChatCompletionModality> | null;
|
|
956
|
+
|
|
819
957
|
/**
|
|
820
958
|
* How many chat completion choices to generate for each input message. Note that
|
|
821
959
|
* you will be charged based on the number of generated tokens across all of the
|
|
@@ -900,8 +1038,9 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
900
1038
|
stop?: string | null | Array<string>;
|
|
901
1039
|
|
|
902
1040
|
/**
|
|
903
|
-
* Whether or not to store the output of this completion request for
|
|
904
|
-
*
|
|
1041
|
+
* Whether or not to store the output of this chat completion request for use in
|
|
1042
|
+
* our [model distillation](https://platform.openai.com/docs/guides/distillation)
|
|
1043
|
+
* or [evals](https://platform.openai.com/docs/guides/evals) products.
|
|
905
1044
|
*/
|
|
906
1045
|
store?: boolean | null;
|
|
907
1046
|
|
|
@@ -1049,9 +1188,12 @@ export type CompletionCreateParamsStreaming = ChatCompletionCreateParamsStreamin
|
|
|
1049
1188
|
export namespace Completions {
|
|
1050
1189
|
export import ChatCompletion = ChatCompletionsAPI.ChatCompletion;
|
|
1051
1190
|
export import ChatCompletionAssistantMessageParam = ChatCompletionsAPI.ChatCompletionAssistantMessageParam;
|
|
1191
|
+
export import ChatCompletionAudio = ChatCompletionsAPI.ChatCompletionAudio;
|
|
1192
|
+
export import ChatCompletionAudioParam = ChatCompletionsAPI.ChatCompletionAudioParam;
|
|
1052
1193
|
export import ChatCompletionChunk = ChatCompletionsAPI.ChatCompletionChunk;
|
|
1053
1194
|
export import ChatCompletionContentPart = ChatCompletionsAPI.ChatCompletionContentPart;
|
|
1054
1195
|
export import ChatCompletionContentPartImage = ChatCompletionsAPI.ChatCompletionContentPartImage;
|
|
1196
|
+
export import ChatCompletionContentPartInputAudio = ChatCompletionsAPI.ChatCompletionContentPartInputAudio;
|
|
1055
1197
|
export import ChatCompletionContentPartRefusal = ChatCompletionsAPI.ChatCompletionContentPartRefusal;
|
|
1056
1198
|
export import ChatCompletionContentPartText = ChatCompletionsAPI.ChatCompletionContentPartText;
|
|
1057
1199
|
export import ChatCompletionFunctionCallOption = ChatCompletionsAPI.ChatCompletionFunctionCallOption;
|
|
@@ -1059,6 +1201,7 @@ export namespace Completions {
|
|
|
1059
1201
|
export import ChatCompletionMessage = ChatCompletionsAPI.ChatCompletionMessage;
|
|
1060
1202
|
export import ChatCompletionMessageParam = ChatCompletionsAPI.ChatCompletionMessageParam;
|
|
1061
1203
|
export import ChatCompletionMessageToolCall = ChatCompletionsAPI.ChatCompletionMessageToolCall;
|
|
1204
|
+
export import ChatCompletionModality = ChatCompletionsAPI.ChatCompletionModality;
|
|
1062
1205
|
export import ChatCompletionNamedToolChoice = ChatCompletionsAPI.ChatCompletionNamedToolChoice;
|
|
1063
1206
|
export import ChatCompletionRole = ChatCompletionsAPI.ChatCompletionRole;
|
|
1064
1207
|
export import ChatCompletionStreamOptions = ChatCompletionsAPI.ChatCompletionStreamOptions;
|
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
export {
|
|
4
4
|
ChatCompletion,
|
|
5
5
|
ChatCompletionAssistantMessageParam,
|
|
6
|
+
ChatCompletionAudio,
|
|
7
|
+
ChatCompletionAudioParam,
|
|
6
8
|
ChatCompletionChunk,
|
|
7
9
|
ChatCompletionContentPart,
|
|
8
10
|
ChatCompletionContentPartImage,
|
|
11
|
+
ChatCompletionContentPartInputAudio,
|
|
9
12
|
ChatCompletionContentPartRefusal,
|
|
10
13
|
ChatCompletionContentPartText,
|
|
11
14
|
ChatCompletionFunctionCallOption,
|
|
@@ -13,6 +16,7 @@ export {
|
|
|
13
16
|
ChatCompletionMessage,
|
|
14
17
|
ChatCompletionMessageParam,
|
|
15
18
|
ChatCompletionMessageToolCall,
|
|
19
|
+
ChatCompletionModality,
|
|
16
20
|
ChatCompletionNamedToolChoice,
|
|
17
21
|
ChatCompletionRole,
|
|
18
22
|
ChatCompletionStreamOptions,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.68.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.68.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.68.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|