openai 7.12.1 → 7.13.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 +7 -0
- package/package.json +1 -1
- package/resources/admin/organization/audit-logs.d.mts +1 -1
- package/resources/admin/organization/audit-logs.d.ts +1 -1
- package/resources/admin/organization/projects/api-keys.d.mts +5 -0
- package/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/api-keys.d.ts +5 -0
- package/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/projects/projects.d.mts +2 -2
- package/resources/admin/organization/projects/projects.d.ts +2 -2
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts +13 -0
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts +13 -0
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.js.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/audio/speech.d.mts +3 -2
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts +3 -2
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/transcriptions.d.mts +10 -10
- package/resources/audio/transcriptions.d.ts +10 -10
- package/resources/audio/translations.d.mts +1 -1
- package/resources/audio/translations.d.ts +1 -1
- package/resources/batches.d.mts +6 -5
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +6 -5
- package/resources/batches.d.ts.map +1 -1
- package/resources/beta/assistants.d.mts +143 -147
- package/resources/beta/assistants.d.mts.map +1 -1
- package/resources/beta/assistants.d.ts +143 -147
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/responses/input-tokens.d.mts +11 -11
- package/resources/beta/responses/input-tokens.d.ts +11 -11
- package/resources/beta/responses/responses.d.mts +181 -170
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +181 -170
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js +3 -3
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs +3 -3
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/beta/threads/messages.d.mts +29 -23
- package/resources/beta/threads/messages.d.mts.map +1 -1
- package/resources/beta/threads/messages.d.ts +29 -23
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.d.mts +39 -35
- package/resources/beta/threads/runs/runs.d.mts.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +39 -35
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.mts +14 -15
- package/resources/beta/threads/runs/steps.d.mts.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts +14 -15
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/threads.d.mts +53 -50
- package/resources/beta/threads/threads.d.mts.map +1 -1
- package/resources/beta/threads/threads.d.ts +53 -50
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/chat/completions/completions.d.mts +89 -81
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +89 -81
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/completions.d.mts +15 -14
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +15 -14
- package/resources/completions.d.ts.map +1 -1
- package/resources/content-provenance-checks.d.mts +1 -1
- package/resources/content-provenance-checks.d.ts +1 -1
- package/resources/content-provenance-checks.js +1 -1
- package/resources/content-provenance-checks.mjs +1 -1
- package/resources/conversations/items.d.mts +3 -3
- package/resources/conversations/items.d.ts +3 -3
- package/resources/embeddings.d.mts +6 -6
- package/resources/embeddings.d.ts +6 -6
- package/resources/evals/evals.d.mts +1 -1
- package/resources/evals/evals.d.ts +1 -1
- package/resources/evals/evals.js +1 -1
- package/resources/evals/evals.mjs +1 -1
- package/resources/evals/runs/runs.d.mts +62 -57
- package/resources/evals/runs/runs.d.mts.map +1 -1
- package/resources/evals/runs/runs.d.ts +62 -57
- package/resources/evals/runs/runs.d.ts.map +1 -1
- package/resources/evals/runs/runs.js.map +1 -1
- package/resources/evals/runs/runs.mjs.map +1 -1
- package/resources/files.d.mts +5 -5
- package/resources/files.d.ts +5 -5
- package/resources/files.js +5 -5
- package/resources/files.mjs +5 -5
- package/resources/fine-tuning/alpha/graders.d.mts +5 -4
- package/resources/fine-tuning/alpha/graders.d.mts.map +1 -1
- package/resources/fine-tuning/alpha/graders.d.ts +5 -4
- package/resources/fine-tuning/alpha/graders.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.mts +8 -4
- package/resources/fine-tuning/checkpoints/permissions.d.mts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.ts +8 -4
- package/resources/fine-tuning/checkpoints/permissions.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.js +8 -4
- package/resources/fine-tuning/checkpoints/permissions.js.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.mjs +8 -4
- package/resources/fine-tuning/checkpoints/permissions.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.mts +13 -12
- package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +13 -12
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js +2 -2
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs +2 -2
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/graders/grader-models.d.mts +1 -1
- package/resources/graders/grader-models.d.ts +1 -1
- package/resources/images.d.mts +10 -10
- package/resources/images.d.ts +10 -10
- package/resources/moderations.d.mts +5 -4
- package/resources/moderations.d.mts.map +1 -1
- package/resources/moderations.d.ts +5 -4
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +2 -1
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +2 -1
- package/resources/moderations.mjs.map +1 -1
- package/resources/realtime/calls.d.mts +1 -1
- package/resources/realtime/calls.d.ts +1 -1
- package/resources/realtime/client-secrets.d.mts +4 -4
- package/resources/realtime/client-secrets.d.ts +4 -4
- package/resources/realtime/client-secrets.js +1 -1
- package/resources/realtime/client-secrets.mjs +1 -1
- package/resources/realtime/realtime.d.mts +16 -16
- package/resources/realtime/realtime.d.ts +16 -16
- package/resources/responses/input-tokens.d.mts +9 -9
- package/resources/responses/input-tokens.d.ts +9 -9
- package/resources/responses/responses.d.mts +175 -164
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +175 -164
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +3 -3
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +3 -3
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/shared.d.mts +12 -12
- package/resources/shared.d.ts +12 -12
- package/resources/uploads/parts.d.mts +5 -4
- package/resources/uploads/parts.d.mts.map +1 -1
- package/resources/uploads/parts.d.ts +5 -4
- package/resources/uploads/parts.d.ts.map +1 -1
- package/resources/uploads/parts.js +5 -4
- package/resources/uploads/parts.js.map +1 -1
- package/resources/uploads/parts.mjs +5 -4
- package/resources/uploads/parts.mjs.map +1 -1
- package/resources/uploads/uploads.d.mts +11 -11
- package/resources/uploads/uploads.d.ts +11 -11
- package/resources/uploads/uploads.js +9 -9
- package/resources/uploads/uploads.mjs +9 -9
- package/resources/vector-stores/file-batches.d.mts +11 -11
- package/resources/vector-stores/file-batches.d.ts +11 -11
- package/resources/vector-stores/files.d.mts +8 -8
- package/resources/vector-stores/files.d.ts +8 -8
- package/resources/vector-stores/files.js +3 -3
- package/resources/vector-stores/files.mjs +3 -3
- package/resources/vector-stores/vector-stores.d.mts +3 -3
- package/resources/vector-stores/vector-stores.d.ts +3 -3
- package/resources/webhooks/webhooks.d.mts +6 -2
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +6 -2
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/src/resources/admin/organization/audit-logs.ts +1 -1
- package/src/resources/admin/organization/projects/api-keys.ts +6 -0
- package/src/resources/admin/organization/projects/projects.ts +2 -2
- package/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +15 -0
- package/src/resources/audio/speech.ts +3 -2
- package/src/resources/audio/transcriptions.ts +10 -10
- package/src/resources/audio/translations.ts +1 -1
- package/src/resources/batches.ts +6 -5
- package/src/resources/beta/assistants.ts +143 -147
- package/src/resources/beta/responses/input-tokens.ts +11 -11
- package/src/resources/beta/responses/responses.ts +181 -170
- package/src/resources/beta/threads/messages.ts +29 -23
- package/src/resources/beta/threads/runs/runs.ts +39 -35
- package/src/resources/beta/threads/runs/steps.ts +14 -15
- package/src/resources/beta/threads/threads.ts +53 -50
- package/src/resources/chat/completions/completions.ts +89 -81
- package/src/resources/completions.ts +15 -14
- package/src/resources/content-provenance-checks.ts +1 -1
- package/src/resources/conversations/items.ts +3 -3
- package/src/resources/embeddings.ts +6 -6
- package/src/resources/evals/evals.ts +1 -1
- package/src/resources/evals/runs/runs.ts +62 -57
- package/src/resources/files.ts +5 -5
- package/src/resources/fine-tuning/alpha/graders.ts +5 -4
- package/src/resources/fine-tuning/checkpoints/permissions.ts +8 -4
- package/src/resources/fine-tuning/jobs/jobs.ts +13 -12
- package/src/resources/graders/grader-models.ts +1 -1
- package/src/resources/images.ts +10 -10
- package/src/resources/moderations.ts +5 -4
- package/src/resources/realtime/calls.ts +1 -1
- package/src/resources/realtime/client-secrets.ts +4 -4
- package/src/resources/realtime/realtime.ts +16 -16
- package/src/resources/responses/input-tokens.ts +9 -9
- package/src/resources/responses/responses.ts +175 -164
- package/src/resources/shared.ts +12 -12
- package/src/resources/uploads/parts.ts +5 -4
- package/src/resources/uploads/uploads.ts +11 -11
- package/src/resources/vector-stores/file-batches.ts +11 -11
- package/src/resources/vector-stores/files.ts +8 -8
- package/src/resources/vector-stores/vector-stores.ts +3 -3
- package/src/resources/webhooks/webhooks.ts +6 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -35,22 +35,22 @@ export class Completions extends APIResource {
|
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* **Starting a new project?** We recommend trying
|
|
38
|
-
* [Responses](https://
|
|
39
|
-
* advantage of the latest OpenAI platform features. Compare
|
|
40
|
-
* [Chat Completions with Responses](https://
|
|
38
|
+
* [Responses](https://developers.openai.com/api/reference/resources/responses) to
|
|
39
|
+
* take advantage of the latest OpenAI platform features. Compare
|
|
40
|
+
* [Chat Completions with Responses](https://developers.openai.com/api/docs/guides/migrate-to-responses?api-mode=responses).
|
|
41
41
|
*
|
|
42
42
|
* ---
|
|
43
43
|
*
|
|
44
44
|
* Creates a model response for the given chat conversation. Learn more in the
|
|
45
|
-
* [text generation](https://
|
|
46
|
-
* [vision](https://
|
|
47
|
-
* [audio](https://
|
|
45
|
+
* [text generation](https://developers.openai.com/api/docs/guides/text),
|
|
46
|
+
* [vision](https://developers.openai.com/api/docs/guides/images-vision), and
|
|
47
|
+
* [audio](https://developers.openai.com/api/docs/guides/audio) guides.
|
|
48
48
|
*
|
|
49
49
|
* Parameter support can differ depending on the model used to generate the
|
|
50
50
|
* response, particularly for newer reasoning models. Parameters that are only
|
|
51
51
|
* supported for reasoning models are noted below. For the current state of
|
|
52
52
|
* unsupported parameters in reasoning models,
|
|
53
|
-
* [refer to the reasoning guide](https://
|
|
53
|
+
* [refer to the reasoning guide](https://developers.openai.com/api/docs/guides/reasoning).
|
|
54
54
|
*
|
|
55
55
|
* Returns a chat completion object, or a streamed sequence of chat completion
|
|
56
56
|
* chunk objects if the request is streamed.
|
|
@@ -383,13 +383,15 @@ export interface ChatCompletion {
|
|
|
383
383
|
* will use 'default'.
|
|
384
384
|
* - If set to 'default', then the request will be processed with the standard
|
|
385
385
|
* pricing and performance for the selected model.
|
|
386
|
-
* - If set to
|
|
387
|
-
* then
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
386
|
+
* - If set to
|
|
387
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
388
|
+
* the request will be processed with the Flex Processing service tier.
|
|
389
|
+
* - To opt-in to
|
|
390
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
391
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
392
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
393
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
394
|
+
* `priority` in your request.
|
|
393
395
|
* - When not set, the default behavior is 'auto'.
|
|
394
396
|
*
|
|
395
397
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -663,7 +665,7 @@ export interface ChatCompletionAssistantMessageParam {
|
|
|
663
665
|
|
|
664
666
|
/**
|
|
665
667
|
* Data about a previous audio response from the model.
|
|
666
|
-
* [Learn more](https://
|
|
668
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/audio).
|
|
667
669
|
*/
|
|
668
670
|
audio?: ChatCompletionAssistantMessageParam.Audio | null;
|
|
669
671
|
|
|
@@ -699,7 +701,7 @@ export interface ChatCompletionAssistantMessageParam {
|
|
|
699
701
|
export namespace ChatCompletionAssistantMessageParam {
|
|
700
702
|
/**
|
|
701
703
|
* Data about a previous audio response from the model.
|
|
702
|
-
* [Learn more](https://
|
|
704
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/audio).
|
|
703
705
|
*/
|
|
704
706
|
export interface Audio {
|
|
705
707
|
/**
|
|
@@ -731,7 +733,7 @@ export namespace ChatCompletionAssistantMessageParam {
|
|
|
731
733
|
/**
|
|
732
734
|
* If the audio output modality is requested, this object contains data about the
|
|
733
735
|
* audio response from the model.
|
|
734
|
-
* [Learn more](https://
|
|
736
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/audio).
|
|
735
737
|
*/
|
|
736
738
|
export interface ChatCompletionAudio {
|
|
737
739
|
/**
|
|
@@ -760,7 +762,7 @@ export interface ChatCompletionAudio {
|
|
|
760
762
|
/**
|
|
761
763
|
* Parameters for audio output. Required when audio output is requested with
|
|
762
764
|
* `modalities: ["audio"]`.
|
|
763
|
-
* [Learn more](https://
|
|
765
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/audio).
|
|
764
766
|
*/
|
|
765
767
|
export interface ChatCompletionAudioParam {
|
|
766
768
|
/**
|
|
@@ -805,7 +807,7 @@ export namespace ChatCompletionAudioParam {
|
|
|
805
807
|
/**
|
|
806
808
|
* Represents a streamed chunk of a chat completion response returned by the model,
|
|
807
809
|
* based on the provided input.
|
|
808
|
-
* [Learn more](https://
|
|
810
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses).
|
|
809
811
|
*/
|
|
810
812
|
export interface ChatCompletionChunk {
|
|
811
813
|
/**
|
|
@@ -857,13 +859,15 @@ export interface ChatCompletionChunk {
|
|
|
857
859
|
* will use 'default'.
|
|
858
860
|
* - If set to 'default', then the request will be processed with the standard
|
|
859
861
|
* pricing and performance for the selected model.
|
|
860
|
-
* - If set to
|
|
861
|
-
* then
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
*
|
|
865
|
-
*
|
|
866
|
-
*
|
|
862
|
+
* - If set to
|
|
863
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
864
|
+
* the request will be processed with the Flex Processing service tier.
|
|
865
|
+
* - To opt-in to
|
|
866
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
867
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
868
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
869
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
870
|
+
* `priority` in your request.
|
|
867
871
|
* - When not set, the default behavior is 'auto'.
|
|
868
872
|
*
|
|
869
873
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1211,8 +1215,7 @@ export namespace ChatCompletionChunk {
|
|
|
1211
1215
|
}
|
|
1212
1216
|
|
|
1213
1217
|
/**
|
|
1214
|
-
* Learn about
|
|
1215
|
-
* [text inputs](https://platform.openai.com/docs/guides/text-generation).
|
|
1218
|
+
* Learn about [text inputs](https://developers.openai.com/api/docs/guides/text).
|
|
1216
1219
|
*/
|
|
1217
1220
|
export type ChatCompletionContentPart =
|
|
1218
1221
|
| ChatCompletionContentPartText
|
|
@@ -1222,8 +1225,8 @@ export type ChatCompletionContentPart =
|
|
|
1222
1225
|
|
|
1223
1226
|
export namespace ChatCompletionContentPart {
|
|
1224
1227
|
/**
|
|
1225
|
-
* Learn about [file inputs](https://
|
|
1226
|
-
* generation.
|
|
1228
|
+
* Learn about [file inputs](https://developers.openai.com/api/docs/guides/text)
|
|
1229
|
+
* for text generation.
|
|
1227
1230
|
*/
|
|
1228
1231
|
export interface File {
|
|
1229
1232
|
file: File.File;
|
|
@@ -1275,7 +1278,8 @@ export namespace ChatCompletionContentPart {
|
|
|
1275
1278
|
}
|
|
1276
1279
|
|
|
1277
1280
|
/**
|
|
1278
|
-
* Learn about
|
|
1281
|
+
* Learn about
|
|
1282
|
+
* [image inputs](https://developers.openai.com/api/docs/guides/images-vision).
|
|
1279
1283
|
*/
|
|
1280
1284
|
export interface ChatCompletionContentPartImage {
|
|
1281
1285
|
image_url: ChatCompletionContentPartImage.ImageURL;
|
|
@@ -1302,7 +1306,7 @@ export namespace ChatCompletionContentPartImage {
|
|
|
1302
1306
|
|
|
1303
1307
|
/**
|
|
1304
1308
|
* Specifies the detail level of the image. Learn more in the
|
|
1305
|
-
* [Vision guide](https://
|
|
1309
|
+
* [Vision guide](https://developers.openai.com/api/docs/guides/images-vision#choose-an-image-detail-level).
|
|
1306
1310
|
*/
|
|
1307
1311
|
detail?: 'auto' | 'low' | 'high';
|
|
1308
1312
|
}
|
|
@@ -1321,7 +1325,7 @@ export namespace ChatCompletionContentPartImage {
|
|
|
1321
1325
|
}
|
|
1322
1326
|
|
|
1323
1327
|
/**
|
|
1324
|
-
* Learn about [audio inputs](https://
|
|
1328
|
+
* Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio).
|
|
1325
1329
|
*/
|
|
1326
1330
|
export interface ChatCompletionContentPartInputAudio {
|
|
1327
1331
|
input_audio: ChatCompletionContentPartInputAudio.InputAudio;
|
|
@@ -1378,8 +1382,7 @@ export interface ChatCompletionContentPartRefusal {
|
|
|
1378
1382
|
}
|
|
1379
1383
|
|
|
1380
1384
|
/**
|
|
1381
|
-
* Learn about
|
|
1382
|
-
* [text inputs](https://platform.openai.com/docs/guides/text-generation).
|
|
1385
|
+
* Learn about [text inputs](https://developers.openai.com/api/docs/guides/text).
|
|
1383
1386
|
*/
|
|
1384
1387
|
export interface ChatCompletionContentPartText {
|
|
1385
1388
|
/**
|
|
@@ -1599,14 +1602,14 @@ export interface ChatCompletionMessage {
|
|
|
1599
1602
|
|
|
1600
1603
|
/**
|
|
1601
1604
|
* Annotations for the message, when applicable, as when using the
|
|
1602
|
-
* [web search tool](https://
|
|
1605
|
+
* [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).
|
|
1603
1606
|
*/
|
|
1604
1607
|
annotations?: Array<ChatCompletionMessage.Annotation>;
|
|
1605
1608
|
|
|
1606
1609
|
/**
|
|
1607
1610
|
* If the audio output modality is requested, this object contains data about the
|
|
1608
1611
|
* audio response from the model.
|
|
1609
|
-
* [Learn more](https://
|
|
1612
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/audio).
|
|
1610
1613
|
*/
|
|
1611
1614
|
audio?: ChatCompletionAudio | null;
|
|
1612
1615
|
|
|
@@ -2070,11 +2073,11 @@ export type ChatCompletionCreateParams =
|
|
|
2070
2073
|
export interface ChatCompletionCreateParamsBase {
|
|
2071
2074
|
/**
|
|
2072
2075
|
* A list of messages comprising the conversation so far. Depending on the
|
|
2073
|
-
* [model](https://
|
|
2074
|
-
* types (modalities) are supported, like
|
|
2075
|
-
* [text](https://
|
|
2076
|
-
* [images](https://
|
|
2077
|
-
* [audio](https://
|
|
2076
|
+
* [model](https://developers.openai.com/api/docs/models) you use, different
|
|
2077
|
+
* message types (modalities) are supported, like
|
|
2078
|
+
* [text](https://developers.openai.com/api/docs/guides/text),
|
|
2079
|
+
* [images](https://developers.openai.com/api/docs/guides/images-vision), and
|
|
2080
|
+
* [audio](https://developers.openai.com/api/docs/guides/audio).
|
|
2078
2081
|
*/
|
|
2079
2082
|
messages: Array<ChatCompletionMessageParam>;
|
|
2080
2083
|
|
|
@@ -2082,15 +2085,15 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2082
2085
|
* Model ID used to generate the response, like `gpt-6-astra` or `o3`. OpenAI
|
|
2083
2086
|
* offers a wide range of models with different capabilities, performance
|
|
2084
2087
|
* characteristics, and price points. Refer to the
|
|
2085
|
-
* [model guide](https://
|
|
2086
|
-
* available models.
|
|
2088
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
2089
|
+
* compare available models.
|
|
2087
2090
|
*/
|
|
2088
2091
|
model: (string & {}) | Shared.ChatModel;
|
|
2089
2092
|
|
|
2090
2093
|
/**
|
|
2091
2094
|
* Parameters for audio output. Required when audio output is requested with
|
|
2092
2095
|
* `modalities: ["audio"]`.
|
|
2093
|
-
* [Learn more](https://
|
|
2096
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/audio).
|
|
2094
2097
|
*/
|
|
2095
2098
|
audio?: ChatCompletionAudioParam | null;
|
|
2096
2099
|
|
|
@@ -2148,18 +2151,19 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2148
2151
|
/**
|
|
2149
2152
|
* An upper bound for the number of tokens that can be generated for a completion,
|
|
2150
2153
|
* including visible output tokens and
|
|
2151
|
-
* [reasoning tokens](https://
|
|
2154
|
+
* [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
2152
2155
|
*/
|
|
2153
2156
|
max_completion_tokens?: number | null;
|
|
2154
2157
|
|
|
2155
2158
|
/**
|
|
2156
|
-
* @deprecated The maximum number of
|
|
2157
|
-
*
|
|
2159
|
+
* @deprecated The maximum number of
|
|
2160
|
+
* [tokens](https://platform.openai.com/tokenizer) that can be generated in the
|
|
2161
|
+
* chat completion. This value can be used to control
|
|
2158
2162
|
* [costs](https://openai.com/api/pricing/) for text generated via API.
|
|
2159
2163
|
*
|
|
2160
2164
|
* This value is now deprecated in favor of `max_completion_tokens`, and is not
|
|
2161
2165
|
* compatible with
|
|
2162
|
-
* [o-series models](https://
|
|
2166
|
+
* [o-series models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
2163
2167
|
*/
|
|
2164
2168
|
max_tokens?: number | null;
|
|
2165
2169
|
|
|
@@ -2180,8 +2184,8 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2180
2184
|
* `["text"]`
|
|
2181
2185
|
*
|
|
2182
2186
|
* The `gpt-4o-audio-preview` model can also be used to
|
|
2183
|
-
* [generate audio](https://
|
|
2184
|
-
* this model generate both text and audio responses, you can use:
|
|
2187
|
+
* [generate audio](https://developers.openai.com/api/docs/guides/audio). To
|
|
2188
|
+
* request that this model generate both text and audio responses, you can use:
|
|
2185
2189
|
*
|
|
2186
2190
|
* `["text", "audio"]`
|
|
2187
2191
|
*/
|
|
@@ -2201,7 +2205,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2201
2205
|
|
|
2202
2206
|
/**
|
|
2203
2207
|
* Whether to enable
|
|
2204
|
-
* [parallel function calling](https://
|
|
2208
|
+
* [parallel function calling](https://developers.openai.com/api/docs/guides/function-calling#parallel-function-calling)
|
|
2205
2209
|
* during tool use.
|
|
2206
2210
|
*/
|
|
2207
2211
|
parallel_tool_calls?: boolean;
|
|
@@ -2222,7 +2226,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2222
2226
|
/**
|
|
2223
2227
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
2224
2228
|
* hit rates. Replaces the `user` field.
|
|
2225
|
-
* [Learn more](https://
|
|
2229
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
2226
2230
|
*/
|
|
2227
2231
|
prompt_cache_key?: string | null;
|
|
2228
2232
|
|
|
@@ -2234,7 +2238,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2234
2238
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
2235
2239
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
2236
2240
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
2237
|
-
* [prompt caching guide](https://
|
|
2241
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
2238
2242
|
* for current details.
|
|
2239
2243
|
*/
|
|
2240
2244
|
prompt_cache_options?: ChatCompletionCreateParams.PromptCacheOptions;
|
|
@@ -2245,7 +2249,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2245
2249
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
2246
2250
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
2247
2251
|
* of 24 hours.
|
|
2248
|
-
* [Learn more](https://
|
|
2252
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
2249
2253
|
* This field expresses a maximum retention policy, while
|
|
2250
2254
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
2251
2255
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -2265,7 +2269,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2265
2269
|
* are `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. Reducing
|
|
2266
2270
|
* reasoning effort can result in faster responses and fewer tokens used on
|
|
2267
2271
|
* reasoning in a response. Not all reasoning models support every value. See the
|
|
2268
|
-
* [reasoning guide](https://
|
|
2272
|
+
* [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for
|
|
2269
2273
|
* model-specific support.
|
|
2270
2274
|
*/
|
|
2271
2275
|
reasoning_effort?: Shared.ReasoningEffort | null;
|
|
@@ -2276,7 +2280,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2276
2280
|
* Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
|
|
2277
2281
|
* Outputs which ensures the model will match your supplied JSON schema. Learn more
|
|
2278
2282
|
* in the
|
|
2279
|
-
* [Structured Outputs guide](https://
|
|
2283
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
2280
2284
|
*
|
|
2281
2285
|
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
|
|
2282
2286
|
* ensures the message the model generates is valid JSON. Using `json_schema` is
|
|
@@ -2293,7 +2297,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2293
2297
|
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
2294
2298
|
* hashing their username or email address, in order to avoid sending us any
|
|
2295
2299
|
* identifying information.
|
|
2296
|
-
* [Learn more](https://
|
|
2300
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
2297
2301
|
*/
|
|
2298
2302
|
safety_identifier?: string | null;
|
|
2299
2303
|
|
|
@@ -2314,13 +2318,15 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2314
2318
|
* will use 'default'.
|
|
2315
2319
|
* - If set to 'default', then the request will be processed with the standard
|
|
2316
2320
|
* pricing and performance for the selected model.
|
|
2317
|
-
* - If set to
|
|
2318
|
-
* then
|
|
2319
|
-
*
|
|
2320
|
-
*
|
|
2321
|
-
*
|
|
2322
|
-
*
|
|
2323
|
-
*
|
|
2321
|
+
* - If set to
|
|
2322
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
2323
|
+
* the request will be processed with the Flex Processing service tier.
|
|
2324
|
+
* - To opt-in to
|
|
2325
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
2326
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
2327
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
2328
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
2329
|
+
* `priority` in your request.
|
|
2324
2330
|
* - When not set, the default behavior is 'auto'.
|
|
2325
2331
|
*
|
|
2326
2332
|
* When the `service_tier` parameter is set, the response body will include the
|
|
@@ -2340,8 +2346,9 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2340
2346
|
|
|
2341
2347
|
/**
|
|
2342
2348
|
* Whether or not to store the output of this chat completion request for use in
|
|
2343
|
-
* our
|
|
2344
|
-
*
|
|
2349
|
+
* our
|
|
2350
|
+
* [model distillation](https://developers.openai.com/api/docs/guides/supervised-fine-tuning#distilling-from-a-larger-model)
|
|
2351
|
+
* or [evals](https://developers.openai.com/api/docs/guides/evals) products.
|
|
2345
2352
|
*
|
|
2346
2353
|
* Supports text and image inputs. Note: image inputs over 8MB will be dropped.
|
|
2347
2354
|
*/
|
|
@@ -2352,9 +2359,9 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2352
2359
|
* generated using
|
|
2353
2360
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
2354
2361
|
* See the
|
|
2355
|
-
* [Streaming section below](https://
|
|
2362
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events)
|
|
2356
2363
|
* for more information, along with the
|
|
2357
|
-
* [streaming responses](https://
|
|
2364
|
+
* [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses)
|
|
2358
2365
|
* guide for more information on how to handle the streaming events.
|
|
2359
2366
|
*/
|
|
2360
2367
|
stream?: boolean | null;
|
|
@@ -2387,8 +2394,9 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2387
2394
|
|
|
2388
2395
|
/**
|
|
2389
2396
|
* A list of tools the model may call. You can provide either
|
|
2390
|
-
* [custom tools](https://
|
|
2391
|
-
* or
|
|
2397
|
+
* [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)
|
|
2398
|
+
* or
|
|
2399
|
+
* [function tools](https://developers.openai.com/api/docs/guides/function-calling).
|
|
2392
2400
|
*/
|
|
2393
2401
|
tools?: Array<ChatCompletionTool>;
|
|
2394
2402
|
|
|
@@ -2415,7 +2423,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2415
2423
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
2416
2424
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
2417
2425
|
* abuse.
|
|
2418
|
-
* [Learn more](https://
|
|
2426
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
2419
2427
|
*/
|
|
2420
2428
|
user?: string;
|
|
2421
2429
|
|
|
@@ -2430,7 +2438,7 @@ export interface ChatCompletionCreateParamsBase {
|
|
|
2430
2438
|
/**
|
|
2431
2439
|
* This tool searches the web for relevant results to use in a response. Learn more
|
|
2432
2440
|
* about the
|
|
2433
|
-
* [web search tool](https://
|
|
2441
|
+
* [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).
|
|
2434
2442
|
*/
|
|
2435
2443
|
web_search_options?: ChatCompletionCreateParams.WebSearchOptions;
|
|
2436
2444
|
}
|
|
@@ -2454,8 +2462,8 @@ export namespace ChatCompletionCreateParams {
|
|
|
2454
2462
|
|
|
2455
2463
|
/**
|
|
2456
2464
|
* The parameters the functions accepts, described as a JSON Schema object. See the
|
|
2457
|
-
* [guide](https://
|
|
2458
|
-
* and the
|
|
2465
|
+
* [guide](https://developers.openai.com/api/docs/guides/function-calling) for
|
|
2466
|
+
* examples, and the
|
|
2459
2467
|
* [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for
|
|
2460
2468
|
* documentation about the format.
|
|
2461
2469
|
*
|
|
@@ -2521,7 +2529,7 @@ export namespace ChatCompletionCreateParams {
|
|
|
2521
2529
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
2522
2530
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
2523
2531
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
2524
|
-
* [prompt caching guide](https://
|
|
2532
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
2525
2533
|
* for current details.
|
|
2526
2534
|
*/
|
|
2527
2535
|
export interface PromptCacheOptions {
|
|
@@ -2546,7 +2554,7 @@ export namespace ChatCompletionCreateParams {
|
|
|
2546
2554
|
/**
|
|
2547
2555
|
* This tool searches the web for relevant results to use in a response. Learn more
|
|
2548
2556
|
* about the
|
|
2549
|
-
* [web search tool](https://
|
|
2557
|
+
* [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).
|
|
2550
2558
|
*/
|
|
2551
2559
|
export interface WebSearchOptions {
|
|
2552
2560
|
/**
|
|
@@ -2618,9 +2626,9 @@ export interface ChatCompletionCreateParamsNonStreaming extends ChatCompletionCr
|
|
|
2618
2626
|
* generated using
|
|
2619
2627
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
2620
2628
|
* See the
|
|
2621
|
-
* [Streaming section below](https://
|
|
2629
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events)
|
|
2622
2630
|
* for more information, along with the
|
|
2623
|
-
* [streaming responses](https://
|
|
2631
|
+
* [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses)
|
|
2624
2632
|
* guide for more information on how to handle the streaming events.
|
|
2625
2633
|
*/
|
|
2626
2634
|
stream?: false | null;
|
|
@@ -2632,9 +2640,9 @@ export interface ChatCompletionCreateParamsStreaming extends ChatCompletionCreat
|
|
|
2632
2640
|
* generated using
|
|
2633
2641
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
2634
2642
|
* See the
|
|
2635
|
-
* [Streaming section below](https://
|
|
2643
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/chat/subresources/completions/streaming-events)
|
|
2636
2644
|
* for more information, along with the
|
|
2637
|
-
* [streaming responses](https://
|
|
2645
|
+
* [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses)
|
|
2638
2646
|
* guide for more information on how to handle the streaming events.
|
|
2639
2647
|
*/
|
|
2640
2648
|
stream: true;
|
|
@@ -217,10 +217,10 @@ export type CompletionCreateParams = CompletionCreateParamsNonStreaming | Comple
|
|
|
217
217
|
export interface CompletionCreateParamsBase {
|
|
218
218
|
/**
|
|
219
219
|
* ID of the model to use. You can use the
|
|
220
|
-
* [List models](https://
|
|
221
|
-
* see all of your available models, or see our
|
|
222
|
-
* [Model overview](https://
|
|
223
|
-
* them.
|
|
220
|
+
* [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
221
|
+
* API to see all of your available models, or see our
|
|
222
|
+
* [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
223
|
+
* of them.
|
|
224
224
|
*/
|
|
225
225
|
model: (string & {}) | 'gpt-3.5-turbo-instruct' | 'davinci-002' | 'babbage-002';
|
|
226
226
|
|
|
@@ -257,7 +257,7 @@ export interface CompletionCreateParamsBase {
|
|
|
257
257
|
* existing frequency in the text so far, decreasing the model's likelihood to
|
|
258
258
|
* repeat the same line verbatim.
|
|
259
259
|
*
|
|
260
|
-
* [See more information about frequency and presence penalties.](https://
|
|
260
|
+
* [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text)
|
|
261
261
|
*/
|
|
262
262
|
frequency_penalty?: number | null;
|
|
263
263
|
|
|
@@ -266,11 +266,12 @@ export interface CompletionCreateParamsBase {
|
|
|
266
266
|
*
|
|
267
267
|
* Accepts a JSON object that maps tokens (specified by their token ID in the GPT
|
|
268
268
|
* tokenizer) to an associated bias value from -100 to 100. You can use this
|
|
269
|
-
* [tokenizer tool](/tokenizer?view=bpe) to convert text
|
|
270
|
-
* Mathematically, the bias is added to the logits generated by the
|
|
271
|
-
* sampling. The exact effect will vary per model, but values
|
|
272
|
-
* should decrease or increase likelihood of selection; values
|
|
273
|
-
* should result in a ban or exclusive selection of the relevant
|
|
269
|
+
* [tokenizer tool](https://platform.openai.com/tokenizer?view=bpe) to convert text
|
|
270
|
+
* to token IDs. Mathematically, the bias is added to the logits generated by the
|
|
271
|
+
* model prior to sampling. The exact effect will vary per model, but values
|
|
272
|
+
* between -1 and 1 should decrease or increase likelihood of selection; values
|
|
273
|
+
* like -100 or 100 should result in a ban or exclusive selection of the relevant
|
|
274
|
+
* token.
|
|
274
275
|
*
|
|
275
276
|
* As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token
|
|
276
277
|
* from being generated.
|
|
@@ -288,8 +289,8 @@ export interface CompletionCreateParamsBase {
|
|
|
288
289
|
logprobs?: number | null;
|
|
289
290
|
|
|
290
291
|
/**
|
|
291
|
-
* The maximum number of [tokens](/tokenizer) that can
|
|
292
|
-
* completion.
|
|
292
|
+
* The maximum number of [tokens](https://platform.openai.com/tokenizer) that can
|
|
293
|
+
* be generated in the completion.
|
|
293
294
|
*
|
|
294
295
|
* The token count of your prompt plus `max_tokens` cannot exceed the model's
|
|
295
296
|
* context length.
|
|
@@ -312,7 +313,7 @@ export interface CompletionCreateParamsBase {
|
|
|
312
313
|
* whether they appear in the text so far, increasing the model's likelihood to
|
|
313
314
|
* talk about new topics.
|
|
314
315
|
*
|
|
315
|
-
* [See more information about frequency and presence penalties.](https://
|
|
316
|
+
* [See more information about frequency and presence penalties.](https://developers.openai.com/api/docs/guides/text)
|
|
316
317
|
*/
|
|
317
318
|
presence_penalty?: number | null;
|
|
318
319
|
|
|
@@ -377,7 +378,7 @@ export interface CompletionCreateParamsBase {
|
|
|
377
378
|
/**
|
|
378
379
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
379
380
|
* and detect abuse.
|
|
380
|
-
* [Learn more](https://
|
|
381
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
381
382
|
*/
|
|
382
383
|
user?: string;
|
|
383
384
|
}
|
|
@@ -9,7 +9,7 @@ import { multipartFormRequestOptions } from '../internal/uploads';
|
|
|
9
9
|
export class ContentProvenanceChecks extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Check whether an image or audio file contains known OpenAI provenance signals.
|
|
12
|
-
* [Learn more about content provenance](/api/docs/guides/content-provenance).
|
|
12
|
+
* [Learn more about content provenance](https://developers.openai.com/api/docs/guides/content-provenance).
|
|
13
13
|
*
|
|
14
14
|
* If `not_detected`, it means the tool did not find supported signals in the
|
|
15
15
|
* uploaded file. The content could still have been generated by OpenAI if the
|
|
@@ -85,7 +85,7 @@ export type ConversationItemsPage = ConversationCursorPage<ConversationItem>;
|
|
|
85
85
|
/**
|
|
86
86
|
* A single item within a conversation. The set of possible types are the same as
|
|
87
87
|
* the `output` type of a
|
|
88
|
-
* [Response object](https://
|
|
88
|
+
* [Response object](https://developers.openai.com/api/reference/resources/responses#%28resource%29%20responses%20%3E%20%28model%29%20response%20%3E%20%28schema%29%20%3E%20%28property%29%20output).
|
|
89
89
|
*/
|
|
90
90
|
export type ConversationItem =
|
|
91
91
|
| ConversationsAPI.Message
|
|
@@ -534,7 +534,7 @@ export interface ItemCreateParams {
|
|
|
534
534
|
/**
|
|
535
535
|
* Query param: Additional fields to include in the response. See the `include`
|
|
536
536
|
* parameter for
|
|
537
|
-
* [listing Conversation items above](https://
|
|
537
|
+
* [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29)
|
|
538
538
|
* for more information.
|
|
539
539
|
*/
|
|
540
540
|
include?: Array<ResponsesAPI.ResponseIncludable>;
|
|
@@ -549,7 +549,7 @@ export interface ItemRetrieveParams {
|
|
|
549
549
|
/**
|
|
550
550
|
* Query param: Additional fields to include in the response. See the `include`
|
|
551
551
|
* parameter for
|
|
552
|
-
* [listing Conversation items above](https://
|
|
552
|
+
* [listing Conversation items above](https://developers.openai.com/api/reference/resources/conversations/subresources/items/methods/list#%28resource%29%20conversations.items%20%3E%20%28method%29%20list%20%3E%20%28params%29%20default%20%3E%20%28param%29%20include%20%3E%20%28schema%29)
|
|
553
553
|
* for more information.
|
|
554
554
|
*/
|
|
555
555
|
include?: Array<ResponsesAPI.ResponseIncludable>;
|
|
@@ -84,7 +84,7 @@ export interface Embedding {
|
|
|
84
84
|
/**
|
|
85
85
|
* The embedding vector, which is a list of floats. The length of vector depends on
|
|
86
86
|
* the model as listed in the
|
|
87
|
-
* [embedding guide](https://
|
|
87
|
+
* [embedding guide](https://developers.openai.com/api/docs/guides/embeddings).
|
|
88
88
|
*/
|
|
89
89
|
embedding: Array<number>;
|
|
90
90
|
|
|
@@ -117,10 +117,10 @@ export interface EmbeddingCreateParams {
|
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
119
|
* ID of the model to use. You can use the
|
|
120
|
-
* [List models](https://
|
|
121
|
-
* see all of your available models, or see our
|
|
122
|
-
* [Model overview](https://
|
|
123
|
-
* them.
|
|
120
|
+
* [List models](https://developers.openai.com/api/reference/resources/models/methods/list)
|
|
121
|
+
* API to see all of your available models, or see our
|
|
122
|
+
* [Model overview](https://developers.openai.com/api/docs/models) for descriptions
|
|
123
|
+
* of them.
|
|
124
124
|
*/
|
|
125
125
|
model: (string & {}) | EmbeddingModel;
|
|
126
126
|
|
|
@@ -139,7 +139,7 @@ export interface EmbeddingCreateParams {
|
|
|
139
139
|
/**
|
|
140
140
|
* A unique identifier representing your end-user, which can help OpenAI to monitor
|
|
141
141
|
* and detect abuse.
|
|
142
|
-
* [Learn more](https://
|
|
142
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
143
143
|
*/
|
|
144
144
|
user?: string;
|
|
145
145
|
}
|
|
@@ -39,7 +39,7 @@ export class Evals extends APIResource {
|
|
|
39
39
|
* data source, which dictates the schema of the data used in the evaluation. After
|
|
40
40
|
* creating an evaluation, you can run it on different models and model parameters.
|
|
41
41
|
* We support several types of graders and datasources. For more information, see
|
|
42
|
-
* the [Evals guide](https://
|
|
42
|
+
* the [Evals guide](https://developers.openai.com/api/docs/guides/evals).
|
|
43
43
|
*/
|
|
44
44
|
create(body: EvalCreateParams, options?: RequestOptions): APIPromise<EvalCreateResponse> {
|
|
45
45
|
return this._client.post('/evals', { body, ...options, __security: { bearerAuth: true } });
|