openai 4.70.3 → 4.71.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 +8 -0
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/audio/speech.d.ts +2 -2
- package/resources/audio/transcriptions.d.ts +1 -1
- package/resources/audio/translations.d.ts +1 -1
- package/resources/beta/assistants.d.ts +18 -18
- package/resources/beta/threads/messages.d.ts +2 -2
- package/resources/beta/threads/runs/runs.d.ts +9 -9
- package/resources/beta/threads/runs/steps.d.ts +4 -4
- package/resources/beta/threads/threads.d.ts +5 -5
- package/resources/beta/vector-stores/file-batches.d.ts +2 -2
- package/resources/beta/vector-stores/files.d.ts +2 -2
- package/resources/beta/vector-stores/vector-stores.d.ts +2 -2
- package/resources/chat/chat.d.ts +2 -2
- 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 +32 -10
- package/resources/chat/completions.d.ts.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/resources/completions.d.ts +17 -5
- package/resources/completions.d.ts.map +1 -1
- package/resources/embeddings.d.ts +3 -3
- package/resources/files.d.ts +9 -7
- 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 +2 -5
- package/resources/files.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +1 -1
- package/resources/images.d.ts +3 -3
- package/resources/moderations.d.ts +1 -1
- package/resources/uploads/uploads.d.ts +1 -1
- package/resources/uploads/uploads.js +1 -1
- package/resources/uploads/uploads.mjs +1 -1
- package/src/index.ts +2 -0
- package/src/resources/audio/speech.ts +2 -2
- package/src/resources/audio/transcriptions.ts +1 -1
- package/src/resources/audio/translations.ts +1 -1
- package/src/resources/beta/assistants.ts +18 -18
- package/src/resources/beta/threads/messages.ts +2 -2
- package/src/resources/beta/threads/runs/runs.ts +9 -9
- package/src/resources/beta/threads/runs/steps.ts +4 -4
- package/src/resources/beta/threads/threads.ts +5 -5
- package/src/resources/beta/vector-stores/file-batches.ts +2 -2
- package/src/resources/beta/vector-stores/files.ts +2 -2
- package/src/resources/beta/vector-stores/vector-stores.ts +2 -2
- package/src/resources/chat/chat.ts +2 -0
- package/src/resources/chat/completions.ts +35 -9
- package/src/resources/chat/index.ts +1 -0
- package/src/resources/completions.ts +19 -5
- package/src/resources/embeddings.ts +3 -3
- package/src/resources/files.ts +10 -7
- package/src/resources/fine-tuning/jobs/jobs.ts +1 -1
- package/src/resources/images.ts +3 -3
- package/src/resources/moderations.ts +1 -1
- package/src/resources/uploads/uploads.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -121,8 +121,8 @@ export interface Assistant {
|
|
|
121
121
|
* ID of the model to use. You can use the
|
|
122
122
|
* [List models](https://platform.openai.com/docs/api-reference/models/list) API to
|
|
123
123
|
* see all of your available models, or see our
|
|
124
|
-
* [Model overview](https://platform.openai.com/docs/models
|
|
125
|
-
*
|
|
124
|
+
* [Model overview](https://platform.openai.com/docs/models) for descriptions of
|
|
125
|
+
* them.
|
|
126
126
|
*/
|
|
127
127
|
model: string;
|
|
128
128
|
|
|
@@ -145,8 +145,8 @@ export interface Assistant {
|
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
147
|
* Specifies the format that the model must output. Compatible with
|
|
148
|
-
* [GPT-4o](https://platform.openai.com/docs/models
|
|
149
|
-
* [GPT-4 Turbo](https://platform.openai.com/docs/models
|
|
148
|
+
* [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
149
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
|
|
150
150
|
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
151
151
|
*
|
|
152
152
|
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
@@ -620,7 +620,7 @@ export namespace AssistantStreamEvent {
|
|
|
620
620
|
|
|
621
621
|
/**
|
|
622
622
|
* Occurs when an
|
|
623
|
-
* [error](https://platform.openai.com/docs/guides/error-codes
|
|
623
|
+
* [error](https://platform.openai.com/docs/guides/error-codes#api-errors) occurs.
|
|
624
624
|
* This can happen due to an internal server error or a timeout.
|
|
625
625
|
*/
|
|
626
626
|
export interface ErrorEvent {
|
|
@@ -663,7 +663,7 @@ export namespace FileSearchTool {
|
|
|
663
663
|
*
|
|
664
664
|
* Note that the file search tool may output fewer than `max_num_results` results.
|
|
665
665
|
* See the
|
|
666
|
-
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search
|
|
666
|
+
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
|
|
667
667
|
* for more information.
|
|
668
668
|
*/
|
|
669
669
|
max_num_results?: number;
|
|
@@ -673,7 +673,7 @@ export namespace FileSearchTool {
|
|
|
673
673
|
* will use the `auto` ranker and a score_threshold of 0.
|
|
674
674
|
*
|
|
675
675
|
* See the
|
|
676
|
-
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search
|
|
676
|
+
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
|
|
677
677
|
* for more information.
|
|
678
678
|
*/
|
|
679
679
|
ranking_options?: FileSearch.RankingOptions;
|
|
@@ -685,7 +685,7 @@ export namespace FileSearchTool {
|
|
|
685
685
|
* will use the `auto` ranker and a score_threshold of 0.
|
|
686
686
|
*
|
|
687
687
|
* See the
|
|
688
|
-
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search
|
|
688
|
+
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
|
|
689
689
|
* for more information.
|
|
690
690
|
*/
|
|
691
691
|
export interface RankingOptions {
|
|
@@ -1100,8 +1100,8 @@ export interface AssistantCreateParams {
|
|
|
1100
1100
|
* ID of the model to use. You can use the
|
|
1101
1101
|
* [List models](https://platform.openai.com/docs/api-reference/models/list) API to
|
|
1102
1102
|
* see all of your available models, or see our
|
|
1103
|
-
* [Model overview](https://platform.openai.com/docs/models
|
|
1104
|
-
*
|
|
1103
|
+
* [Model overview](https://platform.openai.com/docs/models) for descriptions of
|
|
1104
|
+
* them.
|
|
1105
1105
|
*/
|
|
1106
1106
|
model: (string & {}) | ChatAPI.ChatModel;
|
|
1107
1107
|
|
|
@@ -1131,8 +1131,8 @@ export interface AssistantCreateParams {
|
|
|
1131
1131
|
|
|
1132
1132
|
/**
|
|
1133
1133
|
* Specifies the format that the model must output. Compatible with
|
|
1134
|
-
* [GPT-4o](https://platform.openai.com/docs/models
|
|
1135
|
-
* [GPT-4 Turbo](https://platform.openai.com/docs/models
|
|
1134
|
+
* [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
1135
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
|
|
1136
1136
|
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
1137
1137
|
*
|
|
1138
1138
|
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
@@ -1277,8 +1277,8 @@ export interface AssistantUpdateParams {
|
|
|
1277
1277
|
* ID of the model to use. You can use the
|
|
1278
1278
|
* [List models](https://platform.openai.com/docs/api-reference/models/list) API to
|
|
1279
1279
|
* see all of your available models, or see our
|
|
1280
|
-
* [Model overview](https://platform.openai.com/docs/models
|
|
1281
|
-
*
|
|
1280
|
+
* [Model overview](https://platform.openai.com/docs/models) for descriptions of
|
|
1281
|
+
* them.
|
|
1282
1282
|
*/
|
|
1283
1283
|
model?: string;
|
|
1284
1284
|
|
|
@@ -1289,8 +1289,8 @@ export interface AssistantUpdateParams {
|
|
|
1289
1289
|
|
|
1290
1290
|
/**
|
|
1291
1291
|
* Specifies the format that the model must output. Compatible with
|
|
1292
|
-
* [GPT-4o](https://platform.openai.com/docs/models
|
|
1293
|
-
* [GPT-4 Turbo](https://platform.openai.com/docs/models
|
|
1292
|
+
* [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
1293
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
|
|
1294
1294
|
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
1295
1295
|
*
|
|
1296
1296
|
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
@@ -1383,8 +1383,8 @@ export interface AssistantListParams extends CursorPageParams {
|
|
|
1383
1383
|
/**
|
|
1384
1384
|
* A cursor for use in pagination. `before` is an object ID that defines your place
|
|
1385
1385
|
* in the list. For instance, if you make a list request and receive 100 objects,
|
|
1386
|
-
*
|
|
1387
|
-
* fetch the previous page of the list.
|
|
1386
|
+
* starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
1387
|
+
* to fetch the previous page of the list.
|
|
1388
1388
|
*/
|
|
1389
1389
|
before?: string;
|
|
1390
1390
|
|
|
@@ -704,8 +704,8 @@ export interface MessageListParams extends CursorPageParams {
|
|
|
704
704
|
/**
|
|
705
705
|
* A cursor for use in pagination. `before` is an object ID that defines your place
|
|
706
706
|
* in the list. For instance, if you make a list request and receive 100 objects,
|
|
707
|
-
*
|
|
708
|
-
* fetch the previous page of the list.
|
|
707
|
+
* starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
708
|
+
* to fetch the previous page of the list.
|
|
709
709
|
*/
|
|
710
710
|
before?: string;
|
|
711
711
|
|
|
@@ -435,7 +435,7 @@ export interface Run {
|
|
|
435
435
|
|
|
436
436
|
/**
|
|
437
437
|
* Whether to enable
|
|
438
|
-
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling
|
|
438
|
+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
|
|
439
439
|
* during tool use.
|
|
440
440
|
*/
|
|
441
441
|
parallel_tool_calls: boolean;
|
|
@@ -448,8 +448,8 @@ export interface Run {
|
|
|
448
448
|
|
|
449
449
|
/**
|
|
450
450
|
* Specifies the format that the model must output. Compatible with
|
|
451
|
-
* [GPT-4o](https://platform.openai.com/docs/models
|
|
452
|
-
* [GPT-4 Turbo](https://platform.openai.com/docs/models
|
|
451
|
+
* [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
452
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
|
|
453
453
|
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
454
454
|
*
|
|
455
455
|
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
@@ -660,7 +660,7 @@ export interface RunCreateParamsBase {
|
|
|
660
660
|
* search result content.
|
|
661
661
|
*
|
|
662
662
|
* See the
|
|
663
|
-
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search
|
|
663
|
+
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
|
|
664
664
|
* for more information.
|
|
665
665
|
*/
|
|
666
666
|
include?: Array<StepsAPI.RunStepInclude>;
|
|
@@ -721,15 +721,15 @@ export interface RunCreateParamsBase {
|
|
|
721
721
|
|
|
722
722
|
/**
|
|
723
723
|
* Body param: Whether to enable
|
|
724
|
-
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling
|
|
724
|
+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
|
|
725
725
|
* during tool use.
|
|
726
726
|
*/
|
|
727
727
|
parallel_tool_calls?: boolean;
|
|
728
728
|
|
|
729
729
|
/**
|
|
730
730
|
* Body param: Specifies the format that the model must output. Compatible with
|
|
731
|
-
* [GPT-4o](https://platform.openai.com/docs/models
|
|
732
|
-
* [GPT-4 Turbo](https://platform.openai.com/docs/models
|
|
731
|
+
* [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
732
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
|
|
733
733
|
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
734
734
|
*
|
|
735
735
|
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
@@ -909,8 +909,8 @@ export interface RunListParams extends CursorPageParams {
|
|
|
909
909
|
/**
|
|
910
910
|
* A cursor for use in pagination. `before` is an object ID that defines your place
|
|
911
911
|
* in the list. For instance, if you make a list request and receive 100 objects,
|
|
912
|
-
*
|
|
913
|
-
* fetch the previous page of the list.
|
|
912
|
+
* starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
913
|
+
* to fetch the previous page of the list.
|
|
914
914
|
*/
|
|
915
915
|
before?: string;
|
|
916
916
|
|
|
@@ -705,7 +705,7 @@ export interface StepRetrieveParams {
|
|
|
705
705
|
* to fetch the file search result content.
|
|
706
706
|
*
|
|
707
707
|
* See the
|
|
708
|
-
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search
|
|
708
|
+
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
|
|
709
709
|
* for more information.
|
|
710
710
|
*/
|
|
711
711
|
include?: Array<RunStepInclude>;
|
|
@@ -715,8 +715,8 @@ export interface StepListParams extends CursorPageParams {
|
|
|
715
715
|
/**
|
|
716
716
|
* A cursor for use in pagination. `before` is an object ID that defines your place
|
|
717
717
|
* in the list. For instance, if you make a list request and receive 100 objects,
|
|
718
|
-
*
|
|
719
|
-
* fetch the previous page of the list.
|
|
718
|
+
* starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
719
|
+
* to fetch the previous page of the list.
|
|
720
720
|
*/
|
|
721
721
|
before?: string;
|
|
722
722
|
|
|
@@ -726,7 +726,7 @@ export interface StepListParams extends CursorPageParams {
|
|
|
726
726
|
* to fetch the file search result content.
|
|
727
727
|
*
|
|
728
728
|
* See the
|
|
729
|
-
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search
|
|
729
|
+
* [file search tool documentation](https://platform.openai.com/docs/assistants/tools/file-search#customizing-file-search-settings)
|
|
730
730
|
* for more information.
|
|
731
731
|
*/
|
|
732
732
|
include?: Array<RunStepInclude>;
|
|
@@ -176,8 +176,8 @@ export class Threads extends APIResource {
|
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
178
|
* Specifies the format that the model must output. Compatible with
|
|
179
|
-
* [GPT-4o](https://platform.openai.com/docs/models
|
|
180
|
-
* [GPT-4 Turbo](https://platform.openai.com/docs/models
|
|
179
|
+
* [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
180
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
|
|
181
181
|
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
182
182
|
*
|
|
183
183
|
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
@@ -565,15 +565,15 @@ export interface ThreadCreateAndRunParamsBase {
|
|
|
565
565
|
|
|
566
566
|
/**
|
|
567
567
|
* Whether to enable
|
|
568
|
-
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling
|
|
568
|
+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
|
|
569
569
|
* during tool use.
|
|
570
570
|
*/
|
|
571
571
|
parallel_tool_calls?: boolean;
|
|
572
572
|
|
|
573
573
|
/**
|
|
574
574
|
* Specifies the format that the model must output. Compatible with
|
|
575
|
-
* [GPT-4o](https://platform.openai.com/docs/models
|
|
576
|
-
* [GPT-4 Turbo](https://platform.openai.com/docs/models
|
|
575
|
+
* [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
576
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4),
|
|
577
577
|
* and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
|
|
578
578
|
*
|
|
579
579
|
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
@@ -276,8 +276,8 @@ export interface FileBatchListFilesParams extends CursorPageParams {
|
|
|
276
276
|
/**
|
|
277
277
|
* A cursor for use in pagination. `before` is an object ID that defines your place
|
|
278
278
|
* in the list. For instance, if you make a list request and receive 100 objects,
|
|
279
|
-
*
|
|
280
|
-
* fetch the previous page of the list.
|
|
279
|
+
* starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
280
|
+
* to fetch the previous page of the list.
|
|
281
281
|
*/
|
|
282
282
|
before?: string;
|
|
283
283
|
|
|
@@ -268,8 +268,8 @@ export interface FileListParams extends CursorPageParams {
|
|
|
268
268
|
/**
|
|
269
269
|
* A cursor for use in pagination. `before` is an object ID that defines your place
|
|
270
270
|
* in the list. For instance, if you make a list request and receive 100 objects,
|
|
271
|
-
*
|
|
272
|
-
* fetch the previous page of the list.
|
|
271
|
+
* starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
272
|
+
* to fetch the previous page of the list.
|
|
273
273
|
*/
|
|
274
274
|
before?: string;
|
|
275
275
|
|
|
@@ -372,8 +372,8 @@ export interface VectorStoreListParams extends CursorPageParams {
|
|
|
372
372
|
/**
|
|
373
373
|
* A cursor for use in pagination. `before` is an object ID that defines your place
|
|
374
374
|
* in the list. For instance, if you make a list request and receive 100 objects,
|
|
375
|
-
*
|
|
376
|
-
* fetch the previous page of the list.
|
|
375
|
+
* starting with obj_foo, your subsequent call can include before=obj_foo in order
|
|
376
|
+
* to fetch the previous page of the list.
|
|
377
377
|
*/
|
|
378
378
|
before?: string;
|
|
379
379
|
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
ChatCompletionMessageToolCall,
|
|
24
24
|
ChatCompletionModality,
|
|
25
25
|
ChatCompletionNamedToolChoice,
|
|
26
|
+
ChatCompletionPredictionContent,
|
|
26
27
|
ChatCompletionRole,
|
|
27
28
|
ChatCompletionStreamOptions,
|
|
28
29
|
ChatCompletionSystemMessageParam,
|
|
@@ -101,6 +102,7 @@ export declare namespace Chat {
|
|
|
101
102
|
type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall,
|
|
102
103
|
type ChatCompletionModality as ChatCompletionModality,
|
|
103
104
|
type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice,
|
|
105
|
+
type ChatCompletionPredictionContent as ChatCompletionPredictionContent,
|
|
104
106
|
type ChatCompletionRole as ChatCompletionRole,
|
|
105
107
|
type ChatCompletionStreamOptions as ChatCompletionStreamOptions,
|
|
106
108
|
type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam,
|
|
@@ -469,7 +469,7 @@ export namespace ChatCompletionContentPartImage {
|
|
|
469
469
|
|
|
470
470
|
/**
|
|
471
471
|
* Specifies the detail level of the image. Learn more in the
|
|
472
|
-
* [Vision guide](https://platform.openai.com/docs/guides/vision
|
|
472
|
+
* [Vision guide](https://platform.openai.com/docs/guides/vision#low-or-high-fidelity-image-understanding).
|
|
473
473
|
*/
|
|
474
474
|
detail?: 'auto' | 'low' | 'high';
|
|
475
475
|
}
|
|
@@ -687,6 +687,25 @@ export namespace ChatCompletionNamedToolChoice {
|
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
689
|
|
|
690
|
+
/**
|
|
691
|
+
* Static predicted output content, such as the content of a text file that is
|
|
692
|
+
* being regenerated.
|
|
693
|
+
*/
|
|
694
|
+
export interface ChatCompletionPredictionContent {
|
|
695
|
+
/**
|
|
696
|
+
* The content that should be matched when generating a model response. If
|
|
697
|
+
* generated tokens would match this content, the entire model response can be
|
|
698
|
+
* returned much more quickly.
|
|
699
|
+
*/
|
|
700
|
+
content: string | Array<ChatCompletionContentPartText>;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* The type of the predicted content you want to provide. This type is currently
|
|
704
|
+
* always `content`.
|
|
705
|
+
*/
|
|
706
|
+
type: 'content';
|
|
707
|
+
}
|
|
708
|
+
|
|
690
709
|
/**
|
|
691
710
|
* The role of the author of a message
|
|
692
711
|
*/
|
|
@@ -855,7 +874,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
855
874
|
|
|
856
875
|
/**
|
|
857
876
|
* ID of the model to use. See the
|
|
858
|
-
* [model endpoint compatibility](https://platform.openai.com/docs/models
|
|
877
|
+
* [model endpoint compatibility](https://platform.openai.com/docs/models#model-endpoint-compatibility)
|
|
859
878
|
* table for details on which models work with the Chat API.
|
|
860
879
|
*/
|
|
861
880
|
model: (string & {}) | ChatAPI.ChatModel;
|
|
@@ -872,7 +891,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
872
891
|
* existing frequency in the text so far, decreasing the model's likelihood to
|
|
873
892
|
* repeat the same line verbatim.
|
|
874
893
|
*
|
|
875
|
-
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation
|
|
894
|
+
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
|
|
876
895
|
*/
|
|
877
896
|
frequency_penalty?: number | null;
|
|
878
897
|
|
|
@@ -963,25 +982,31 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
963
982
|
|
|
964
983
|
/**
|
|
965
984
|
* Whether to enable
|
|
966
|
-
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling
|
|
985
|
+
* [parallel function calling](https://platform.openai.com/docs/guides/function-calling#configuring-parallel-function-calling)
|
|
967
986
|
* during tool use.
|
|
968
987
|
*/
|
|
969
988
|
parallel_tool_calls?: boolean;
|
|
970
989
|
|
|
990
|
+
/**
|
|
991
|
+
* Static predicted output content, such as the content of a text file that is
|
|
992
|
+
* being regenerated.
|
|
993
|
+
*/
|
|
994
|
+
prediction?: ChatCompletionPredictionContent | null;
|
|
995
|
+
|
|
971
996
|
/**
|
|
972
997
|
* Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
973
998
|
* whether they appear in the text so far, increasing the model's likelihood to
|
|
974
999
|
* talk about new topics.
|
|
975
1000
|
*
|
|
976
|
-
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation
|
|
1001
|
+
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
|
|
977
1002
|
*/
|
|
978
1003
|
presence_penalty?: number | null;
|
|
979
1004
|
|
|
980
1005
|
/**
|
|
981
1006
|
* An object specifying the format that the model must output. Compatible with
|
|
982
|
-
* [GPT-4o](https://platform.openai.com/docs/models
|
|
983
|
-
* [GPT-4o mini](https://platform.openai.com/docs/models
|
|
984
|
-
* [GPT-4 Turbo](https://platform.openai.com/docs/models
|
|
1007
|
+
* [GPT-4o](https://platform.openai.com/docs/models#gpt-4o),
|
|
1008
|
+
* [GPT-4o mini](https://platform.openai.com/docs/models#gpt-4o-mini),
|
|
1009
|
+
* [GPT-4 Turbo](https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4) and
|
|
985
1010
|
* all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
|
|
986
1011
|
*
|
|
987
1012
|
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
@@ -1107,7 +1132,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
1107
1132
|
/**
|
|
1108
1133
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
1109
1134
|
* and detect abuse.
|
|
1110
|
-
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices
|
|
1135
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
|
|
1111
1136
|
*/
|
|
1112
1137
|
user?: string;
|
|
1113
1138
|
}
|
|
@@ -1204,6 +1229,7 @@ export declare namespace Completions {
|
|
|
1204
1229
|
type ChatCompletionMessageToolCall as ChatCompletionMessageToolCall,
|
|
1205
1230
|
type ChatCompletionModality as ChatCompletionModality,
|
|
1206
1231
|
type ChatCompletionNamedToolChoice as ChatCompletionNamedToolChoice,
|
|
1232
|
+
type ChatCompletionPredictionContent as ChatCompletionPredictionContent,
|
|
1207
1233
|
type ChatCompletionRole as ChatCompletionRole,
|
|
1208
1234
|
type ChatCompletionStreamOptions as ChatCompletionStreamOptions,
|
|
1209
1235
|
type ChatCompletionSystemMessageParam as ChatCompletionSystemMessageParam,
|
|
@@ -20,6 +20,7 @@ export {
|
|
|
20
20
|
type ChatCompletionMessageToolCall,
|
|
21
21
|
type ChatCompletionModality,
|
|
22
22
|
type ChatCompletionNamedToolChoice,
|
|
23
|
+
type ChatCompletionPredictionContent,
|
|
23
24
|
type ChatCompletionRole,
|
|
24
25
|
type ChatCompletionStreamOptions,
|
|
25
26
|
type ChatCompletionSystemMessageParam,
|
|
@@ -137,6 +137,12 @@ export namespace CompletionUsage {
|
|
|
137
137
|
* Breakdown of tokens used in a completion.
|
|
138
138
|
*/
|
|
139
139
|
export interface CompletionTokensDetails {
|
|
140
|
+
/**
|
|
141
|
+
* When using Predicted Outputs, the number of tokens in the prediction that
|
|
142
|
+
* appeared in the completion.
|
|
143
|
+
*/
|
|
144
|
+
accepted_prediction_tokens?: number;
|
|
145
|
+
|
|
140
146
|
/**
|
|
141
147
|
* Audio input tokens generated by the model.
|
|
142
148
|
*/
|
|
@@ -146,6 +152,14 @@ export namespace CompletionUsage {
|
|
|
146
152
|
* Tokens generated by the model for reasoning.
|
|
147
153
|
*/
|
|
148
154
|
reasoning_tokens?: number;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* When using Predicted Outputs, the number of tokens in the prediction that did
|
|
158
|
+
* not appear in the completion. However, like reasoning tokens, these tokens are
|
|
159
|
+
* still counted in the total completion tokens for purposes of billing, output,
|
|
160
|
+
* and context window limits.
|
|
161
|
+
*/
|
|
162
|
+
rejected_prediction_tokens?: number;
|
|
149
163
|
}
|
|
150
164
|
|
|
151
165
|
/**
|
|
@@ -171,8 +185,8 @@ export interface CompletionCreateParamsBase {
|
|
|
171
185
|
* ID of the model to use. You can use the
|
|
172
186
|
* [List models](https://platform.openai.com/docs/api-reference/models/list) API to
|
|
173
187
|
* see all of your available models, or see our
|
|
174
|
-
* [Model overview](https://platform.openai.com/docs/models
|
|
175
|
-
*
|
|
188
|
+
* [Model overview](https://platform.openai.com/docs/models) for descriptions of
|
|
189
|
+
* them.
|
|
176
190
|
*/
|
|
177
191
|
model: (string & {}) | 'gpt-3.5-turbo-instruct' | 'davinci-002' | 'babbage-002';
|
|
178
192
|
|
|
@@ -209,7 +223,7 @@ export interface CompletionCreateParamsBase {
|
|
|
209
223
|
* existing frequency in the text so far, decreasing the model's likelihood to
|
|
210
224
|
* repeat the same line verbatim.
|
|
211
225
|
*
|
|
212
|
-
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation
|
|
226
|
+
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
|
|
213
227
|
*/
|
|
214
228
|
frequency_penalty?: number | null;
|
|
215
229
|
|
|
@@ -264,7 +278,7 @@ export interface CompletionCreateParamsBase {
|
|
|
264
278
|
* whether they appear in the text so far, increasing the model's likelihood to
|
|
265
279
|
* talk about new topics.
|
|
266
280
|
*
|
|
267
|
-
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation
|
|
281
|
+
* [See more information about frequency and presence penalties.](https://platform.openai.com/docs/guides/text-generation)
|
|
268
282
|
*/
|
|
269
283
|
presence_penalty?: number | null;
|
|
270
284
|
|
|
@@ -327,7 +341,7 @@ export interface CompletionCreateParamsBase {
|
|
|
327
341
|
/**
|
|
328
342
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
329
343
|
* and detect abuse.
|
|
330
|
-
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices
|
|
344
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
|
|
331
345
|
*/
|
|
332
346
|
user?: string;
|
|
333
347
|
}
|
|
@@ -94,8 +94,8 @@ export interface EmbeddingCreateParams {
|
|
|
94
94
|
* ID of the model to use. You can use the
|
|
95
95
|
* [List models](https://platform.openai.com/docs/api-reference/models/list) API to
|
|
96
96
|
* see all of your available models, or see our
|
|
97
|
-
* [Model overview](https://platform.openai.com/docs/models
|
|
98
|
-
*
|
|
97
|
+
* [Model overview](https://platform.openai.com/docs/models) for descriptions of
|
|
98
|
+
* them.
|
|
99
99
|
*/
|
|
100
100
|
model: (string & {}) | EmbeddingModel;
|
|
101
101
|
|
|
@@ -114,7 +114,7 @@ export interface EmbeddingCreateParams {
|
|
|
114
114
|
/**
|
|
115
115
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
116
116
|
* and detect abuse.
|
|
117
|
-
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices
|
|
117
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
|
|
118
118
|
*/
|
|
119
119
|
user?: string;
|
|
120
120
|
}
|
package/src/resources/files.ts
CHANGED
|
@@ -5,7 +5,7 @@ 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 {
|
|
8
|
+
import { CursorPage, type CursorPageParams } from '../pagination';
|
|
9
9
|
import { type Response } from '../_shims/index';
|
|
10
10
|
|
|
11
11
|
export class Files extends APIResource {
|
|
@@ -44,7 +44,7 @@ export class Files extends APIResource {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* Returns a list of files
|
|
47
|
+
* Returns a list of files.
|
|
48
48
|
*/
|
|
49
49
|
list(query?: FileListParams, options?: Core.RequestOptions): Core.PagePromise<FileObjectsPage, FileObject>;
|
|
50
50
|
list(options?: Core.RequestOptions): Core.PagePromise<FileObjectsPage, FileObject>;
|
|
@@ -111,10 +111,7 @@ export class Files extends APIResource {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
* Note: no pagination actually occurs yet, this is for forwards-compatibility.
|
|
116
|
-
*/
|
|
117
|
-
export class FileObjectsPage extends Page<FileObject> {}
|
|
114
|
+
export class FileObjectsPage extends CursorPage<FileObject> {}
|
|
118
115
|
|
|
119
116
|
export type FileContent = string;
|
|
120
117
|
|
|
@@ -213,7 +210,13 @@ export interface FileCreateParams {
|
|
|
213
210
|
purpose: FilePurpose;
|
|
214
211
|
}
|
|
215
212
|
|
|
216
|
-
export interface FileListParams {
|
|
213
|
+
export interface FileListParams extends CursorPageParams {
|
|
214
|
+
/**
|
|
215
|
+
* Sort order by the `created_at` timestamp of the objects. `asc` for ascending
|
|
216
|
+
* order and `desc` for descending order.
|
|
217
|
+
*/
|
|
218
|
+
order?: 'asc' | 'desc';
|
|
219
|
+
|
|
217
220
|
/**
|
|
218
221
|
* Only return files with the given purpose.
|
|
219
222
|
*/
|
|
@@ -304,7 +304,7 @@ export interface FineTuningJobWandbIntegrationObject {
|
|
|
304
304
|
export interface JobCreateParams {
|
|
305
305
|
/**
|
|
306
306
|
* The name of the model to fine-tune. You can select one of the
|
|
307
|
-
* [supported models](https://platform.openai.com/docs/guides/fine-tuning
|
|
307
|
+
* [supported models](https://platform.openai.com/docs/guides/fine-tuning#which-models-can-be-fine-tuned).
|
|
308
308
|
*/
|
|
309
309
|
model: (string & {}) | 'babbage-002' | 'davinci-002' | 'gpt-3.5-turbo' | 'gpt-4o-mini';
|
|
310
310
|
|
package/src/resources/images.ts
CHANGED
|
@@ -94,7 +94,7 @@ export interface ImageCreateVariationParams {
|
|
|
94
94
|
/**
|
|
95
95
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
96
96
|
* and detect abuse.
|
|
97
|
-
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices
|
|
97
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
|
|
98
98
|
*/
|
|
99
99
|
user?: string;
|
|
100
100
|
}
|
|
@@ -146,7 +146,7 @@ export interface ImageEditParams {
|
|
|
146
146
|
/**
|
|
147
147
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
148
148
|
* and detect abuse.
|
|
149
|
-
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices
|
|
149
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
|
|
150
150
|
*/
|
|
151
151
|
user?: string;
|
|
152
152
|
}
|
|
@@ -201,7 +201,7 @@ export interface ImageGenerateParams {
|
|
|
201
201
|
/**
|
|
202
202
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
203
203
|
* and detect abuse.
|
|
204
|
-
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices
|
|
204
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
|
|
205
205
|
*/
|
|
206
206
|
user?: string;
|
|
207
207
|
}
|
|
@@ -351,7 +351,7 @@ export interface ModerationCreateParams {
|
|
|
351
351
|
* The content moderation model you would like to use. Learn more in
|
|
352
352
|
* [the moderation guide](https://platform.openai.com/docs/guides/moderation), and
|
|
353
353
|
* learn about available models
|
|
354
|
-
* [here](https://platform.openai.com/docs/models
|
|
354
|
+
* [here](https://platform.openai.com/docs/models#moderation).
|
|
355
355
|
*/
|
|
356
356
|
model?: (string & {}) | ModerationModel;
|
|
357
357
|
}
|
|
@@ -25,7 +25,7 @@ export class Uploads extends APIResource {
|
|
|
25
25
|
* For certain `purpose`s, the correct `mime_type` must be specified. Please refer
|
|
26
26
|
* to documentation for the supported MIME types for your use case:
|
|
27
27
|
*
|
|
28
|
-
* - [Assistants](https://platform.openai.com/docs/assistants/tools/file-search
|
|
28
|
+
* - [Assistants](https://platform.openai.com/docs/assistants/tools/file-search#supported-files)
|
|
29
29
|
*
|
|
30
30
|
* For guidance on the proper filename extensions for each purpose, please follow
|
|
31
31
|
* the documentation on
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.71.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.71.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.71.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|