llama-stack-client 0.4.0-rc1 → 0.4.0-rc3
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/README.md +33 -22
- package/index.d.mts +12 -6
- package/index.d.ts +12 -6
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +7 -1
- package/resources/alpha/admin.d.ts +41 -0
- package/resources/alpha/admin.d.ts.map +1 -0
- package/resources/alpha/admin.js +46 -0
- package/resources/alpha/admin.js.map +1 -0
- package/resources/alpha/admin.mjs +42 -0
- package/resources/alpha/admin.mjs.map +1 -0
- package/resources/alpha/alpha.d.ts +6 -2
- package/resources/alpha/alpha.d.ts.map +1 -1
- package/resources/alpha/alpha.js +4 -0
- package/resources/alpha/alpha.js.map +1 -1
- package/resources/alpha/alpha.mjs +4 -0
- package/resources/alpha/alpha.mjs.map +1 -1
- package/resources/alpha/benchmarks.d.ts +37 -1
- package/resources/alpha/benchmarks.d.ts.map +1 -1
- package/resources/alpha/index.d.ts +2 -1
- package/resources/alpha/index.d.ts.map +1 -1
- package/resources/alpha/index.js +3 -1
- package/resources/alpha/index.js.map +1 -1
- package/resources/alpha/index.mjs +1 -0
- package/resources/alpha/index.mjs.map +1 -1
- package/resources/alpha/post-training/index.d.ts +2 -2
- package/resources/alpha/post-training/index.d.ts.map +1 -1
- package/resources/alpha/post-training/index.js.map +1 -1
- package/resources/alpha/post-training/index.mjs.map +1 -1
- package/resources/alpha/post-training/job.d.ts +1 -4
- package/resources/alpha/post-training/job.d.ts.map +1 -1
- package/resources/alpha/post-training/post-training.d.ts +6 -3
- package/resources/alpha/post-training/post-training.d.ts.map +1 -1
- package/resources/alpha/post-training/post-training.js.map +1 -1
- package/resources/alpha/post-training/post-training.mjs.map +1 -1
- package/resources/beta/datasets.d.ts +89 -8
- package/resources/beta/datasets.d.ts.map +1 -1
- package/resources/chat/chat.d.ts +2 -2
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/completions.d.ts +6 -6
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/completions.d.ts +2 -2
- package/resources/completions.d.ts.map +1 -1
- package/resources/conversations/conversations.d.ts +32 -4
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/items.d.ts +124 -12
- package/resources/conversations/items.d.ts.map +1 -1
- package/resources/conversations/items.js.map +1 -1
- package/resources/conversations/items.mjs.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/inspect.d.ts +3 -45
- package/resources/inspect.d.ts.map +1 -1
- package/resources/inspect.js +0 -4
- package/resources/inspect.js.map +1 -1
- package/resources/inspect.mjs +0 -4
- package/resources/inspect.mjs.map +1 -1
- package/resources/providers.d.ts +5 -12
- package/resources/providers.d.ts.map +1 -1
- package/resources/providers.js +0 -4
- package/resources/providers.js.map +1 -1
- package/resources/providers.mjs +0 -4
- package/resources/providers.mjs.map +1 -1
- package/resources/responses/input-items.d.ts +64 -8
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/responses.d.ts +479 -31
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/routes.d.ts +10 -9
- package/resources/routes.d.ts.map +1 -1
- package/resources/routes.js.map +1 -1
- package/resources/routes.mjs.map +1 -1
- package/resources/shared.d.ts +86 -0
- package/resources/shared.d.ts.map +1 -1
- package/src/index.ts +11 -16
- package/src/resources/alpha/admin.ts +84 -0
- package/src/resources/alpha/alpha.ts +8 -0
- package/src/resources/alpha/benchmarks.ts +37 -1
- package/src/resources/alpha/index.ts +2 -0
- package/src/resources/alpha/post-training/index.ts +1 -1
- package/src/resources/alpha/post-training/job.ts +0 -5
- package/src/resources/alpha/post-training/post-training.ts +5 -2
- package/src/resources/beta/datasets.ts +89 -8
- package/src/resources/chat/chat.ts +4 -4
- package/src/resources/chat/completions.ts +12 -12
- package/src/resources/completions.ts +4 -4
- package/src/resources/conversations/conversations.ts +43 -7
- package/src/resources/conversations/items.ts +165 -21
- package/src/resources/index.ts +3 -3
- package/src/resources/inspect.ts +3 -57
- package/src/resources/providers.ts +5 -16
- package/src/resources/responses/input-items.ts +86 -14
- package/src/resources/responses/responses.ts +654 -45
- package/src/resources/routes.ts +10 -14
- package/src/resources/shared.ts +95 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -60,6 +60,10 @@ export interface ResponseObject {
|
|
|
60
60
|
* Text response configuration for OpenAI responses.
|
|
61
61
|
*/
|
|
62
62
|
text?: ResponseObject.Text;
|
|
63
|
+
/**
|
|
64
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
65
|
+
*/
|
|
66
|
+
tool_choice?: 'auto' | 'required' | 'none' | ResponseObject.OpenAIResponseInputToolChoiceAllowedTools | ResponseObject.OpenAIResponseInputToolChoiceFileSearch | ResponseObject.OpenAIResponseInputToolChoiceWebSearch | ResponseObject.OpenAIResponseInputToolChoiceFunctionTool | ResponseObject.OpenAIResponseInputToolChoiceMcpTool | ResponseObject.OpenAIResponseInputToolChoiceCustomTool | null;
|
|
63
67
|
tools?: Array<ResponseObject.OpenAIResponseInputToolWebSearch | ResponseObject.OpenAIResponseInputToolFileSearch | ResponseObject.OpenAIResponseInputToolFunction | ResponseObject.OpenAIResponseToolMcp> | null;
|
|
64
68
|
top_p?: number | null;
|
|
65
69
|
truncation?: string | null;
|
|
@@ -75,7 +79,7 @@ export declare namespace ResponseObject {
|
|
|
75
79
|
* and there is no way to tell them apart in certain scenarios.
|
|
76
80
|
*/
|
|
77
81
|
interface OpenAIResponseMessageOutput {
|
|
78
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
82
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
79
83
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
80
84
|
id?: string | null;
|
|
81
85
|
status?: string | null;
|
|
@@ -108,12 +112,13 @@ export declare namespace ResponseObject {
|
|
|
108
112
|
filename?: string | null;
|
|
109
113
|
type?: 'input_file';
|
|
110
114
|
}
|
|
111
|
-
interface
|
|
115
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
112
116
|
text: string;
|
|
113
|
-
annotations?: Array<
|
|
117
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
118
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
114
119
|
type?: 'output_text';
|
|
115
120
|
}
|
|
116
|
-
namespace
|
|
121
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
117
122
|
/**
|
|
118
123
|
* File citation annotation for referencing specific files in response content.
|
|
119
124
|
*/
|
|
@@ -146,6 +151,33 @@ export declare namespace ResponseObject {
|
|
|
146
151
|
index: number;
|
|
147
152
|
type?: 'file_path';
|
|
148
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
156
|
+
* response.
|
|
157
|
+
*
|
|
158
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
159
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
160
|
+
*/
|
|
161
|
+
interface Logprob {
|
|
162
|
+
token: string;
|
|
163
|
+
logprob: number;
|
|
164
|
+
bytes?: Array<number> | null;
|
|
165
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
166
|
+
}
|
|
167
|
+
namespace Logprob {
|
|
168
|
+
/**
|
|
169
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
170
|
+
* response.
|
|
171
|
+
*
|
|
172
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
173
|
+
* probability of the token
|
|
174
|
+
*/
|
|
175
|
+
interface TopLogprob {
|
|
176
|
+
token: string;
|
|
177
|
+
logprob: number;
|
|
178
|
+
bytes?: Array<number> | null;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
149
181
|
}
|
|
150
182
|
/**
|
|
151
183
|
* Refusal content within a streamed response part.
|
|
@@ -309,6 +341,50 @@ export declare namespace ResponseObject {
|
|
|
309
341
|
type?: 'text' | 'json_schema' | 'json_object';
|
|
310
342
|
}
|
|
311
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
346
|
+
*/
|
|
347
|
+
interface OpenAIResponseInputToolChoiceAllowedTools {
|
|
348
|
+
tools: Array<{
|
|
349
|
+
[key: string]: string;
|
|
350
|
+
}>;
|
|
351
|
+
mode?: 'auto' | 'required';
|
|
352
|
+
type?: 'allowed_tools';
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Indicates that the model should use file search to generate a response.
|
|
356
|
+
*/
|
|
357
|
+
interface OpenAIResponseInputToolChoiceFileSearch {
|
|
358
|
+
type?: 'file_search';
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Indicates that the model should use web search to generate a response
|
|
362
|
+
*/
|
|
363
|
+
interface OpenAIResponseInputToolChoiceWebSearch {
|
|
364
|
+
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Forces the model to call a specific function.
|
|
368
|
+
*/
|
|
369
|
+
interface OpenAIResponseInputToolChoiceFunctionTool {
|
|
370
|
+
name: string;
|
|
371
|
+
type?: 'function';
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Forces the model to call a specific tool on a remote MCP server
|
|
375
|
+
*/
|
|
376
|
+
interface OpenAIResponseInputToolChoiceMcpTool {
|
|
377
|
+
server_label: string;
|
|
378
|
+
name?: string | null;
|
|
379
|
+
type?: 'mcp';
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Forces the model to call a custom tool.
|
|
383
|
+
*/
|
|
384
|
+
interface OpenAIResponseInputToolChoiceCustomTool {
|
|
385
|
+
name: string;
|
|
386
|
+
type?: 'custom';
|
|
387
|
+
}
|
|
312
388
|
/**
|
|
313
389
|
* Web search tool configuration for OpenAI response inputs.
|
|
314
390
|
*/
|
|
@@ -486,6 +562,7 @@ export declare namespace ResponseObjectStream {
|
|
|
486
562
|
interface OpenAIResponseOutputMessageContentOutputText {
|
|
487
563
|
text: string;
|
|
488
564
|
annotations?: Array<OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath>;
|
|
565
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
|
|
489
566
|
type?: 'output_text';
|
|
490
567
|
}
|
|
491
568
|
namespace OpenAIResponseOutputMessageContentOutputText {
|
|
@@ -521,6 +598,33 @@ export declare namespace ResponseObjectStream {
|
|
|
521
598
|
index: number;
|
|
522
599
|
type?: 'file_path';
|
|
523
600
|
}
|
|
601
|
+
/**
|
|
602
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
603
|
+
* response.
|
|
604
|
+
*
|
|
605
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
606
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
607
|
+
*/
|
|
608
|
+
interface Logprob {
|
|
609
|
+
token: string;
|
|
610
|
+
logprob: number;
|
|
611
|
+
bytes?: Array<number> | null;
|
|
612
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
613
|
+
}
|
|
614
|
+
namespace Logprob {
|
|
615
|
+
/**
|
|
616
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
617
|
+
* response.
|
|
618
|
+
*
|
|
619
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
620
|
+
* probability of the token
|
|
621
|
+
*/
|
|
622
|
+
interface TopLogprob {
|
|
623
|
+
token: string;
|
|
624
|
+
logprob: number;
|
|
625
|
+
bytes?: Array<number> | null;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
524
628
|
}
|
|
525
629
|
/**
|
|
526
630
|
* Refusal content within a streamed response part.
|
|
@@ -675,6 +779,7 @@ export declare namespace ResponseObjectStream {
|
|
|
675
779
|
interface OpenAIResponseOutputMessageContentOutputText {
|
|
676
780
|
text: string;
|
|
677
781
|
annotations?: Array<OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath>;
|
|
782
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
|
|
678
783
|
type?: 'output_text';
|
|
679
784
|
}
|
|
680
785
|
namespace OpenAIResponseOutputMessageContentOutputText {
|
|
@@ -710,6 +815,33 @@ export declare namespace ResponseObjectStream {
|
|
|
710
815
|
index: number;
|
|
711
816
|
type?: 'file_path';
|
|
712
817
|
}
|
|
818
|
+
/**
|
|
819
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
820
|
+
* response.
|
|
821
|
+
*
|
|
822
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
823
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
824
|
+
*/
|
|
825
|
+
interface Logprob {
|
|
826
|
+
token: string;
|
|
827
|
+
logprob: number;
|
|
828
|
+
bytes?: Array<number> | null;
|
|
829
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
830
|
+
}
|
|
831
|
+
namespace Logprob {
|
|
832
|
+
/**
|
|
833
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
834
|
+
* response.
|
|
835
|
+
*
|
|
836
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
837
|
+
* probability of the token
|
|
838
|
+
*/
|
|
839
|
+
interface TopLogprob {
|
|
840
|
+
token: string;
|
|
841
|
+
logprob: number;
|
|
842
|
+
bytes?: Array<number> | null;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
713
845
|
}
|
|
714
846
|
/**
|
|
715
847
|
* Refusal content within a streamed response part.
|
|
@@ -815,8 +947,38 @@ export declare namespace ResponseObjectStream {
|
|
|
815
947
|
item_id: string;
|
|
816
948
|
output_index: number;
|
|
817
949
|
sequence_number: number;
|
|
950
|
+
logprobs?: Array<OpenAIResponseObjectStreamResponseOutputTextDelta.Logprob> | null;
|
|
818
951
|
type?: 'response.output_text.delta';
|
|
819
952
|
}
|
|
953
|
+
namespace OpenAIResponseObjectStreamResponseOutputTextDelta {
|
|
954
|
+
/**
|
|
955
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
956
|
+
* response.
|
|
957
|
+
*
|
|
958
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
959
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
960
|
+
*/
|
|
961
|
+
interface Logprob {
|
|
962
|
+
token: string;
|
|
963
|
+
logprob: number;
|
|
964
|
+
bytes?: Array<number> | null;
|
|
965
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
966
|
+
}
|
|
967
|
+
namespace Logprob {
|
|
968
|
+
/**
|
|
969
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
970
|
+
* response.
|
|
971
|
+
*
|
|
972
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
973
|
+
* probability of the token
|
|
974
|
+
*/
|
|
975
|
+
interface TopLogprob {
|
|
976
|
+
token: string;
|
|
977
|
+
logprob: number;
|
|
978
|
+
bytes?: Array<number> | null;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
820
982
|
/**
|
|
821
983
|
* Streaming event for when text output is completed.
|
|
822
984
|
*/
|
|
@@ -943,9 +1105,7 @@ export declare namespace ResponseObjectStream {
|
|
|
943
1105
|
interface OpenAIResponseContentPartOutputText {
|
|
944
1106
|
text: string;
|
|
945
1107
|
annotations?: Array<OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath>;
|
|
946
|
-
logprobs?: Array<
|
|
947
|
-
[key: string]: unknown;
|
|
948
|
-
}> | null;
|
|
1108
|
+
logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
|
|
949
1109
|
type?: 'output_text';
|
|
950
1110
|
}
|
|
951
1111
|
namespace OpenAIResponseContentPartOutputText {
|
|
@@ -981,6 +1141,33 @@ export declare namespace ResponseObjectStream {
|
|
|
981
1141
|
index: number;
|
|
982
1142
|
type?: 'file_path';
|
|
983
1143
|
}
|
|
1144
|
+
/**
|
|
1145
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1146
|
+
* response.
|
|
1147
|
+
*
|
|
1148
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1149
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
1150
|
+
*/
|
|
1151
|
+
interface Logprob {
|
|
1152
|
+
token: string;
|
|
1153
|
+
logprob: number;
|
|
1154
|
+
bytes?: Array<number> | null;
|
|
1155
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1156
|
+
}
|
|
1157
|
+
namespace Logprob {
|
|
1158
|
+
/**
|
|
1159
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1160
|
+
* response.
|
|
1161
|
+
*
|
|
1162
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1163
|
+
* probability of the token
|
|
1164
|
+
*/
|
|
1165
|
+
interface TopLogprob {
|
|
1166
|
+
token: string;
|
|
1167
|
+
logprob: number;
|
|
1168
|
+
bytes?: Array<number> | null;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
984
1171
|
}
|
|
985
1172
|
/**
|
|
986
1173
|
* Refusal content within a streamed response part.
|
|
@@ -1019,9 +1206,7 @@ export declare namespace ResponseObjectStream {
|
|
|
1019
1206
|
interface OpenAIResponseContentPartOutputText {
|
|
1020
1207
|
text: string;
|
|
1021
1208
|
annotations?: Array<OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath>;
|
|
1022
|
-
logprobs?: Array<
|
|
1023
|
-
[key: string]: unknown;
|
|
1024
|
-
}> | null;
|
|
1209
|
+
logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
|
|
1025
1210
|
type?: 'output_text';
|
|
1026
1211
|
}
|
|
1027
1212
|
namespace OpenAIResponseContentPartOutputText {
|
|
@@ -1057,6 +1242,33 @@ export declare namespace ResponseObjectStream {
|
|
|
1057
1242
|
index: number;
|
|
1058
1243
|
type?: 'file_path';
|
|
1059
1244
|
}
|
|
1245
|
+
/**
|
|
1246
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1247
|
+
* response.
|
|
1248
|
+
*
|
|
1249
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1250
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
1251
|
+
*/
|
|
1252
|
+
interface Logprob {
|
|
1253
|
+
token: string;
|
|
1254
|
+
logprob: number;
|
|
1255
|
+
bytes?: Array<number> | null;
|
|
1256
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1257
|
+
}
|
|
1258
|
+
namespace Logprob {
|
|
1259
|
+
/**
|
|
1260
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1261
|
+
* response.
|
|
1262
|
+
*
|
|
1263
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1264
|
+
* probability of the token
|
|
1265
|
+
*/
|
|
1266
|
+
interface TopLogprob {
|
|
1267
|
+
token: string;
|
|
1268
|
+
logprob: number;
|
|
1269
|
+
bytes?: Array<number> | null;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1060
1272
|
}
|
|
1061
1273
|
/**
|
|
1062
1274
|
* Refusal content within a streamed response part.
|
|
@@ -1325,6 +1537,10 @@ export interface ResponseListResponse {
|
|
|
1325
1537
|
* Text response configuration for OpenAI responses.
|
|
1326
1538
|
*/
|
|
1327
1539
|
text?: ResponseListResponse.Text;
|
|
1540
|
+
/**
|
|
1541
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
1542
|
+
*/
|
|
1543
|
+
tool_choice?: 'auto' | 'required' | 'none' | ResponseListResponse.OpenAIResponseInputToolChoiceAllowedTools | ResponseListResponse.OpenAIResponseInputToolChoiceFileSearch | ResponseListResponse.OpenAIResponseInputToolChoiceWebSearch | ResponseListResponse.OpenAIResponseInputToolChoiceFunctionTool | ResponseListResponse.OpenAIResponseInputToolChoiceMcpTool | ResponseListResponse.OpenAIResponseInputToolChoiceCustomTool | null;
|
|
1328
1544
|
tools?: Array<ResponseListResponse.OpenAIResponseInputToolWebSearch | ResponseListResponse.OpenAIResponseInputToolFileSearch | ResponseListResponse.OpenAIResponseInputToolFunction | ResponseListResponse.OpenAIResponseToolMcp> | null;
|
|
1329
1545
|
top_p?: number | null;
|
|
1330
1546
|
truncation?: string | null;
|
|
@@ -1340,7 +1556,7 @@ export declare namespace ResponseListResponse {
|
|
|
1340
1556
|
* and there is no way to tell them apart in certain scenarios.
|
|
1341
1557
|
*/
|
|
1342
1558
|
interface OpenAIResponseMessageOutput {
|
|
1343
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
1559
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
1344
1560
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
1345
1561
|
id?: string | null;
|
|
1346
1562
|
status?: string | null;
|
|
@@ -1373,12 +1589,13 @@ export declare namespace ResponseListResponse {
|
|
|
1373
1589
|
filename?: string | null;
|
|
1374
1590
|
type?: 'input_file';
|
|
1375
1591
|
}
|
|
1376
|
-
interface
|
|
1592
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1377
1593
|
text: string;
|
|
1378
|
-
annotations?: Array<
|
|
1594
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
1595
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
1379
1596
|
type?: 'output_text';
|
|
1380
1597
|
}
|
|
1381
|
-
namespace
|
|
1598
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1382
1599
|
/**
|
|
1383
1600
|
* File citation annotation for referencing specific files in response content.
|
|
1384
1601
|
*/
|
|
@@ -1411,6 +1628,33 @@ export declare namespace ResponseListResponse {
|
|
|
1411
1628
|
index: number;
|
|
1412
1629
|
type?: 'file_path';
|
|
1413
1630
|
}
|
|
1631
|
+
/**
|
|
1632
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1633
|
+
* response.
|
|
1634
|
+
*
|
|
1635
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1636
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
1637
|
+
*/
|
|
1638
|
+
interface Logprob {
|
|
1639
|
+
token: string;
|
|
1640
|
+
logprob: number;
|
|
1641
|
+
bytes?: Array<number> | null;
|
|
1642
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1643
|
+
}
|
|
1644
|
+
namespace Logprob {
|
|
1645
|
+
/**
|
|
1646
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1647
|
+
* response.
|
|
1648
|
+
*
|
|
1649
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1650
|
+
* probability of the token
|
|
1651
|
+
*/
|
|
1652
|
+
interface TopLogprob {
|
|
1653
|
+
token: string;
|
|
1654
|
+
logprob: number;
|
|
1655
|
+
bytes?: Array<number> | null;
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1414
1658
|
}
|
|
1415
1659
|
/**
|
|
1416
1660
|
* Refusal content within a streamed response part.
|
|
@@ -1533,7 +1777,7 @@ export declare namespace ResponseListResponse {
|
|
|
1533
1777
|
* and there is no way to tell them apart in certain scenarios.
|
|
1534
1778
|
*/
|
|
1535
1779
|
interface OpenAIResponseMessageOutput {
|
|
1536
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
1780
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
1537
1781
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
1538
1782
|
id?: string | null;
|
|
1539
1783
|
status?: string | null;
|
|
@@ -1566,12 +1810,13 @@ export declare namespace ResponseListResponse {
|
|
|
1566
1810
|
filename?: string | null;
|
|
1567
1811
|
type?: 'input_file';
|
|
1568
1812
|
}
|
|
1569
|
-
interface
|
|
1813
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1570
1814
|
text: string;
|
|
1571
|
-
annotations?: Array<
|
|
1815
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
1816
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
1572
1817
|
type?: 'output_text';
|
|
1573
1818
|
}
|
|
1574
|
-
namespace
|
|
1819
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1575
1820
|
/**
|
|
1576
1821
|
* File citation annotation for referencing specific files in response content.
|
|
1577
1822
|
*/
|
|
@@ -1604,6 +1849,33 @@ export declare namespace ResponseListResponse {
|
|
|
1604
1849
|
index: number;
|
|
1605
1850
|
type?: 'file_path';
|
|
1606
1851
|
}
|
|
1852
|
+
/**
|
|
1853
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1854
|
+
* response.
|
|
1855
|
+
*
|
|
1856
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1857
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
1858
|
+
*/
|
|
1859
|
+
interface Logprob {
|
|
1860
|
+
token: string;
|
|
1861
|
+
logprob: number;
|
|
1862
|
+
bytes?: Array<number> | null;
|
|
1863
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1864
|
+
}
|
|
1865
|
+
namespace Logprob {
|
|
1866
|
+
/**
|
|
1867
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1868
|
+
* response.
|
|
1869
|
+
*
|
|
1870
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1871
|
+
* probability of the token
|
|
1872
|
+
*/
|
|
1873
|
+
interface TopLogprob {
|
|
1874
|
+
token: string;
|
|
1875
|
+
logprob: number;
|
|
1876
|
+
bytes?: Array<number> | null;
|
|
1877
|
+
}
|
|
1878
|
+
}
|
|
1607
1879
|
}
|
|
1608
1880
|
/**
|
|
1609
1881
|
* Refusal content within a streamed response part.
|
|
@@ -1619,7 +1891,7 @@ export declare namespace ResponseListResponse {
|
|
|
1619
1891
|
* and there is no way to tell them apart in certain scenarios.
|
|
1620
1892
|
*/
|
|
1621
1893
|
interface OpenAIResponseMessageOutput {
|
|
1622
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
1894
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
1623
1895
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
1624
1896
|
id?: string | null;
|
|
1625
1897
|
status?: string | null;
|
|
@@ -1652,12 +1924,13 @@ export declare namespace ResponseListResponse {
|
|
|
1652
1924
|
filename?: string | null;
|
|
1653
1925
|
type?: 'input_file';
|
|
1654
1926
|
}
|
|
1655
|
-
interface
|
|
1927
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1656
1928
|
text: string;
|
|
1657
|
-
annotations?: Array<
|
|
1929
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
1930
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
1658
1931
|
type?: 'output_text';
|
|
1659
1932
|
}
|
|
1660
|
-
namespace
|
|
1933
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1661
1934
|
/**
|
|
1662
1935
|
* File citation annotation for referencing specific files in response content.
|
|
1663
1936
|
*/
|
|
@@ -1690,6 +1963,33 @@ export declare namespace ResponseListResponse {
|
|
|
1690
1963
|
index: number;
|
|
1691
1964
|
type?: 'file_path';
|
|
1692
1965
|
}
|
|
1966
|
+
/**
|
|
1967
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1968
|
+
* response.
|
|
1969
|
+
*
|
|
1970
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1971
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
1972
|
+
*/
|
|
1973
|
+
interface Logprob {
|
|
1974
|
+
token: string;
|
|
1975
|
+
logprob: number;
|
|
1976
|
+
bytes?: Array<number> | null;
|
|
1977
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1978
|
+
}
|
|
1979
|
+
namespace Logprob {
|
|
1980
|
+
/**
|
|
1981
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1982
|
+
* response.
|
|
1983
|
+
*
|
|
1984
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
1985
|
+
* probability of the token
|
|
1986
|
+
*/
|
|
1987
|
+
interface TopLogprob {
|
|
1988
|
+
token: string;
|
|
1989
|
+
logprob: number;
|
|
1990
|
+
bytes?: Array<number> | null;
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1693
1993
|
}
|
|
1694
1994
|
/**
|
|
1695
1995
|
* Refusal content within a streamed response part.
|
|
@@ -1853,6 +2153,50 @@ export declare namespace ResponseListResponse {
|
|
|
1853
2153
|
type?: 'text' | 'json_schema' | 'json_object';
|
|
1854
2154
|
}
|
|
1855
2155
|
}
|
|
2156
|
+
/**
|
|
2157
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
2158
|
+
*/
|
|
2159
|
+
interface OpenAIResponseInputToolChoiceAllowedTools {
|
|
2160
|
+
tools: Array<{
|
|
2161
|
+
[key: string]: string;
|
|
2162
|
+
}>;
|
|
2163
|
+
mode?: 'auto' | 'required';
|
|
2164
|
+
type?: 'allowed_tools';
|
|
2165
|
+
}
|
|
2166
|
+
/**
|
|
2167
|
+
* Indicates that the model should use file search to generate a response.
|
|
2168
|
+
*/
|
|
2169
|
+
interface OpenAIResponseInputToolChoiceFileSearch {
|
|
2170
|
+
type?: 'file_search';
|
|
2171
|
+
}
|
|
2172
|
+
/**
|
|
2173
|
+
* Indicates that the model should use web search to generate a response
|
|
2174
|
+
*/
|
|
2175
|
+
interface OpenAIResponseInputToolChoiceWebSearch {
|
|
2176
|
+
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* Forces the model to call a specific function.
|
|
2180
|
+
*/
|
|
2181
|
+
interface OpenAIResponseInputToolChoiceFunctionTool {
|
|
2182
|
+
name: string;
|
|
2183
|
+
type?: 'function';
|
|
2184
|
+
}
|
|
2185
|
+
/**
|
|
2186
|
+
* Forces the model to call a specific tool on a remote MCP server
|
|
2187
|
+
*/
|
|
2188
|
+
interface OpenAIResponseInputToolChoiceMcpTool {
|
|
2189
|
+
server_label: string;
|
|
2190
|
+
name?: string | null;
|
|
2191
|
+
type?: 'mcp';
|
|
2192
|
+
}
|
|
2193
|
+
/**
|
|
2194
|
+
* Forces the model to call a custom tool.
|
|
2195
|
+
*/
|
|
2196
|
+
interface OpenAIResponseInputToolChoiceCustomTool {
|
|
2197
|
+
name: string;
|
|
2198
|
+
type?: 'custom';
|
|
2199
|
+
}
|
|
1856
2200
|
/**
|
|
1857
2201
|
* Web search tool configuration for OpenAI response inputs.
|
|
1858
2202
|
*/
|
|
@@ -1959,7 +2303,7 @@ export interface ResponseCreateParamsBase {
|
|
|
1959
2303
|
input: string | Array<ResponseCreateParams.OpenAIResponseMessageInput | ResponseCreateParams.OpenAIResponseOutputMessageWebSearchToolCall | ResponseCreateParams.OpenAIResponseOutputMessageFileSearchToolCall | ResponseCreateParams.OpenAIResponseOutputMessageFunctionToolCall | ResponseCreateParams.OpenAIResponseOutputMessageMcpCall | ResponseCreateParams.OpenAIResponseOutputMessageMcpListTools | ResponseCreateParams.OpenAIResponseMcpApprovalRequest | ResponseCreateParams.OpenAIResponseInputFunctionToolCallOutput | ResponseCreateParams.OpenAIResponseMcpApprovalResponse | ResponseCreateParams.OpenAIResponseMessageInput>;
|
|
1960
2304
|
model: string;
|
|
1961
2305
|
conversation?: string | null;
|
|
1962
|
-
include?: Array<
|
|
2306
|
+
include?: Array<'web_search_call.action.sources' | 'code_interpreter_call.outputs' | 'computer_call_output.output.image_url' | 'file_search_call.results' | 'message.input_image.image_url' | 'message.output_text.logprobs' | 'reasoning.encrypted_content'> | null;
|
|
1963
2307
|
instructions?: string | null;
|
|
1964
2308
|
max_infer_iters?: number | null;
|
|
1965
2309
|
max_tool_calls?: number | null;
|
|
@@ -1979,6 +2323,10 @@ export interface ResponseCreateParamsBase {
|
|
|
1979
2323
|
* Text response configuration for OpenAI responses.
|
|
1980
2324
|
*/
|
|
1981
2325
|
text?: ResponseCreateParams.Text | null;
|
|
2326
|
+
/**
|
|
2327
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
2328
|
+
*/
|
|
2329
|
+
tool_choice?: 'auto' | 'required' | 'none' | ResponseCreateParams.OpenAIResponseInputToolChoiceAllowedTools | ResponseCreateParams.OpenAIResponseInputToolChoiceFileSearch | ResponseCreateParams.OpenAIResponseInputToolChoiceWebSearch | ResponseCreateParams.OpenAIResponseInputToolChoiceFunctionTool | ResponseCreateParams.OpenAIResponseInputToolChoiceMcpTool | ResponseCreateParams.OpenAIResponseInputToolChoiceCustomTool | null;
|
|
1982
2330
|
tools?: Array<ResponseCreateParams.OpenAIResponseInputToolWebSearch | ResponseCreateParams.OpenAIResponseInputToolFileSearch | ResponseCreateParams.OpenAIResponseInputToolFunction | ResponseCreateParams.OpenAIResponseInputToolMcp> | null;
|
|
1983
2331
|
}
|
|
1984
2332
|
export declare namespace ResponseCreateParams {
|
|
@@ -1988,7 +2336,7 @@ export declare namespace ResponseCreateParams {
|
|
|
1988
2336
|
* and there is no way to tell them apart in certain scenarios.
|
|
1989
2337
|
*/
|
|
1990
2338
|
interface OpenAIResponseMessageInput {
|
|
1991
|
-
content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.
|
|
2339
|
+
content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput | OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal>;
|
|
1992
2340
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
1993
2341
|
id?: string | null;
|
|
1994
2342
|
status?: string | null;
|
|
@@ -2021,12 +2369,13 @@ export declare namespace ResponseCreateParams {
|
|
|
2021
2369
|
filename?: string | null;
|
|
2022
2370
|
type?: 'input_file';
|
|
2023
2371
|
}
|
|
2024
|
-
interface
|
|
2372
|
+
interface OpenAIResponseOutputMessageContentOutputTextInput {
|
|
2025
2373
|
text: string;
|
|
2026
|
-
annotations?: Array<
|
|
2374
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath>;
|
|
2375
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
|
|
2027
2376
|
type?: 'output_text';
|
|
2028
2377
|
}
|
|
2029
|
-
namespace
|
|
2378
|
+
namespace OpenAIResponseOutputMessageContentOutputTextInput {
|
|
2030
2379
|
/**
|
|
2031
2380
|
* File citation annotation for referencing specific files in response content.
|
|
2032
2381
|
*/
|
|
@@ -2059,6 +2408,33 @@ export declare namespace ResponseCreateParams {
|
|
|
2059
2408
|
index: number;
|
|
2060
2409
|
type?: 'file_path';
|
|
2061
2410
|
}
|
|
2411
|
+
/**
|
|
2412
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
2413
|
+
* response.
|
|
2414
|
+
*
|
|
2415
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
2416
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
2417
|
+
*/
|
|
2418
|
+
interface Logprob {
|
|
2419
|
+
token: string;
|
|
2420
|
+
logprob: number;
|
|
2421
|
+
bytes?: Array<number> | null;
|
|
2422
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
2423
|
+
}
|
|
2424
|
+
namespace Logprob {
|
|
2425
|
+
/**
|
|
2426
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
2427
|
+
* response.
|
|
2428
|
+
*
|
|
2429
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
2430
|
+
* probability of the token
|
|
2431
|
+
*/
|
|
2432
|
+
interface TopLogprob {
|
|
2433
|
+
token: string;
|
|
2434
|
+
logprob: number;
|
|
2435
|
+
bytes?: Array<number> | null;
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2062
2438
|
}
|
|
2063
2439
|
/**
|
|
2064
2440
|
* Refusal content within a streamed response part.
|
|
@@ -2181,7 +2557,7 @@ export declare namespace ResponseCreateParams {
|
|
|
2181
2557
|
* and there is no way to tell them apart in certain scenarios.
|
|
2182
2558
|
*/
|
|
2183
2559
|
interface OpenAIResponseMessageInput {
|
|
2184
|
-
content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.
|
|
2560
|
+
content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput | OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal>;
|
|
2185
2561
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
2186
2562
|
id?: string | null;
|
|
2187
2563
|
status?: string | null;
|
|
@@ -2214,12 +2590,13 @@ export declare namespace ResponseCreateParams {
|
|
|
2214
2590
|
filename?: string | null;
|
|
2215
2591
|
type?: 'input_file';
|
|
2216
2592
|
}
|
|
2217
|
-
interface
|
|
2593
|
+
interface OpenAIResponseOutputMessageContentOutputTextInput {
|
|
2218
2594
|
text: string;
|
|
2219
|
-
annotations?: Array<
|
|
2595
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath>;
|
|
2596
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
|
|
2220
2597
|
type?: 'output_text';
|
|
2221
2598
|
}
|
|
2222
|
-
namespace
|
|
2599
|
+
namespace OpenAIResponseOutputMessageContentOutputTextInput {
|
|
2223
2600
|
/**
|
|
2224
2601
|
* File citation annotation for referencing specific files in response content.
|
|
2225
2602
|
*/
|
|
@@ -2252,6 +2629,33 @@ export declare namespace ResponseCreateParams {
|
|
|
2252
2629
|
index: number;
|
|
2253
2630
|
type?: 'file_path';
|
|
2254
2631
|
}
|
|
2632
|
+
/**
|
|
2633
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
2634
|
+
* response.
|
|
2635
|
+
*
|
|
2636
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
2637
|
+
* probability of the token :top_logprobs: The top log probabilities for the token
|
|
2638
|
+
*/
|
|
2639
|
+
interface Logprob {
|
|
2640
|
+
token: string;
|
|
2641
|
+
logprob: number;
|
|
2642
|
+
bytes?: Array<number> | null;
|
|
2643
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
2644
|
+
}
|
|
2645
|
+
namespace Logprob {
|
|
2646
|
+
/**
|
|
2647
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
2648
|
+
* response.
|
|
2649
|
+
*
|
|
2650
|
+
* :token: The token :bytes: (Optional) The bytes for the token :logprob: The log
|
|
2651
|
+
* probability of the token
|
|
2652
|
+
*/
|
|
2653
|
+
interface TopLogprob {
|
|
2654
|
+
token: string;
|
|
2655
|
+
logprob: number;
|
|
2656
|
+
bytes?: Array<number> | null;
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2255
2659
|
}
|
|
2256
2660
|
/**
|
|
2257
2661
|
* Refusal content within a streamed response part.
|
|
@@ -2322,6 +2726,50 @@ export declare namespace ResponseCreateParams {
|
|
|
2322
2726
|
type?: 'text' | 'json_schema' | 'json_object';
|
|
2323
2727
|
}
|
|
2324
2728
|
}
|
|
2729
|
+
/**
|
|
2730
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
2731
|
+
*/
|
|
2732
|
+
interface OpenAIResponseInputToolChoiceAllowedTools {
|
|
2733
|
+
tools: Array<{
|
|
2734
|
+
[key: string]: string;
|
|
2735
|
+
}>;
|
|
2736
|
+
mode?: 'auto' | 'required';
|
|
2737
|
+
type?: 'allowed_tools';
|
|
2738
|
+
}
|
|
2739
|
+
/**
|
|
2740
|
+
* Indicates that the model should use file search to generate a response.
|
|
2741
|
+
*/
|
|
2742
|
+
interface OpenAIResponseInputToolChoiceFileSearch {
|
|
2743
|
+
type?: 'file_search';
|
|
2744
|
+
}
|
|
2745
|
+
/**
|
|
2746
|
+
* Indicates that the model should use web search to generate a response
|
|
2747
|
+
*/
|
|
2748
|
+
interface OpenAIResponseInputToolChoiceWebSearch {
|
|
2749
|
+
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
2750
|
+
}
|
|
2751
|
+
/**
|
|
2752
|
+
* Forces the model to call a specific function.
|
|
2753
|
+
*/
|
|
2754
|
+
interface OpenAIResponseInputToolChoiceFunctionTool {
|
|
2755
|
+
name: string;
|
|
2756
|
+
type?: 'function';
|
|
2757
|
+
}
|
|
2758
|
+
/**
|
|
2759
|
+
* Forces the model to call a specific tool on a remote MCP server
|
|
2760
|
+
*/
|
|
2761
|
+
interface OpenAIResponseInputToolChoiceMcpTool {
|
|
2762
|
+
server_label: string;
|
|
2763
|
+
name?: string | null;
|
|
2764
|
+
type?: 'mcp';
|
|
2765
|
+
}
|
|
2766
|
+
/**
|
|
2767
|
+
* Forces the model to call a custom tool.
|
|
2768
|
+
*/
|
|
2769
|
+
interface OpenAIResponseInputToolChoiceCustomTool {
|
|
2770
|
+
name: string;
|
|
2771
|
+
type?: 'custom';
|
|
2772
|
+
}
|
|
2325
2773
|
/**
|
|
2326
2774
|
* Web search tool configuration for OpenAI response inputs.
|
|
2327
2775
|
*/
|