llama-stack-client 0.4.4 → 0.4.5
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/.github/workflows/ci.yml +4 -4
- package/.github/workflows/release-doctor.yml +1 -1
- package/.release-please-manifest.json +1 -1
- package/.stats.yml +4 -4
- package/CHANGELOG.md +41 -0
- package/LICENSE +1 -1
- package/README.md +41 -27
- package/api.md +32 -25
- package/dist/CHANGELOG.md +41 -0
- package/dist/LICENSE +1 -1
- package/dist/README.md +41 -27
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +5 -0
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +5 -0
- package/dist/core.mjs.map +1 -1
- package/dist/index.d.mts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/resources/alpha/admin.d.ts +41 -0
- package/dist/resources/alpha/admin.d.ts.map +1 -0
- package/dist/resources/alpha/admin.js +46 -0
- package/dist/resources/alpha/admin.js.map +1 -0
- package/dist/resources/alpha/admin.mjs +42 -0
- package/dist/resources/alpha/admin.mjs.map +1 -0
- package/dist/resources/alpha/alpha.d.ts +8 -4
- package/dist/resources/alpha/alpha.d.ts.map +1 -1
- package/dist/resources/alpha/alpha.js +6 -2
- package/dist/resources/alpha/alpha.js.map +1 -1
- package/dist/resources/alpha/alpha.mjs +6 -2
- package/dist/resources/alpha/alpha.mjs.map +1 -1
- package/dist/resources/alpha/benchmarks.d.ts +37 -1
- package/dist/resources/alpha/benchmarks.d.ts.map +1 -1
- package/dist/resources/alpha/eval/eval.d.ts +28 -7
- package/dist/resources/alpha/eval/eval.d.ts.map +1 -1
- package/dist/resources/alpha/eval/eval.js.map +1 -1
- package/dist/resources/alpha/eval/eval.mjs.map +1 -1
- package/dist/resources/alpha/index.d.ts +2 -1
- package/dist/resources/alpha/index.d.ts.map +1 -1
- package/dist/resources/alpha/index.js +3 -1
- package/dist/resources/alpha/index.js.map +1 -1
- package/dist/resources/alpha/index.mjs +1 -0
- package/dist/resources/alpha/index.mjs.map +1 -1
- package/dist/resources/alpha/inference.d.ts +58 -7
- package/dist/resources/alpha/inference.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/index.d.ts +2 -2
- package/dist/resources/alpha/post-training/index.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/index.js.map +1 -1
- package/dist/resources/alpha/post-training/index.mjs +1 -1
- package/dist/resources/alpha/post-training/index.mjs.map +1 -1
- package/dist/resources/alpha/post-training/job.d.ts +4 -16
- package/dist/resources/alpha/post-training/job.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/job.js +5 -6
- package/dist/resources/alpha/post-training/job.js.map +1 -1
- package/dist/resources/alpha/post-training/job.mjs +5 -6
- package/dist/resources/alpha/post-training/job.mjs.map +1 -1
- package/dist/resources/alpha/post-training/post-training.d.ts +38 -11
- package/dist/resources/alpha/post-training/post-training.d.ts.map +1 -1
- package/dist/resources/alpha/post-training/post-training.js.map +1 -1
- package/dist/resources/alpha/post-training/post-training.mjs +1 -1
- package/dist/resources/alpha/post-training/post-training.mjs.map +1 -1
- package/dist/resources/beta/datasets.d.ts +102 -8
- package/dist/resources/beta/datasets.d.ts.map +1 -1
- package/dist/resources/chat/chat.d.ts +119 -17
- package/dist/resources/chat/chat.d.ts.map +1 -1
- package/dist/resources/chat/chat.js.map +1 -1
- package/dist/resources/chat/chat.mjs.map +1 -1
- package/dist/resources/chat/completions.d.ts +1130 -73
- package/dist/resources/chat/completions.d.ts.map +1 -1
- package/dist/resources/chat/completions.js +0 -2
- package/dist/resources/chat/completions.js.map +1 -1
- package/dist/resources/chat/completions.mjs +0 -2
- package/dist/resources/chat/completions.mjs.map +1 -1
- package/dist/resources/completions.d.ts +135 -26
- package/dist/resources/completions.d.ts.map +1 -1
- package/dist/resources/completions.js.map +1 -1
- package/dist/resources/completions.mjs.map +1 -1
- package/dist/resources/conversations/conversations.d.ts +56 -12
- package/dist/resources/conversations/conversations.d.ts.map +1 -1
- package/dist/resources/conversations/conversations.js +0 -8
- package/dist/resources/conversations/conversations.js.map +1 -1
- package/dist/resources/conversations/conversations.mjs +0 -8
- package/dist/resources/conversations/conversations.mjs.map +1 -1
- package/dist/resources/conversations/items.d.ts +364 -81
- package/dist/resources/conversations/items.d.ts.map +1 -1
- package/dist/resources/conversations/items.js +0 -6
- package/dist/resources/conversations/items.js.map +1 -1
- package/dist/resources/conversations/items.mjs +0 -6
- package/dist/resources/conversations/items.mjs.map +1 -1
- package/dist/resources/embeddings.d.ts +46 -8
- package/dist/resources/embeddings.d.ts.map +1 -1
- package/dist/resources/embeddings.js +0 -2
- package/dist/resources/embeddings.js.map +1 -1
- package/dist/resources/embeddings.mjs +0 -2
- package/dist/resources/embeddings.mjs.map +1 -1
- package/dist/resources/files.d.ts +58 -31
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +4 -16
- package/dist/resources/files.js.map +1 -1
- package/dist/resources/files.mjs +4 -16
- package/dist/resources/files.mjs.map +1 -1
- package/dist/resources/index.d.ts +3 -3
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/index.mjs.map +1 -1
- package/dist/resources/inspect.d.ts +3 -45
- package/dist/resources/inspect.d.ts.map +1 -1
- package/dist/resources/inspect.js +0 -4
- package/dist/resources/inspect.js.map +1 -1
- package/dist/resources/inspect.mjs +0 -4
- package/dist/resources/inspect.mjs.map +1 -1
- package/dist/resources/models/models.d.ts +21 -6
- package/dist/resources/models/models.d.ts.map +1 -1
- package/dist/resources/models/models.js +0 -6
- package/dist/resources/models/models.js.map +1 -1
- package/dist/resources/models/models.mjs +0 -6
- package/dist/resources/models/models.mjs.map +1 -1
- package/dist/resources/moderations.d.ts +38 -5
- package/dist/resources/moderations.d.ts.map +1 -1
- package/dist/resources/moderations.js +1 -3
- package/dist/resources/moderations.js.map +1 -1
- package/dist/resources/moderations.mjs +1 -3
- package/dist/resources/moderations.mjs.map +1 -1
- package/dist/resources/prompts/prompts.d.ts +24 -10
- package/dist/resources/prompts/prompts.d.ts.map +1 -1
- package/dist/resources/prompts/prompts.js +2 -10
- package/dist/resources/prompts/prompts.js.map +1 -1
- package/dist/resources/prompts/prompts.mjs +2 -10
- package/dist/resources/prompts/prompts.mjs.map +1 -1
- package/dist/resources/prompts/versions.d.ts +0 -2
- package/dist/resources/prompts/versions.d.ts.map +1 -1
- package/dist/resources/prompts/versions.js +0 -2
- package/dist/resources/prompts/versions.js.map +1 -1
- package/dist/resources/prompts/versions.mjs +0 -2
- package/dist/resources/prompts/versions.mjs.map +1 -1
- package/dist/resources/providers.d.ts +5 -12
- package/dist/resources/providers.d.ts.map +1 -1
- package/dist/resources/providers.js +0 -4
- package/dist/resources/providers.js.map +1 -1
- package/dist/resources/providers.mjs +0 -4
- package/dist/resources/providers.mjs.map +1 -1
- package/dist/resources/responses/input-items.d.ts +108 -9
- package/dist/resources/responses/input-items.d.ts.map +1 -1
- package/dist/resources/responses/responses.d.ts +881 -124
- package/dist/resources/responses/responses.d.ts.map +1 -1
- package/dist/resources/responses/responses.js.map +1 -1
- package/dist/resources/responses/responses.mjs.map +1 -1
- package/dist/resources/routes.d.ts +10 -9
- package/dist/resources/routes.d.ts.map +1 -1
- package/dist/resources/routes.js.map +1 -1
- package/dist/resources/routes.mjs.map +1 -1
- package/dist/resources/safety.d.ts +131 -9
- package/dist/resources/safety.d.ts.map +1 -1
- package/dist/resources/safety.js +1 -3
- package/dist/resources/safety.js.map +1 -1
- package/dist/resources/safety.mjs +1 -3
- package/dist/resources/safety.mjs.map +1 -1
- package/dist/resources/scoring-functions.d.ts +23 -1
- package/dist/resources/scoring-functions.d.ts.map +1 -1
- package/dist/resources/scoring.d.ts +24 -0
- package/dist/resources/scoring.d.ts.map +1 -1
- package/dist/resources/shared.d.ts +139 -7
- package/dist/resources/shared.d.ts.map +1 -1
- package/dist/resources/shields.d.ts +21 -0
- package/dist/resources/shields.d.ts.map +1 -1
- package/dist/resources/vector-io.d.ts +75 -58
- package/dist/resources/vector-io.d.ts.map +1 -1
- package/dist/resources/vector-io.js +1 -1
- package/dist/resources/vector-io.mjs +1 -1
- package/dist/resources/vector-stores/file-batches.d.ts +13 -7
- package/dist/resources/vector-stores/file-batches.d.ts.map +1 -1
- package/dist/resources/vector-stores/file-batches.js +3 -6
- package/dist/resources/vector-stores/file-batches.js.map +1 -1
- package/dist/resources/vector-stores/file-batches.mjs +3 -6
- package/dist/resources/vector-stores/file-batches.mjs.map +1 -1
- package/dist/resources/vector-stores/files.d.ts +31 -9
- package/dist/resources/vector-stores/files.d.ts.map +1 -1
- package/dist/resources/vector-stores/files.js +4 -4
- package/dist/resources/vector-stores/files.js.map +1 -1
- package/dist/resources/vector-stores/files.mjs +4 -4
- package/dist/resources/vector-stores/files.mjs.map +1 -1
- package/dist/resources/vector-stores/vector-stores.d.ts +87 -13
- package/dist/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/dist/resources/vector-stores/vector-stores.js +5 -10
- package/dist/resources/vector-stores/vector-stores.js.map +1 -1
- package/dist/resources/vector-stores/vector-stores.mjs +5 -10
- package/dist/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/dist/src/core.ts +6 -0
- package/dist/src/index.ts +11 -16
- package/dist/src/resources/alpha/admin.ts +84 -0
- package/dist/src/resources/alpha/alpha.ts +16 -8
- package/dist/src/resources/alpha/benchmarks.ts +37 -1
- package/dist/src/resources/alpha/eval/eval.ts +28 -7
- package/dist/src/resources/alpha/index.ts +2 -0
- package/dist/src/resources/alpha/inference.ts +58 -7
- package/dist/src/resources/alpha/post-training/index.ts +2 -10
- package/dist/src/resources/alpha/post-training/job.ts +5 -26
- package/dist/src/resources/alpha/post-training/post-training.ts +38 -22
- package/dist/src/resources/beta/datasets.ts +103 -8
- package/dist/src/resources/chat/chat.ts +122 -20
- package/dist/src/resources/chat/completions.ts +1138 -79
- package/dist/src/resources/completions.ts +137 -28
- package/dist/src/resources/conversations/conversations.ts +67 -15
- package/dist/src/resources/conversations/items.ts +479 -110
- package/dist/src/resources/embeddings.ts +46 -8
- package/dist/src/resources/files.ts +58 -31
- package/dist/src/resources/index.ts +3 -3
- package/dist/src/resources/inspect.ts +3 -57
- package/dist/src/resources/models/models.ts +21 -6
- package/dist/src/resources/moderations.ts +38 -5
- package/dist/src/resources/prompts/prompts.ts +26 -12
- package/dist/src/resources/prompts/versions.ts +0 -2
- package/dist/src/resources/providers.ts +5 -16
- package/dist/src/resources/responses/input-items.ts +138 -15
- package/dist/src/resources/responses/responses.ts +1076 -196
- package/dist/src/resources/routes.ts +10 -14
- package/dist/src/resources/safety.ts +131 -8
- package/dist/src/resources/scoring-functions.ts +23 -1
- package/dist/src/resources/scoring.ts +24 -0
- package/dist/src/resources/shared.ts +148 -7
- package/dist/src/resources/shields.ts +21 -0
- package/dist/src/resources/vector-io.ts +95 -78
- package/dist/src/resources/vector-stores/file-batches.ts +13 -7
- package/dist/src/resources/vector-stores/files.ts +31 -11
- package/dist/src/resources/vector-stores/vector-stores.ts +89 -15
- package/dist/src/version.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/src/core.ts +6 -0
- package/src/index.ts +11 -16
- package/src/resources/alpha/admin.ts +84 -0
- package/src/resources/alpha/alpha.ts +16 -8
- package/src/resources/alpha/benchmarks.ts +37 -1
- package/src/resources/alpha/eval/eval.ts +28 -7
- package/src/resources/alpha/index.ts +2 -0
- package/src/resources/alpha/inference.ts +58 -7
- package/src/resources/alpha/post-training/index.ts +2 -10
- package/src/resources/alpha/post-training/job.ts +5 -26
- package/src/resources/alpha/post-training/post-training.ts +38 -22
- package/src/resources/beta/datasets.ts +103 -8
- package/src/resources/chat/chat.ts +122 -20
- package/src/resources/chat/completions.ts +1138 -79
- package/src/resources/completions.ts +137 -28
- package/src/resources/conversations/conversations.ts +67 -15
- package/src/resources/conversations/items.ts +479 -110
- package/src/resources/embeddings.ts +46 -8
- package/src/resources/files.ts +58 -31
- package/src/resources/index.ts +3 -3
- package/src/resources/inspect.ts +3 -57
- package/src/resources/models/models.ts +21 -6
- package/src/resources/moderations.ts +38 -5
- package/src/resources/prompts/prompts.ts +26 -12
- package/src/resources/prompts/versions.ts +0 -2
- package/src/resources/providers.ts +5 -16
- package/src/resources/responses/input-items.ts +138 -15
- package/src/resources/responses/responses.ts +1076 -196
- package/src/resources/routes.ts +10 -14
- package/src/resources/safety.ts +131 -8
- package/src/resources/scoring-functions.ts +23 -1
- package/src/resources/scoring.ts +24 -0
- package/src/resources/shared.ts +148 -7
- package/src/resources/shields.ts +21 -0
- package/src/resources/vector-io.ts +95 -78
- package/src/resources/vector-stores/file-batches.ts +13 -7
- package/src/resources/vector-stores/files.ts +31 -11
- package/src/resources/vector-stores/vector-stores.ts +89 -15
- package/src/version.ts +1 -1
- package/tests/api-resources/alpha/admin.test.ts +111 -0
- package/tests/api-resources/alpha/eval/eval.test.ts +40 -20
- package/tests/api-resources/alpha/inference.test.ts +1 -1
- package/tests/api-resources/alpha/post-training/job.test.ts +21 -12
- package/tests/api-resources/alpha/post-training/post-training.test.ts +12 -2
- package/tests/api-resources/beta/datasets.test.ts +9 -3
- package/tests/api-resources/chat/completions.test.ts +20 -7
- package/tests/api-resources/completions.test.ts +5 -5
- package/tests/api-resources/conversations/items.test.ts +22 -3
- package/tests/api-resources/embeddings.test.ts +2 -2
- package/tests/api-resources/files.test.ts +6 -1
- package/tests/api-resources/responses/input-items.test.ts +7 -1
- package/tests/api-resources/responses/responses.test.ts +19 -5
- package/tests/api-resources/safety.test.ts +9 -5
- package/tests/api-resources/tool-runtime.test.ts +9 -2
- package/tests/api-resources/vector-io.test.ts +13 -4
- package/tests/api-resources/vector-stores/file-batches.test.ts +7 -1
- package/tests/api-resources/vector-stores/files.test.ts +7 -1
- package/tests/api-resources/vector-stores/vector-stores.test.ts +14 -2
|
@@ -102,6 +102,10 @@ export interface ResponseObject {
|
|
|
102
102
|
|
|
103
103
|
status: string;
|
|
104
104
|
|
|
105
|
+
store: boolean;
|
|
106
|
+
|
|
107
|
+
completed_at?: number | null;
|
|
108
|
+
|
|
105
109
|
/**
|
|
106
110
|
* Error details for failed OpenAI response requests.
|
|
107
111
|
*/
|
|
@@ -109,6 +113,8 @@ export interface ResponseObject {
|
|
|
109
113
|
|
|
110
114
|
instructions?: string | null;
|
|
111
115
|
|
|
116
|
+
max_output_tokens?: number | null;
|
|
117
|
+
|
|
112
118
|
max_tool_calls?: number | null;
|
|
113
119
|
|
|
114
120
|
metadata?: { [key: string]: string } | null;
|
|
@@ -124,6 +130,15 @@ export interface ResponseObject {
|
|
|
124
130
|
*/
|
|
125
131
|
prompt?: ResponseObject.Prompt | null;
|
|
126
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
135
|
+
*
|
|
136
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
137
|
+
*/
|
|
138
|
+
reasoning?: ResponseObject.Reasoning | null;
|
|
139
|
+
|
|
140
|
+
safety_identifier?: string | null;
|
|
141
|
+
|
|
127
142
|
temperature?: number | null;
|
|
128
143
|
|
|
129
144
|
/**
|
|
@@ -131,6 +146,21 @@ export interface ResponseObject {
|
|
|
131
146
|
*/
|
|
132
147
|
text?: ResponseObject.Text;
|
|
133
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
151
|
+
*/
|
|
152
|
+
tool_choice?:
|
|
153
|
+
| 'auto'
|
|
154
|
+
| 'required'
|
|
155
|
+
| 'none'
|
|
156
|
+
| ResponseObject.OpenAIResponseInputToolChoiceAllowedTools
|
|
157
|
+
| ResponseObject.OpenAIResponseInputToolChoiceFileSearch
|
|
158
|
+
| ResponseObject.OpenAIResponseInputToolChoiceWebSearch
|
|
159
|
+
| ResponseObject.OpenAIResponseInputToolChoiceFunctionTool
|
|
160
|
+
| ResponseObject.OpenAIResponseInputToolChoiceMcpTool
|
|
161
|
+
| ResponseObject.OpenAIResponseInputToolChoiceCustomTool
|
|
162
|
+
| null;
|
|
163
|
+
|
|
134
164
|
tools?: Array<
|
|
135
165
|
| ResponseObject.OpenAIResponseInputToolWebSearch
|
|
136
166
|
| ResponseObject.OpenAIResponseInputToolFileSearch
|
|
@@ -163,7 +193,7 @@ export namespace ResponseObject {
|
|
|
163
193
|
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
|
|
164
194
|
>
|
|
165
195
|
| Array<
|
|
166
|
-
| OpenAIResponseMessageOutput.
|
|
196
|
+
| OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
|
|
167
197
|
| OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
|
|
168
198
|
>;
|
|
169
199
|
|
|
@@ -214,20 +244,22 @@ export namespace ResponseObject {
|
|
|
214
244
|
type?: 'input_file';
|
|
215
245
|
}
|
|
216
246
|
|
|
217
|
-
export interface
|
|
247
|
+
export interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
218
248
|
text: string;
|
|
219
249
|
|
|
220
250
|
annotations?: Array<
|
|
221
|
-
|
|
|
222
|
-
|
|
|
223
|
-
|
|
|
224
|
-
|
|
|
251
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
|
|
252
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
|
|
253
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
|
|
254
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
|
|
225
255
|
>;
|
|
226
256
|
|
|
257
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
258
|
+
|
|
227
259
|
type?: 'output_text';
|
|
228
260
|
}
|
|
229
261
|
|
|
230
|
-
export namespace
|
|
262
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
231
263
|
/**
|
|
232
264
|
* File citation annotation for referencing specific files in response content.
|
|
233
265
|
*/
|
|
@@ -277,6 +309,55 @@ export namespace ResponseObject {
|
|
|
277
309
|
|
|
278
310
|
type?: 'file_path';
|
|
279
311
|
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
315
|
+
* response.
|
|
316
|
+
*/
|
|
317
|
+
export interface Logprob {
|
|
318
|
+
/**
|
|
319
|
+
* The token.
|
|
320
|
+
*/
|
|
321
|
+
token: string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* The log probability of the token.
|
|
325
|
+
*/
|
|
326
|
+
logprob: number;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* The bytes for the token.
|
|
330
|
+
*/
|
|
331
|
+
bytes?: Array<number> | null;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* The top log probabilities for the token.
|
|
335
|
+
*/
|
|
336
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export namespace Logprob {
|
|
340
|
+
/**
|
|
341
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
342
|
+
* response.
|
|
343
|
+
*/
|
|
344
|
+
export interface TopLogprob {
|
|
345
|
+
/**
|
|
346
|
+
* The token.
|
|
347
|
+
*/
|
|
348
|
+
token: string;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The log probability of the token.
|
|
352
|
+
*/
|
|
353
|
+
logprob: number;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* The bytes for the token.
|
|
357
|
+
*/
|
|
358
|
+
bytes?: Array<number> | null;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
280
361
|
}
|
|
281
362
|
|
|
282
363
|
/**
|
|
@@ -473,6 +554,15 @@ export namespace ResponseObject {
|
|
|
473
554
|
}
|
|
474
555
|
}
|
|
475
556
|
|
|
557
|
+
/**
|
|
558
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
559
|
+
*
|
|
560
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
561
|
+
*/
|
|
562
|
+
export interface Reasoning {
|
|
563
|
+
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
|
|
564
|
+
}
|
|
565
|
+
|
|
476
566
|
/**
|
|
477
567
|
* Text response configuration for OpenAI responses.
|
|
478
568
|
*/
|
|
@@ -500,6 +590,60 @@ export namespace ResponseObject {
|
|
|
500
590
|
}
|
|
501
591
|
}
|
|
502
592
|
|
|
593
|
+
/**
|
|
594
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
595
|
+
*/
|
|
596
|
+
export interface OpenAIResponseInputToolChoiceAllowedTools {
|
|
597
|
+
tools: Array<{ [key: string]: string }>;
|
|
598
|
+
|
|
599
|
+
mode?: 'auto' | 'required';
|
|
600
|
+
|
|
601
|
+
type?: 'allowed_tools';
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Indicates that the model should use file search to generate a response.
|
|
606
|
+
*/
|
|
607
|
+
export interface OpenAIResponseInputToolChoiceFileSearch {
|
|
608
|
+
type?: 'file_search';
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Indicates that the model should use web search to generate a response
|
|
613
|
+
*/
|
|
614
|
+
export interface OpenAIResponseInputToolChoiceWebSearch {
|
|
615
|
+
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Forces the model to call a specific function.
|
|
620
|
+
*/
|
|
621
|
+
export interface OpenAIResponseInputToolChoiceFunctionTool {
|
|
622
|
+
name: string;
|
|
623
|
+
|
|
624
|
+
type?: 'function';
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* Forces the model to call a specific tool on a remote MCP server
|
|
629
|
+
*/
|
|
630
|
+
export interface OpenAIResponseInputToolChoiceMcpTool {
|
|
631
|
+
server_label: string;
|
|
632
|
+
|
|
633
|
+
name?: string | null;
|
|
634
|
+
|
|
635
|
+
type?: 'mcp';
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Forces the model to call a custom tool.
|
|
640
|
+
*/
|
|
641
|
+
export interface OpenAIResponseInputToolChoiceCustomTool {
|
|
642
|
+
name: string;
|
|
643
|
+
|
|
644
|
+
type?: 'custom';
|
|
645
|
+
}
|
|
646
|
+
|
|
503
647
|
/**
|
|
504
648
|
* Web search tool configuration for OpenAI response inputs.
|
|
505
649
|
*/
|
|
@@ -521,6 +665,22 @@ export namespace ResponseObject {
|
|
|
521
665
|
|
|
522
666
|
/**
|
|
523
667
|
* Options for ranking and filtering search results.
|
|
668
|
+
*
|
|
669
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
670
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
671
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
672
|
+
*
|
|
673
|
+
* Examples: # Weighted ranker with custom alpha
|
|
674
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
675
|
+
*
|
|
676
|
+
* # RRF ranker with custom impact factor
|
|
677
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
678
|
+
*
|
|
679
|
+
* # Use config defaults (just specify ranker type)
|
|
680
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
681
|
+
*
|
|
682
|
+
* # Score threshold filtering
|
|
683
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
524
684
|
*/
|
|
525
685
|
ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
|
|
526
686
|
|
|
@@ -530,11 +690,48 @@ export namespace ResponseObject {
|
|
|
530
690
|
export namespace OpenAIResponseInputToolFileSearch {
|
|
531
691
|
/**
|
|
532
692
|
* Options for ranking and filtering search results.
|
|
693
|
+
*
|
|
694
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
695
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
696
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
697
|
+
*
|
|
698
|
+
* Examples: # Weighted ranker with custom alpha
|
|
699
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
700
|
+
*
|
|
701
|
+
* # RRF ranker with custom impact factor
|
|
702
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
703
|
+
*
|
|
704
|
+
* # Use config defaults (just specify ranker type)
|
|
705
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
706
|
+
*
|
|
707
|
+
* # Score threshold filtering
|
|
708
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
533
709
|
*/
|
|
534
710
|
export interface RankingOptions {
|
|
711
|
+
/**
|
|
712
|
+
* Weight factor for weighted ranker
|
|
713
|
+
*/
|
|
714
|
+
alpha?: number | null;
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* Impact factor for RRF algorithm
|
|
718
|
+
*/
|
|
719
|
+
impact_factor?: number | null;
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Model identifier for neural reranker
|
|
723
|
+
*/
|
|
724
|
+
model?: string | null;
|
|
725
|
+
|
|
535
726
|
ranker?: string | null;
|
|
536
727
|
|
|
537
728
|
score_threshold?: number | null;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Weights for combining vector, keyword, and neural scores. Keys: 'vector',
|
|
732
|
+
* 'keyword', 'neural'
|
|
733
|
+
*/
|
|
734
|
+
weights?: { [key: string]: number } | null;
|
|
538
735
|
}
|
|
539
736
|
}
|
|
540
737
|
|
|
@@ -582,19 +779,19 @@ export namespace ResponseObject {
|
|
|
582
779
|
export interface Usage {
|
|
583
780
|
input_tokens: number;
|
|
584
781
|
|
|
585
|
-
output_tokens: number;
|
|
586
|
-
|
|
587
|
-
total_tokens: number;
|
|
588
|
-
|
|
589
782
|
/**
|
|
590
783
|
* Token details for input tokens in OpenAI response usage.
|
|
591
784
|
*/
|
|
592
|
-
input_tokens_details
|
|
785
|
+
input_tokens_details: Usage.InputTokensDetails;
|
|
786
|
+
|
|
787
|
+
output_tokens: number;
|
|
593
788
|
|
|
594
789
|
/**
|
|
595
790
|
* Token details for output tokens in OpenAI response usage.
|
|
596
791
|
*/
|
|
597
|
-
output_tokens_details
|
|
792
|
+
output_tokens_details: Usage.OutputTokensDetails;
|
|
793
|
+
|
|
794
|
+
total_tokens: number;
|
|
598
795
|
}
|
|
599
796
|
|
|
600
797
|
export namespace Usage {
|
|
@@ -602,14 +799,14 @@ export namespace ResponseObject {
|
|
|
602
799
|
* Token details for input tokens in OpenAI response usage.
|
|
603
800
|
*/
|
|
604
801
|
export interface InputTokensDetails {
|
|
605
|
-
cached_tokens
|
|
802
|
+
cached_tokens: number;
|
|
606
803
|
}
|
|
607
804
|
|
|
608
805
|
/**
|
|
609
806
|
* Token details for output tokens in OpenAI response usage.
|
|
610
807
|
*/
|
|
611
808
|
export interface OutputTokensDetails {
|
|
612
|
-
reasoning_tokens
|
|
809
|
+
reasoning_tokens: number;
|
|
613
810
|
}
|
|
614
811
|
}
|
|
615
812
|
}
|
|
@@ -785,6 +982,8 @@ export namespace ResponseObjectStream {
|
|
|
785
982
|
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
|
|
786
983
|
>;
|
|
787
984
|
|
|
985
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
|
|
986
|
+
|
|
788
987
|
type?: 'output_text';
|
|
789
988
|
}
|
|
790
989
|
|
|
@@ -838,6 +1037,55 @@ export namespace ResponseObjectStream {
|
|
|
838
1037
|
|
|
839
1038
|
type?: 'file_path';
|
|
840
1039
|
}
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1043
|
+
* response.
|
|
1044
|
+
*/
|
|
1045
|
+
export interface Logprob {
|
|
1046
|
+
/**
|
|
1047
|
+
* The token.
|
|
1048
|
+
*/
|
|
1049
|
+
token: string;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* The log probability of the token.
|
|
1053
|
+
*/
|
|
1054
|
+
logprob: number;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* The bytes for the token.
|
|
1058
|
+
*/
|
|
1059
|
+
bytes?: Array<number> | null;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* The top log probabilities for the token.
|
|
1063
|
+
*/
|
|
1064
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
export namespace Logprob {
|
|
1068
|
+
/**
|
|
1069
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1070
|
+
* response.
|
|
1071
|
+
*/
|
|
1072
|
+
export interface TopLogprob {
|
|
1073
|
+
/**
|
|
1074
|
+
* The token.
|
|
1075
|
+
*/
|
|
1076
|
+
token: string;
|
|
1077
|
+
|
|
1078
|
+
/**
|
|
1079
|
+
* The log probability of the token.
|
|
1080
|
+
*/
|
|
1081
|
+
logprob: number;
|
|
1082
|
+
|
|
1083
|
+
/**
|
|
1084
|
+
* The bytes for the token.
|
|
1085
|
+
*/
|
|
1086
|
+
bytes?: Array<number> | null;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
841
1089
|
}
|
|
842
1090
|
|
|
843
1091
|
/**
|
|
@@ -1074,6 +1322,8 @@ export namespace ResponseObjectStream {
|
|
|
1074
1322
|
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
|
|
1075
1323
|
>;
|
|
1076
1324
|
|
|
1325
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
|
|
1326
|
+
|
|
1077
1327
|
type?: 'output_text';
|
|
1078
1328
|
}
|
|
1079
1329
|
|
|
@@ -1127,6 +1377,55 @@ export namespace ResponseObjectStream {
|
|
|
1127
1377
|
|
|
1128
1378
|
type?: 'file_path';
|
|
1129
1379
|
}
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1383
|
+
* response.
|
|
1384
|
+
*/
|
|
1385
|
+
export interface Logprob {
|
|
1386
|
+
/**
|
|
1387
|
+
* The token.
|
|
1388
|
+
*/
|
|
1389
|
+
token: string;
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* The log probability of the token.
|
|
1393
|
+
*/
|
|
1394
|
+
logprob: number;
|
|
1395
|
+
|
|
1396
|
+
/**
|
|
1397
|
+
* The bytes for the token.
|
|
1398
|
+
*/
|
|
1399
|
+
bytes?: Array<number> | null;
|
|
1400
|
+
|
|
1401
|
+
/**
|
|
1402
|
+
* The top log probabilities for the token.
|
|
1403
|
+
*/
|
|
1404
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
export namespace Logprob {
|
|
1408
|
+
/**
|
|
1409
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1410
|
+
* response.
|
|
1411
|
+
*/
|
|
1412
|
+
export interface TopLogprob {
|
|
1413
|
+
/**
|
|
1414
|
+
* The token.
|
|
1415
|
+
*/
|
|
1416
|
+
token: string;
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* The log probability of the token.
|
|
1420
|
+
*/
|
|
1421
|
+
logprob: number;
|
|
1422
|
+
|
|
1423
|
+
/**
|
|
1424
|
+
* The bytes for the token.
|
|
1425
|
+
*/
|
|
1426
|
+
bytes?: Array<number> | null;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1130
1429
|
}
|
|
1131
1430
|
|
|
1132
1431
|
/**
|
|
@@ -1274,9 +1573,62 @@ export namespace ResponseObjectStream {
|
|
|
1274
1573
|
|
|
1275
1574
|
sequence_number: number;
|
|
1276
1575
|
|
|
1576
|
+
logprobs?: Array<OpenAIResponseObjectStreamResponseOutputTextDelta.Logprob> | null;
|
|
1577
|
+
|
|
1277
1578
|
type?: 'response.output_text.delta';
|
|
1278
1579
|
}
|
|
1279
1580
|
|
|
1581
|
+
export namespace OpenAIResponseObjectStreamResponseOutputTextDelta {
|
|
1582
|
+
/**
|
|
1583
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1584
|
+
* response.
|
|
1585
|
+
*/
|
|
1586
|
+
export interface Logprob {
|
|
1587
|
+
/**
|
|
1588
|
+
* The token.
|
|
1589
|
+
*/
|
|
1590
|
+
token: string;
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* The log probability of the token.
|
|
1594
|
+
*/
|
|
1595
|
+
logprob: number;
|
|
1596
|
+
|
|
1597
|
+
/**
|
|
1598
|
+
* The bytes for the token.
|
|
1599
|
+
*/
|
|
1600
|
+
bytes?: Array<number> | null;
|
|
1601
|
+
|
|
1602
|
+
/**
|
|
1603
|
+
* The top log probabilities for the token.
|
|
1604
|
+
*/
|
|
1605
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
export namespace Logprob {
|
|
1609
|
+
/**
|
|
1610
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1611
|
+
* response.
|
|
1612
|
+
*/
|
|
1613
|
+
export interface TopLogprob {
|
|
1614
|
+
/**
|
|
1615
|
+
* The token.
|
|
1616
|
+
*/
|
|
1617
|
+
token: string;
|
|
1618
|
+
|
|
1619
|
+
/**
|
|
1620
|
+
* The log probability of the token.
|
|
1621
|
+
*/
|
|
1622
|
+
logprob: number;
|
|
1623
|
+
|
|
1624
|
+
/**
|
|
1625
|
+
* The bytes for the token.
|
|
1626
|
+
*/
|
|
1627
|
+
bytes?: Array<number> | null;
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1280
1632
|
/**
|
|
1281
1633
|
* Streaming event for when text output is completed.
|
|
1282
1634
|
*/
|
|
@@ -1472,7 +1824,7 @@ export namespace ResponseObjectStream {
|
|
|
1472
1824
|
| OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath
|
|
1473
1825
|
>;
|
|
1474
1826
|
|
|
1475
|
-
logprobs?: Array<
|
|
1827
|
+
logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
|
|
1476
1828
|
|
|
1477
1829
|
type?: 'output_text';
|
|
1478
1830
|
}
|
|
@@ -1527,6 +1879,55 @@ export namespace ResponseObjectStream {
|
|
|
1527
1879
|
|
|
1528
1880
|
type?: 'file_path';
|
|
1529
1881
|
}
|
|
1882
|
+
|
|
1883
|
+
/**
|
|
1884
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1885
|
+
* response.
|
|
1886
|
+
*/
|
|
1887
|
+
export interface Logprob {
|
|
1888
|
+
/**
|
|
1889
|
+
* The token.
|
|
1890
|
+
*/
|
|
1891
|
+
token: string;
|
|
1892
|
+
|
|
1893
|
+
/**
|
|
1894
|
+
* The log probability of the token.
|
|
1895
|
+
*/
|
|
1896
|
+
logprob: number;
|
|
1897
|
+
|
|
1898
|
+
/**
|
|
1899
|
+
* The bytes for the token.
|
|
1900
|
+
*/
|
|
1901
|
+
bytes?: Array<number> | null;
|
|
1902
|
+
|
|
1903
|
+
/**
|
|
1904
|
+
* The top log probabilities for the token.
|
|
1905
|
+
*/
|
|
1906
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
export namespace Logprob {
|
|
1910
|
+
/**
|
|
1911
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1912
|
+
* response.
|
|
1913
|
+
*/
|
|
1914
|
+
export interface TopLogprob {
|
|
1915
|
+
/**
|
|
1916
|
+
* The token.
|
|
1917
|
+
*/
|
|
1918
|
+
token: string;
|
|
1919
|
+
|
|
1920
|
+
/**
|
|
1921
|
+
* The log probability of the token.
|
|
1922
|
+
*/
|
|
1923
|
+
logprob: number;
|
|
1924
|
+
|
|
1925
|
+
/**
|
|
1926
|
+
* The bytes for the token.
|
|
1927
|
+
*/
|
|
1928
|
+
bytes?: Array<number> | null;
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1530
1931
|
}
|
|
1531
1932
|
|
|
1532
1933
|
/**
|
|
@@ -1587,7 +1988,7 @@ export namespace ResponseObjectStream {
|
|
|
1587
1988
|
| OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath
|
|
1588
1989
|
>;
|
|
1589
1990
|
|
|
1590
|
-
logprobs?: Array<
|
|
1991
|
+
logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
|
|
1591
1992
|
|
|
1592
1993
|
type?: 'output_text';
|
|
1593
1994
|
}
|
|
@@ -1642,6 +2043,55 @@ export namespace ResponseObjectStream {
|
|
|
1642
2043
|
|
|
1643
2044
|
type?: 'file_path';
|
|
1644
2045
|
}
|
|
2046
|
+
|
|
2047
|
+
/**
|
|
2048
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
2049
|
+
* response.
|
|
2050
|
+
*/
|
|
2051
|
+
export interface Logprob {
|
|
2052
|
+
/**
|
|
2053
|
+
* The token.
|
|
2054
|
+
*/
|
|
2055
|
+
token: string;
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* The log probability of the token.
|
|
2059
|
+
*/
|
|
2060
|
+
logprob: number;
|
|
2061
|
+
|
|
2062
|
+
/**
|
|
2063
|
+
* The bytes for the token.
|
|
2064
|
+
*/
|
|
2065
|
+
bytes?: Array<number> | null;
|
|
2066
|
+
|
|
2067
|
+
/**
|
|
2068
|
+
* The top log probabilities for the token.
|
|
2069
|
+
*/
|
|
2070
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
export namespace Logprob {
|
|
2074
|
+
/**
|
|
2075
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
2076
|
+
* response.
|
|
2077
|
+
*/
|
|
2078
|
+
export interface TopLogprob {
|
|
2079
|
+
/**
|
|
2080
|
+
* The token.
|
|
2081
|
+
*/
|
|
2082
|
+
token: string;
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* The log probability of the token.
|
|
2086
|
+
*/
|
|
2087
|
+
logprob: number;
|
|
2088
|
+
|
|
2089
|
+
/**
|
|
2090
|
+
* The bytes for the token.
|
|
2091
|
+
*/
|
|
2092
|
+
bytes?: Array<number> | null;
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
1645
2095
|
}
|
|
1646
2096
|
|
|
1647
2097
|
/**
|
|
@@ -2020,6 +2470,10 @@ export interface ResponseListResponse {
|
|
|
2020
2470
|
|
|
2021
2471
|
status: string;
|
|
2022
2472
|
|
|
2473
|
+
store: boolean;
|
|
2474
|
+
|
|
2475
|
+
completed_at?: number | null;
|
|
2476
|
+
|
|
2023
2477
|
/**
|
|
2024
2478
|
* Error details for failed OpenAI response requests.
|
|
2025
2479
|
*/
|
|
@@ -2027,6 +2481,8 @@ export interface ResponseListResponse {
|
|
|
2027
2481
|
|
|
2028
2482
|
instructions?: string | null;
|
|
2029
2483
|
|
|
2484
|
+
max_output_tokens?: number | null;
|
|
2485
|
+
|
|
2030
2486
|
max_tool_calls?: number | null;
|
|
2031
2487
|
|
|
2032
2488
|
metadata?: { [key: string]: string } | null;
|
|
@@ -2042,6 +2498,15 @@ export interface ResponseListResponse {
|
|
|
2042
2498
|
*/
|
|
2043
2499
|
prompt?: ResponseListResponse.Prompt | null;
|
|
2044
2500
|
|
|
2501
|
+
/**
|
|
2502
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
2503
|
+
*
|
|
2504
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
2505
|
+
*/
|
|
2506
|
+
reasoning?: ResponseListResponse.Reasoning | null;
|
|
2507
|
+
|
|
2508
|
+
safety_identifier?: string | null;
|
|
2509
|
+
|
|
2045
2510
|
temperature?: number | null;
|
|
2046
2511
|
|
|
2047
2512
|
/**
|
|
@@ -2049,6 +2514,21 @@ export interface ResponseListResponse {
|
|
|
2049
2514
|
*/
|
|
2050
2515
|
text?: ResponseListResponse.Text;
|
|
2051
2516
|
|
|
2517
|
+
/**
|
|
2518
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
2519
|
+
*/
|
|
2520
|
+
tool_choice?:
|
|
2521
|
+
| 'auto'
|
|
2522
|
+
| 'required'
|
|
2523
|
+
| 'none'
|
|
2524
|
+
| ResponseListResponse.OpenAIResponseInputToolChoiceAllowedTools
|
|
2525
|
+
| ResponseListResponse.OpenAIResponseInputToolChoiceFileSearch
|
|
2526
|
+
| ResponseListResponse.OpenAIResponseInputToolChoiceWebSearch
|
|
2527
|
+
| ResponseListResponse.OpenAIResponseInputToolChoiceFunctionTool
|
|
2528
|
+
| ResponseListResponse.OpenAIResponseInputToolChoiceMcpTool
|
|
2529
|
+
| ResponseListResponse.OpenAIResponseInputToolChoiceCustomTool
|
|
2530
|
+
| null;
|
|
2531
|
+
|
|
2052
2532
|
tools?: Array<
|
|
2053
2533
|
| ResponseListResponse.OpenAIResponseInputToolWebSearch
|
|
2054
2534
|
| ResponseListResponse.OpenAIResponseInputToolFileSearch
|
|
@@ -2081,7 +2561,7 @@ export namespace ResponseListResponse {
|
|
|
2081
2561
|
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
|
|
2082
2562
|
>
|
|
2083
2563
|
| Array<
|
|
2084
|
-
| OpenAIResponseMessageOutput.
|
|
2564
|
+
| OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
|
|
2085
2565
|
| OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
|
|
2086
2566
|
>;
|
|
2087
2567
|
|
|
@@ -2132,20 +2612,22 @@ export namespace ResponseListResponse {
|
|
|
2132
2612
|
type?: 'input_file';
|
|
2133
2613
|
}
|
|
2134
2614
|
|
|
2135
|
-
export interface
|
|
2615
|
+
export interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
2136
2616
|
text: string;
|
|
2137
2617
|
|
|
2138
2618
|
annotations?: Array<
|
|
2139
|
-
|
|
|
2140
|
-
|
|
|
2141
|
-
|
|
|
2142
|
-
|
|
|
2619
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
|
|
2620
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
|
|
2621
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
|
|
2622
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
|
|
2143
2623
|
>;
|
|
2144
2624
|
|
|
2625
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
2626
|
+
|
|
2145
2627
|
type?: 'output_text';
|
|
2146
2628
|
}
|
|
2147
2629
|
|
|
2148
|
-
export namespace
|
|
2630
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
2149
2631
|
/**
|
|
2150
2632
|
* File citation annotation for referencing specific files in response content.
|
|
2151
2633
|
*/
|
|
@@ -2195,6 +2677,55 @@ export namespace ResponseListResponse {
|
|
|
2195
2677
|
|
|
2196
2678
|
type?: 'file_path';
|
|
2197
2679
|
}
|
|
2680
|
+
|
|
2681
|
+
/**
|
|
2682
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
2683
|
+
* response.
|
|
2684
|
+
*/
|
|
2685
|
+
export interface Logprob {
|
|
2686
|
+
/**
|
|
2687
|
+
* The token.
|
|
2688
|
+
*/
|
|
2689
|
+
token: string;
|
|
2690
|
+
|
|
2691
|
+
/**
|
|
2692
|
+
* The log probability of the token.
|
|
2693
|
+
*/
|
|
2694
|
+
logprob: number;
|
|
2695
|
+
|
|
2696
|
+
/**
|
|
2697
|
+
* The bytes for the token.
|
|
2698
|
+
*/
|
|
2699
|
+
bytes?: Array<number> | null;
|
|
2700
|
+
|
|
2701
|
+
/**
|
|
2702
|
+
* The top log probabilities for the token.
|
|
2703
|
+
*/
|
|
2704
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
export namespace Logprob {
|
|
2708
|
+
/**
|
|
2709
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
2710
|
+
* response.
|
|
2711
|
+
*/
|
|
2712
|
+
export interface TopLogprob {
|
|
2713
|
+
/**
|
|
2714
|
+
* The token.
|
|
2715
|
+
*/
|
|
2716
|
+
token: string;
|
|
2717
|
+
|
|
2718
|
+
/**
|
|
2719
|
+
* The log probability of the token.
|
|
2720
|
+
*/
|
|
2721
|
+
logprob: number;
|
|
2722
|
+
|
|
2723
|
+
/**
|
|
2724
|
+
* The bytes for the token.
|
|
2725
|
+
*/
|
|
2726
|
+
bytes?: Array<number> | null;
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2198
2729
|
}
|
|
2199
2730
|
|
|
2200
2731
|
/**
|
|
@@ -2372,7 +2903,7 @@ export namespace ResponseListResponse {
|
|
|
2372
2903
|
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
|
|
2373
2904
|
>
|
|
2374
2905
|
| Array<
|
|
2375
|
-
| OpenAIResponseMessageOutput.
|
|
2906
|
+
| OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
|
|
2376
2907
|
| OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
|
|
2377
2908
|
>;
|
|
2378
2909
|
|
|
@@ -2423,20 +2954,22 @@ export namespace ResponseListResponse {
|
|
|
2423
2954
|
type?: 'input_file';
|
|
2424
2955
|
}
|
|
2425
2956
|
|
|
2426
|
-
export interface
|
|
2957
|
+
export interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
2427
2958
|
text: string;
|
|
2428
2959
|
|
|
2429
2960
|
annotations?: Array<
|
|
2430
|
-
|
|
|
2431
|
-
|
|
|
2432
|
-
|
|
|
2433
|
-
|
|
|
2961
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
|
|
2962
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
|
|
2963
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
|
|
2964
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
|
|
2434
2965
|
>;
|
|
2435
2966
|
|
|
2967
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
2968
|
+
|
|
2436
2969
|
type?: 'output_text';
|
|
2437
2970
|
}
|
|
2438
2971
|
|
|
2439
|
-
export namespace
|
|
2972
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
2440
2973
|
/**
|
|
2441
2974
|
* File citation annotation for referencing specific files in response content.
|
|
2442
2975
|
*/
|
|
@@ -2486,6 +3019,55 @@ export namespace ResponseListResponse {
|
|
|
2486
3019
|
|
|
2487
3020
|
type?: 'file_path';
|
|
2488
3021
|
}
|
|
3022
|
+
|
|
3023
|
+
/**
|
|
3024
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
3025
|
+
* response.
|
|
3026
|
+
*/
|
|
3027
|
+
export interface Logprob {
|
|
3028
|
+
/**
|
|
3029
|
+
* The token.
|
|
3030
|
+
*/
|
|
3031
|
+
token: string;
|
|
3032
|
+
|
|
3033
|
+
/**
|
|
3034
|
+
* The log probability of the token.
|
|
3035
|
+
*/
|
|
3036
|
+
logprob: number;
|
|
3037
|
+
|
|
3038
|
+
/**
|
|
3039
|
+
* The bytes for the token.
|
|
3040
|
+
*/
|
|
3041
|
+
bytes?: Array<number> | null;
|
|
3042
|
+
|
|
3043
|
+
/**
|
|
3044
|
+
* The top log probabilities for the token.
|
|
3045
|
+
*/
|
|
3046
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
3047
|
+
}
|
|
3048
|
+
|
|
3049
|
+
export namespace Logprob {
|
|
3050
|
+
/**
|
|
3051
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
3052
|
+
* response.
|
|
3053
|
+
*/
|
|
3054
|
+
export interface TopLogprob {
|
|
3055
|
+
/**
|
|
3056
|
+
* The token.
|
|
3057
|
+
*/
|
|
3058
|
+
token: string;
|
|
3059
|
+
|
|
3060
|
+
/**
|
|
3061
|
+
* The log probability of the token.
|
|
3062
|
+
*/
|
|
3063
|
+
logprob: number;
|
|
3064
|
+
|
|
3065
|
+
/**
|
|
3066
|
+
* The bytes for the token.
|
|
3067
|
+
*/
|
|
3068
|
+
bytes?: Array<number> | null;
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
2489
3071
|
}
|
|
2490
3072
|
|
|
2491
3073
|
/**
|
|
@@ -2512,7 +3094,7 @@ export namespace ResponseListResponse {
|
|
|
2512
3094
|
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
|
|
2513
3095
|
>
|
|
2514
3096
|
| Array<
|
|
2515
|
-
| OpenAIResponseMessageOutput.
|
|
3097
|
+
| OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
|
|
2516
3098
|
| OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
|
|
2517
3099
|
>;
|
|
2518
3100
|
|
|
@@ -2563,20 +3145,22 @@ export namespace ResponseListResponse {
|
|
|
2563
3145
|
type?: 'input_file';
|
|
2564
3146
|
}
|
|
2565
3147
|
|
|
2566
|
-
export interface
|
|
3148
|
+
export interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
2567
3149
|
text: string;
|
|
2568
3150
|
|
|
2569
3151
|
annotations?: Array<
|
|
2570
|
-
|
|
|
2571
|
-
|
|
|
2572
|
-
|
|
|
2573
|
-
|
|
|
3152
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
|
|
3153
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
|
|
3154
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
|
|
3155
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
|
|
2574
3156
|
>;
|
|
2575
3157
|
|
|
3158
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
3159
|
+
|
|
2576
3160
|
type?: 'output_text';
|
|
2577
3161
|
}
|
|
2578
3162
|
|
|
2579
|
-
export namespace
|
|
3163
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
2580
3164
|
/**
|
|
2581
3165
|
* File citation annotation for referencing specific files in response content.
|
|
2582
3166
|
*/
|
|
@@ -2626,6 +3210,55 @@ export namespace ResponseListResponse {
|
|
|
2626
3210
|
|
|
2627
3211
|
type?: 'file_path';
|
|
2628
3212
|
}
|
|
3213
|
+
|
|
3214
|
+
/**
|
|
3215
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
3216
|
+
* response.
|
|
3217
|
+
*/
|
|
3218
|
+
export interface Logprob {
|
|
3219
|
+
/**
|
|
3220
|
+
* The token.
|
|
3221
|
+
*/
|
|
3222
|
+
token: string;
|
|
3223
|
+
|
|
3224
|
+
/**
|
|
3225
|
+
* The log probability of the token.
|
|
3226
|
+
*/
|
|
3227
|
+
logprob: number;
|
|
3228
|
+
|
|
3229
|
+
/**
|
|
3230
|
+
* The bytes for the token.
|
|
3231
|
+
*/
|
|
3232
|
+
bytes?: Array<number> | null;
|
|
3233
|
+
|
|
3234
|
+
/**
|
|
3235
|
+
* The top log probabilities for the token.
|
|
3236
|
+
*/
|
|
3237
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
export namespace Logprob {
|
|
3241
|
+
/**
|
|
3242
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
3243
|
+
* response.
|
|
3244
|
+
*/
|
|
3245
|
+
export interface TopLogprob {
|
|
3246
|
+
/**
|
|
3247
|
+
* The token.
|
|
3248
|
+
*/
|
|
3249
|
+
token: string;
|
|
3250
|
+
|
|
3251
|
+
/**
|
|
3252
|
+
* The log probability of the token.
|
|
3253
|
+
*/
|
|
3254
|
+
logprob: number;
|
|
3255
|
+
|
|
3256
|
+
/**
|
|
3257
|
+
* The bytes for the token.
|
|
3258
|
+
*/
|
|
3259
|
+
bytes?: Array<number> | null;
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
2629
3262
|
}
|
|
2630
3263
|
|
|
2631
3264
|
/**
|
|
@@ -2822,6 +3455,15 @@ export namespace ResponseListResponse {
|
|
|
2822
3455
|
}
|
|
2823
3456
|
}
|
|
2824
3457
|
|
|
3458
|
+
/**
|
|
3459
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
3460
|
+
*
|
|
3461
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
3462
|
+
*/
|
|
3463
|
+
export interface Reasoning {
|
|
3464
|
+
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
|
|
3465
|
+
}
|
|
3466
|
+
|
|
2825
3467
|
/**
|
|
2826
3468
|
* Text response configuration for OpenAI responses.
|
|
2827
3469
|
*/
|
|
@@ -2850,10 +3492,64 @@ export namespace ResponseListResponse {
|
|
|
2850
3492
|
}
|
|
2851
3493
|
|
|
2852
3494
|
/**
|
|
2853
|
-
*
|
|
3495
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
2854
3496
|
*/
|
|
2855
|
-
export interface
|
|
2856
|
-
|
|
3497
|
+
export interface OpenAIResponseInputToolChoiceAllowedTools {
|
|
3498
|
+
tools: Array<{ [key: string]: string }>;
|
|
3499
|
+
|
|
3500
|
+
mode?: 'auto' | 'required';
|
|
3501
|
+
|
|
3502
|
+
type?: 'allowed_tools';
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
/**
|
|
3506
|
+
* Indicates that the model should use file search to generate a response.
|
|
3507
|
+
*/
|
|
3508
|
+
export interface OpenAIResponseInputToolChoiceFileSearch {
|
|
3509
|
+
type?: 'file_search';
|
|
3510
|
+
}
|
|
3511
|
+
|
|
3512
|
+
/**
|
|
3513
|
+
* Indicates that the model should use web search to generate a response
|
|
3514
|
+
*/
|
|
3515
|
+
export interface OpenAIResponseInputToolChoiceWebSearch {
|
|
3516
|
+
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
3517
|
+
}
|
|
3518
|
+
|
|
3519
|
+
/**
|
|
3520
|
+
* Forces the model to call a specific function.
|
|
3521
|
+
*/
|
|
3522
|
+
export interface OpenAIResponseInputToolChoiceFunctionTool {
|
|
3523
|
+
name: string;
|
|
3524
|
+
|
|
3525
|
+
type?: 'function';
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
/**
|
|
3529
|
+
* Forces the model to call a specific tool on a remote MCP server
|
|
3530
|
+
*/
|
|
3531
|
+
export interface OpenAIResponseInputToolChoiceMcpTool {
|
|
3532
|
+
server_label: string;
|
|
3533
|
+
|
|
3534
|
+
name?: string | null;
|
|
3535
|
+
|
|
3536
|
+
type?: 'mcp';
|
|
3537
|
+
}
|
|
3538
|
+
|
|
3539
|
+
/**
|
|
3540
|
+
* Forces the model to call a custom tool.
|
|
3541
|
+
*/
|
|
3542
|
+
export interface OpenAIResponseInputToolChoiceCustomTool {
|
|
3543
|
+
name: string;
|
|
3544
|
+
|
|
3545
|
+
type?: 'custom';
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
/**
|
|
3549
|
+
* Web search tool configuration for OpenAI response inputs.
|
|
3550
|
+
*/
|
|
3551
|
+
export interface OpenAIResponseInputToolWebSearch {
|
|
3552
|
+
search_context_size?: string | null;
|
|
2857
3553
|
|
|
2858
3554
|
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
2859
3555
|
}
|
|
@@ -2870,6 +3566,22 @@ export namespace ResponseListResponse {
|
|
|
2870
3566
|
|
|
2871
3567
|
/**
|
|
2872
3568
|
* Options for ranking and filtering search results.
|
|
3569
|
+
*
|
|
3570
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
3571
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
3572
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
3573
|
+
*
|
|
3574
|
+
* Examples: # Weighted ranker with custom alpha
|
|
3575
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
3576
|
+
*
|
|
3577
|
+
* # RRF ranker with custom impact factor
|
|
3578
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
3579
|
+
*
|
|
3580
|
+
* # Use config defaults (just specify ranker type)
|
|
3581
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
3582
|
+
*
|
|
3583
|
+
* # Score threshold filtering
|
|
3584
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
2873
3585
|
*/
|
|
2874
3586
|
ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
|
|
2875
3587
|
|
|
@@ -2879,11 +3591,48 @@ export namespace ResponseListResponse {
|
|
|
2879
3591
|
export namespace OpenAIResponseInputToolFileSearch {
|
|
2880
3592
|
/**
|
|
2881
3593
|
* Options for ranking and filtering search results.
|
|
3594
|
+
*
|
|
3595
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
3596
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
3597
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
3598
|
+
*
|
|
3599
|
+
* Examples: # Weighted ranker with custom alpha
|
|
3600
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
3601
|
+
*
|
|
3602
|
+
* # RRF ranker with custom impact factor
|
|
3603
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
3604
|
+
*
|
|
3605
|
+
* # Use config defaults (just specify ranker type)
|
|
3606
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
3607
|
+
*
|
|
3608
|
+
* # Score threshold filtering
|
|
3609
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
2882
3610
|
*/
|
|
2883
3611
|
export interface RankingOptions {
|
|
3612
|
+
/**
|
|
3613
|
+
* Weight factor for weighted ranker
|
|
3614
|
+
*/
|
|
3615
|
+
alpha?: number | null;
|
|
3616
|
+
|
|
3617
|
+
/**
|
|
3618
|
+
* Impact factor for RRF algorithm
|
|
3619
|
+
*/
|
|
3620
|
+
impact_factor?: number | null;
|
|
3621
|
+
|
|
3622
|
+
/**
|
|
3623
|
+
* Model identifier for neural reranker
|
|
3624
|
+
*/
|
|
3625
|
+
model?: string | null;
|
|
3626
|
+
|
|
2884
3627
|
ranker?: string | null;
|
|
2885
3628
|
|
|
2886
3629
|
score_threshold?: number | null;
|
|
3630
|
+
|
|
3631
|
+
/**
|
|
3632
|
+
* Weights for combining vector, keyword, and neural scores. Keys: 'vector',
|
|
3633
|
+
* 'keyword', 'neural'
|
|
3634
|
+
*/
|
|
3635
|
+
weights?: { [key: string]: number } | null;
|
|
2887
3636
|
}
|
|
2888
3637
|
}
|
|
2889
3638
|
|
|
@@ -2931,19 +3680,19 @@ export namespace ResponseListResponse {
|
|
|
2931
3680
|
export interface Usage {
|
|
2932
3681
|
input_tokens: number;
|
|
2933
3682
|
|
|
2934
|
-
output_tokens: number;
|
|
2935
|
-
|
|
2936
|
-
total_tokens: number;
|
|
2937
|
-
|
|
2938
3683
|
/**
|
|
2939
3684
|
* Token details for input tokens in OpenAI response usage.
|
|
2940
3685
|
*/
|
|
2941
|
-
input_tokens_details
|
|
3686
|
+
input_tokens_details: Usage.InputTokensDetails;
|
|
3687
|
+
|
|
3688
|
+
output_tokens: number;
|
|
2942
3689
|
|
|
2943
3690
|
/**
|
|
2944
3691
|
* Token details for output tokens in OpenAI response usage.
|
|
2945
3692
|
*/
|
|
2946
|
-
output_tokens_details
|
|
3693
|
+
output_tokens_details: Usage.OutputTokensDetails;
|
|
3694
|
+
|
|
3695
|
+
total_tokens: number;
|
|
2947
3696
|
}
|
|
2948
3697
|
|
|
2949
3698
|
export namespace Usage {
|
|
@@ -2951,14 +3700,14 @@ export namespace ResponseListResponse {
|
|
|
2951
3700
|
* Token details for input tokens in OpenAI response usage.
|
|
2952
3701
|
*/
|
|
2953
3702
|
export interface InputTokensDetails {
|
|
2954
|
-
cached_tokens
|
|
3703
|
+
cached_tokens: number;
|
|
2955
3704
|
}
|
|
2956
3705
|
|
|
2957
3706
|
/**
|
|
2958
3707
|
* Token details for output tokens in OpenAI response usage.
|
|
2959
3708
|
*/
|
|
2960
3709
|
export interface OutputTokensDetails {
|
|
2961
|
-
reasoning_tokens
|
|
3710
|
+
reasoning_tokens: number;
|
|
2962
3711
|
}
|
|
2963
3712
|
}
|
|
2964
3713
|
}
|
|
@@ -2977,6 +3726,9 @@ export interface ResponseDeleteResponse {
|
|
|
2977
3726
|
export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCreateParamsStreaming;
|
|
2978
3727
|
|
|
2979
3728
|
export interface ResponseCreateParamsBase {
|
|
3729
|
+
/**
|
|
3730
|
+
* Input message(s) to create the response.
|
|
3731
|
+
*/
|
|
2980
3732
|
input:
|
|
2981
3733
|
| string
|
|
2982
3734
|
| Array<
|
|
@@ -2989,25 +3741,69 @@ export interface ResponseCreateParamsBase {
|
|
|
2989
3741
|
| ResponseCreateParams.OpenAIResponseMcpApprovalRequest
|
|
2990
3742
|
| ResponseCreateParams.OpenAIResponseInputFunctionToolCallOutput
|
|
2991
3743
|
| ResponseCreateParams.OpenAIResponseMcpApprovalResponse
|
|
2992
|
-
| ResponseCreateParams.OpenAIResponseMessageInput
|
|
2993
3744
|
>;
|
|
2994
3745
|
|
|
3746
|
+
/**
|
|
3747
|
+
* The underlying LLM used for completions.
|
|
3748
|
+
*/
|
|
2995
3749
|
model: string;
|
|
2996
3750
|
|
|
3751
|
+
/**
|
|
3752
|
+
* Optional ID of a conversation to add the response to.
|
|
3753
|
+
*/
|
|
2997
3754
|
conversation?: string | null;
|
|
2998
3755
|
|
|
2999
|
-
|
|
3756
|
+
/**
|
|
3757
|
+
* List of guardrails to apply during response generation.
|
|
3758
|
+
*/
|
|
3759
|
+
guardrails?: Array<string | ResponseCreateParams.ResponseGuardrailSpec> | null;
|
|
3760
|
+
|
|
3761
|
+
/**
|
|
3762
|
+
* Additional fields to include in the response.
|
|
3763
|
+
*/
|
|
3764
|
+
include?: Array<
|
|
3765
|
+
| 'web_search_call.action.sources'
|
|
3766
|
+
| 'code_interpreter_call.outputs'
|
|
3767
|
+
| 'computer_call_output.output.image_url'
|
|
3768
|
+
| 'file_search_call.results'
|
|
3769
|
+
| 'message.input_image.image_url'
|
|
3770
|
+
| 'message.output_text.logprobs'
|
|
3771
|
+
| 'reasoning.encrypted_content'
|
|
3772
|
+
> | null;
|
|
3000
3773
|
|
|
3774
|
+
/**
|
|
3775
|
+
* Instructions to guide the model's behavior.
|
|
3776
|
+
*/
|
|
3001
3777
|
instructions?: string | null;
|
|
3002
3778
|
|
|
3779
|
+
/**
|
|
3780
|
+
* Maximum number of inference iterations.
|
|
3781
|
+
*/
|
|
3003
3782
|
max_infer_iters?: number | null;
|
|
3004
3783
|
|
|
3784
|
+
/**
|
|
3785
|
+
* Upper bound for the number of tokens that can be generated for a response.
|
|
3786
|
+
*/
|
|
3787
|
+
max_output_tokens?: number | null;
|
|
3788
|
+
|
|
3789
|
+
/**
|
|
3790
|
+
* Max number of total calls to built-in tools that can be processed in a response.
|
|
3791
|
+
*/
|
|
3005
3792
|
max_tool_calls?: number | null;
|
|
3006
3793
|
|
|
3794
|
+
/**
|
|
3795
|
+
* Dictionary of metadata key-value pairs to attach to the response.
|
|
3796
|
+
*/
|
|
3007
3797
|
metadata?: { [key: string]: string } | null;
|
|
3008
3798
|
|
|
3799
|
+
/**
|
|
3800
|
+
* Whether to enable parallel tool calls.
|
|
3801
|
+
*/
|
|
3009
3802
|
parallel_tool_calls?: boolean | null;
|
|
3010
3803
|
|
|
3804
|
+
/**
|
|
3805
|
+
* Optional ID of a previous response to continue from.
|
|
3806
|
+
*/
|
|
3011
3807
|
previous_response_id?: string | null;
|
|
3012
3808
|
|
|
3013
3809
|
/**
|
|
@@ -3015,10 +3811,31 @@ export interface ResponseCreateParamsBase {
|
|
|
3015
3811
|
*/
|
|
3016
3812
|
prompt?: ResponseCreateParams.Prompt | null;
|
|
3017
3813
|
|
|
3814
|
+
/**
|
|
3815
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
3816
|
+
*
|
|
3817
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
3818
|
+
*/
|
|
3819
|
+
reasoning?: ResponseCreateParams.Reasoning | null;
|
|
3820
|
+
|
|
3821
|
+
/**
|
|
3822
|
+
* A stable identifier used for safety monitoring and abuse detection.
|
|
3823
|
+
*/
|
|
3824
|
+
safety_identifier?: string | null;
|
|
3825
|
+
|
|
3826
|
+
/**
|
|
3827
|
+
* Whether to store the response in the database.
|
|
3828
|
+
*/
|
|
3018
3829
|
store?: boolean | null;
|
|
3019
3830
|
|
|
3831
|
+
/**
|
|
3832
|
+
* Whether to stream the response.
|
|
3833
|
+
*/
|
|
3020
3834
|
stream?: boolean | null;
|
|
3021
3835
|
|
|
3836
|
+
/**
|
|
3837
|
+
* Sampling temperature.
|
|
3838
|
+
*/
|
|
3022
3839
|
temperature?: number | null;
|
|
3023
3840
|
|
|
3024
3841
|
/**
|
|
@@ -3026,6 +3843,24 @@ export interface ResponseCreateParamsBase {
|
|
|
3026
3843
|
*/
|
|
3027
3844
|
text?: ResponseCreateParams.Text | null;
|
|
3028
3845
|
|
|
3846
|
+
/**
|
|
3847
|
+
* How the model should select which tool to call (if any).
|
|
3848
|
+
*/
|
|
3849
|
+
tool_choice?:
|
|
3850
|
+
| 'auto'
|
|
3851
|
+
| 'required'
|
|
3852
|
+
| 'none'
|
|
3853
|
+
| ResponseCreateParams.OpenAIResponseInputToolChoiceAllowedTools
|
|
3854
|
+
| ResponseCreateParams.OpenAIResponseInputToolChoiceFileSearch
|
|
3855
|
+
| ResponseCreateParams.OpenAIResponseInputToolChoiceWebSearch
|
|
3856
|
+
| ResponseCreateParams.OpenAIResponseInputToolChoiceFunctionTool
|
|
3857
|
+
| ResponseCreateParams.OpenAIResponseInputToolChoiceMcpTool
|
|
3858
|
+
| ResponseCreateParams.OpenAIResponseInputToolChoiceCustomTool
|
|
3859
|
+
| null;
|
|
3860
|
+
|
|
3861
|
+
/**
|
|
3862
|
+
* List of tools available to the model.
|
|
3863
|
+
*/
|
|
3029
3864
|
tools?: Array<
|
|
3030
3865
|
| ResponseCreateParams.OpenAIResponseInputToolWebSearch
|
|
3031
3866
|
| ResponseCreateParams.OpenAIResponseInputToolFileSearch
|
|
@@ -3049,7 +3884,7 @@ export namespace ResponseCreateParams {
|
|
|
3049
3884
|
| OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile
|
|
3050
3885
|
>
|
|
3051
3886
|
| Array<
|
|
3052
|
-
| OpenAIResponseMessageInput.
|
|
3887
|
+
| OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput
|
|
3053
3888
|
| OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal
|
|
3054
3889
|
>;
|
|
3055
3890
|
|
|
@@ -3100,20 +3935,22 @@ export namespace ResponseCreateParams {
|
|
|
3100
3935
|
type?: 'input_file';
|
|
3101
3936
|
}
|
|
3102
3937
|
|
|
3103
|
-
export interface
|
|
3938
|
+
export interface OpenAIResponseOutputMessageContentOutputTextInput {
|
|
3104
3939
|
text: string;
|
|
3105
3940
|
|
|
3106
3941
|
annotations?: Array<
|
|
3107
|
-
|
|
|
3108
|
-
|
|
|
3109
|
-
|
|
|
3110
|
-
|
|
|
3942
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation
|
|
3943
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation
|
|
3944
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation
|
|
3945
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath
|
|
3111
3946
|
>;
|
|
3112
3947
|
|
|
3948
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
|
|
3949
|
+
|
|
3113
3950
|
type?: 'output_text';
|
|
3114
3951
|
}
|
|
3115
3952
|
|
|
3116
|
-
export namespace
|
|
3953
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextInput {
|
|
3117
3954
|
/**
|
|
3118
3955
|
* File citation annotation for referencing specific files in response content.
|
|
3119
3956
|
*/
|
|
@@ -3163,6 +4000,55 @@ export namespace ResponseCreateParams {
|
|
|
3163
4000
|
|
|
3164
4001
|
type?: 'file_path';
|
|
3165
4002
|
}
|
|
4003
|
+
|
|
4004
|
+
/**
|
|
4005
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
4006
|
+
* response.
|
|
4007
|
+
*/
|
|
4008
|
+
export interface Logprob {
|
|
4009
|
+
/**
|
|
4010
|
+
* The token.
|
|
4011
|
+
*/
|
|
4012
|
+
token: string;
|
|
4013
|
+
|
|
4014
|
+
/**
|
|
4015
|
+
* The log probability of the token.
|
|
4016
|
+
*/
|
|
4017
|
+
logprob: number;
|
|
4018
|
+
|
|
4019
|
+
/**
|
|
4020
|
+
* The bytes for the token.
|
|
4021
|
+
*/
|
|
4022
|
+
bytes?: Array<number> | null;
|
|
4023
|
+
|
|
4024
|
+
/**
|
|
4025
|
+
* The top log probabilities for the token.
|
|
4026
|
+
*/
|
|
4027
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
4028
|
+
}
|
|
4029
|
+
|
|
4030
|
+
export namespace Logprob {
|
|
4031
|
+
/**
|
|
4032
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
4033
|
+
* response.
|
|
4034
|
+
*/
|
|
4035
|
+
export interface TopLogprob {
|
|
4036
|
+
/**
|
|
4037
|
+
* The token.
|
|
4038
|
+
*/
|
|
4039
|
+
token: string;
|
|
4040
|
+
|
|
4041
|
+
/**
|
|
4042
|
+
* The log probability of the token.
|
|
4043
|
+
*/
|
|
4044
|
+
logprob: number;
|
|
4045
|
+
|
|
4046
|
+
/**
|
|
4047
|
+
* The bytes for the token.
|
|
4048
|
+
*/
|
|
4049
|
+
bytes?: Array<number> | null;
|
|
4050
|
+
}
|
|
4051
|
+
}
|
|
3166
4052
|
}
|
|
3167
4053
|
|
|
3168
4054
|
/**
|
|
@@ -3327,143 +4213,10 @@ export namespace ResponseCreateParams {
|
|
|
3327
4213
|
}
|
|
3328
4214
|
|
|
3329
4215
|
/**
|
|
3330
|
-
*
|
|
3331
|
-
* under one type because the Responses API gives them all the same "type" value,
|
|
3332
|
-
* and there is no way to tell them apart in certain scenarios.
|
|
4216
|
+
* Specification for a guardrail to apply during response generation.
|
|
3333
4217
|
*/
|
|
3334
|
-
export interface
|
|
3335
|
-
|
|
3336
|
-
| string
|
|
3337
|
-
| Array<
|
|
3338
|
-
| OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText
|
|
3339
|
-
| OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage
|
|
3340
|
-
| OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile
|
|
3341
|
-
>
|
|
3342
|
-
| Array<
|
|
3343
|
-
| OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputText
|
|
3344
|
-
| OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal
|
|
3345
|
-
>;
|
|
3346
|
-
|
|
3347
|
-
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
3348
|
-
|
|
3349
|
-
id?: string | null;
|
|
3350
|
-
|
|
3351
|
-
status?: string | null;
|
|
3352
|
-
|
|
3353
|
-
type?: 'message';
|
|
3354
|
-
}
|
|
3355
|
-
|
|
3356
|
-
export namespace OpenAIResponseMessageInput {
|
|
3357
|
-
/**
|
|
3358
|
-
* Text content for input messages in OpenAI response format.
|
|
3359
|
-
*/
|
|
3360
|
-
export interface OpenAIResponseInputMessageContentText {
|
|
3361
|
-
text: string;
|
|
3362
|
-
|
|
3363
|
-
type?: 'input_text';
|
|
3364
|
-
}
|
|
3365
|
-
|
|
3366
|
-
/**
|
|
3367
|
-
* Image content for input messages in OpenAI response format.
|
|
3368
|
-
*/
|
|
3369
|
-
export interface OpenAIResponseInputMessageContentImage {
|
|
3370
|
-
detail?: 'low' | 'high' | 'auto';
|
|
3371
|
-
|
|
3372
|
-
file_id?: string | null;
|
|
3373
|
-
|
|
3374
|
-
image_url?: string | null;
|
|
3375
|
-
|
|
3376
|
-
type?: 'input_image';
|
|
3377
|
-
}
|
|
3378
|
-
|
|
3379
|
-
/**
|
|
3380
|
-
* File content for input messages in OpenAI response format.
|
|
3381
|
-
*/
|
|
3382
|
-
export interface OpenAIResponseInputMessageContentFile {
|
|
3383
|
-
file_data?: string | null;
|
|
3384
|
-
|
|
3385
|
-
file_id?: string | null;
|
|
3386
|
-
|
|
3387
|
-
file_url?: string | null;
|
|
3388
|
-
|
|
3389
|
-
filename?: string | null;
|
|
3390
|
-
|
|
3391
|
-
type?: 'input_file';
|
|
3392
|
-
}
|
|
3393
|
-
|
|
3394
|
-
export interface OpenAIResponseOutputMessageContentOutputText {
|
|
3395
|
-
text: string;
|
|
3396
|
-
|
|
3397
|
-
annotations?: Array<
|
|
3398
|
-
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
|
|
3399
|
-
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
|
|
3400
|
-
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
|
|
3401
|
-
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
|
|
3402
|
-
>;
|
|
3403
|
-
|
|
3404
|
-
type?: 'output_text';
|
|
3405
|
-
}
|
|
3406
|
-
|
|
3407
|
-
export namespace OpenAIResponseOutputMessageContentOutputText {
|
|
3408
|
-
/**
|
|
3409
|
-
* File citation annotation for referencing specific files in response content.
|
|
3410
|
-
*/
|
|
3411
|
-
export interface OpenAIResponseAnnotationFileCitation {
|
|
3412
|
-
file_id: string;
|
|
3413
|
-
|
|
3414
|
-
filename: string;
|
|
3415
|
-
|
|
3416
|
-
index: number;
|
|
3417
|
-
|
|
3418
|
-
type?: 'file_citation';
|
|
3419
|
-
}
|
|
3420
|
-
|
|
3421
|
-
/**
|
|
3422
|
-
* URL citation annotation for referencing external web resources.
|
|
3423
|
-
*/
|
|
3424
|
-
export interface OpenAIResponseAnnotationCitation {
|
|
3425
|
-
end_index: number;
|
|
3426
|
-
|
|
3427
|
-
start_index: number;
|
|
3428
|
-
|
|
3429
|
-
title: string;
|
|
3430
|
-
|
|
3431
|
-
url: string;
|
|
3432
|
-
|
|
3433
|
-
type?: 'url_citation';
|
|
3434
|
-
}
|
|
3435
|
-
|
|
3436
|
-
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
3437
|
-
container_id: string;
|
|
3438
|
-
|
|
3439
|
-
end_index: number;
|
|
3440
|
-
|
|
3441
|
-
file_id: string;
|
|
3442
|
-
|
|
3443
|
-
filename: string;
|
|
3444
|
-
|
|
3445
|
-
start_index: number;
|
|
3446
|
-
|
|
3447
|
-
type?: 'container_file_citation';
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
|
-
export interface OpenAIResponseAnnotationFilePath {
|
|
3451
|
-
file_id: string;
|
|
3452
|
-
|
|
3453
|
-
index: number;
|
|
3454
|
-
|
|
3455
|
-
type?: 'file_path';
|
|
3456
|
-
}
|
|
3457
|
-
}
|
|
3458
|
-
|
|
3459
|
-
/**
|
|
3460
|
-
* Refusal content within a streamed response part.
|
|
3461
|
-
*/
|
|
3462
|
-
export interface OpenAIResponseContentPartRefusal {
|
|
3463
|
-
refusal: string;
|
|
3464
|
-
|
|
3465
|
-
type?: 'refusal';
|
|
3466
|
-
}
|
|
4218
|
+
export interface ResponseGuardrailSpec {
|
|
4219
|
+
type: string;
|
|
3467
4220
|
}
|
|
3468
4221
|
|
|
3469
4222
|
/**
|
|
@@ -3521,6 +4274,15 @@ export namespace ResponseCreateParams {
|
|
|
3521
4274
|
}
|
|
3522
4275
|
}
|
|
3523
4276
|
|
|
4277
|
+
/**
|
|
4278
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
4279
|
+
*
|
|
4280
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
4281
|
+
*/
|
|
4282
|
+
export interface Reasoning {
|
|
4283
|
+
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
|
|
4284
|
+
}
|
|
4285
|
+
|
|
3524
4286
|
/**
|
|
3525
4287
|
* Text response configuration for OpenAI responses.
|
|
3526
4288
|
*/
|
|
@@ -3548,6 +4310,60 @@ export namespace ResponseCreateParams {
|
|
|
3548
4310
|
}
|
|
3549
4311
|
}
|
|
3550
4312
|
|
|
4313
|
+
/**
|
|
4314
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
4315
|
+
*/
|
|
4316
|
+
export interface OpenAIResponseInputToolChoiceAllowedTools {
|
|
4317
|
+
tools: Array<{ [key: string]: string }>;
|
|
4318
|
+
|
|
4319
|
+
mode?: 'auto' | 'required';
|
|
4320
|
+
|
|
4321
|
+
type?: 'allowed_tools';
|
|
4322
|
+
}
|
|
4323
|
+
|
|
4324
|
+
/**
|
|
4325
|
+
* Indicates that the model should use file search to generate a response.
|
|
4326
|
+
*/
|
|
4327
|
+
export interface OpenAIResponseInputToolChoiceFileSearch {
|
|
4328
|
+
type?: 'file_search';
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
/**
|
|
4332
|
+
* Indicates that the model should use web search to generate a response
|
|
4333
|
+
*/
|
|
4334
|
+
export interface OpenAIResponseInputToolChoiceWebSearch {
|
|
4335
|
+
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
4336
|
+
}
|
|
4337
|
+
|
|
4338
|
+
/**
|
|
4339
|
+
* Forces the model to call a specific function.
|
|
4340
|
+
*/
|
|
4341
|
+
export interface OpenAIResponseInputToolChoiceFunctionTool {
|
|
4342
|
+
name: string;
|
|
4343
|
+
|
|
4344
|
+
type?: 'function';
|
|
4345
|
+
}
|
|
4346
|
+
|
|
4347
|
+
/**
|
|
4348
|
+
* Forces the model to call a specific tool on a remote MCP server
|
|
4349
|
+
*/
|
|
4350
|
+
export interface OpenAIResponseInputToolChoiceMcpTool {
|
|
4351
|
+
server_label: string;
|
|
4352
|
+
|
|
4353
|
+
name?: string | null;
|
|
4354
|
+
|
|
4355
|
+
type?: 'mcp';
|
|
4356
|
+
}
|
|
4357
|
+
|
|
4358
|
+
/**
|
|
4359
|
+
* Forces the model to call a custom tool.
|
|
4360
|
+
*/
|
|
4361
|
+
export interface OpenAIResponseInputToolChoiceCustomTool {
|
|
4362
|
+
name: string;
|
|
4363
|
+
|
|
4364
|
+
type?: 'custom';
|
|
4365
|
+
}
|
|
4366
|
+
|
|
3551
4367
|
/**
|
|
3552
4368
|
* Web search tool configuration for OpenAI response inputs.
|
|
3553
4369
|
*/
|
|
@@ -3569,6 +4385,22 @@ export namespace ResponseCreateParams {
|
|
|
3569
4385
|
|
|
3570
4386
|
/**
|
|
3571
4387
|
* Options for ranking and filtering search results.
|
|
4388
|
+
*
|
|
4389
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
4390
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
4391
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
4392
|
+
*
|
|
4393
|
+
* Examples: # Weighted ranker with custom alpha
|
|
4394
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
4395
|
+
*
|
|
4396
|
+
* # RRF ranker with custom impact factor
|
|
4397
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
4398
|
+
*
|
|
4399
|
+
* # Use config defaults (just specify ranker type)
|
|
4400
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
4401
|
+
*
|
|
4402
|
+
* # Score threshold filtering
|
|
4403
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
3572
4404
|
*/
|
|
3573
4405
|
ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
|
|
3574
4406
|
|
|
@@ -3578,11 +4410,48 @@ export namespace ResponseCreateParams {
|
|
|
3578
4410
|
export namespace OpenAIResponseInputToolFileSearch {
|
|
3579
4411
|
/**
|
|
3580
4412
|
* Options for ranking and filtering search results.
|
|
4413
|
+
*
|
|
4414
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
4415
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
4416
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
4417
|
+
*
|
|
4418
|
+
* Examples: # Weighted ranker with custom alpha
|
|
4419
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
4420
|
+
*
|
|
4421
|
+
* # RRF ranker with custom impact factor
|
|
4422
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
4423
|
+
*
|
|
4424
|
+
* # Use config defaults (just specify ranker type)
|
|
4425
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
4426
|
+
*
|
|
4427
|
+
* # Score threshold filtering
|
|
4428
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
3581
4429
|
*/
|
|
3582
4430
|
export interface RankingOptions {
|
|
4431
|
+
/**
|
|
4432
|
+
* Weight factor for weighted ranker
|
|
4433
|
+
*/
|
|
4434
|
+
alpha?: number | null;
|
|
4435
|
+
|
|
4436
|
+
/**
|
|
4437
|
+
* Impact factor for RRF algorithm
|
|
4438
|
+
*/
|
|
4439
|
+
impact_factor?: number | null;
|
|
4440
|
+
|
|
4441
|
+
/**
|
|
4442
|
+
* Model identifier for neural reranker
|
|
4443
|
+
*/
|
|
4444
|
+
model?: string | null;
|
|
4445
|
+
|
|
3583
4446
|
ranker?: string | null;
|
|
3584
4447
|
|
|
3585
4448
|
score_threshold?: number | null;
|
|
4449
|
+
|
|
4450
|
+
/**
|
|
4451
|
+
* Weights for combining vector, keyword, and neural scores. Keys: 'vector',
|
|
4452
|
+
* 'keyword', 'neural'
|
|
4453
|
+
*/
|
|
4454
|
+
weights?: { [key: string]: number } | null;
|
|
3586
4455
|
}
|
|
3587
4456
|
}
|
|
3588
4457
|
|
|
@@ -3607,8 +4476,6 @@ export namespace ResponseCreateParams {
|
|
|
3607
4476
|
export interface OpenAIResponseInputToolMcp {
|
|
3608
4477
|
server_label: string;
|
|
3609
4478
|
|
|
3610
|
-
server_url: string;
|
|
3611
|
-
|
|
3612
4479
|
/**
|
|
3613
4480
|
* Filter configuration for restricting which MCP tools can be used.
|
|
3614
4481
|
*/
|
|
@@ -3616,6 +4483,8 @@ export namespace ResponseCreateParams {
|
|
|
3616
4483
|
|
|
3617
4484
|
authorization?: string | null;
|
|
3618
4485
|
|
|
4486
|
+
connector_id?: string | null;
|
|
4487
|
+
|
|
3619
4488
|
headers?: { [key: string]: unknown } | null;
|
|
3620
4489
|
|
|
3621
4490
|
/**
|
|
@@ -3623,6 +4492,8 @@ export namespace ResponseCreateParams {
|
|
|
3623
4492
|
*/
|
|
3624
4493
|
require_approval?: 'always' | 'never' | OpenAIResponseInputToolMcp.ApprovalFilter;
|
|
3625
4494
|
|
|
4495
|
+
server_url?: string | null;
|
|
4496
|
+
|
|
3626
4497
|
type?: 'mcp';
|
|
3627
4498
|
}
|
|
3628
4499
|
|
|
@@ -3649,14 +4520,23 @@ export namespace ResponseCreateParams {
|
|
|
3649
4520
|
}
|
|
3650
4521
|
|
|
3651
4522
|
export interface ResponseCreateParamsNonStreaming extends ResponseCreateParamsBase {
|
|
4523
|
+
/**
|
|
4524
|
+
* Whether to stream the response.
|
|
4525
|
+
*/
|
|
3652
4526
|
stream?: false | null;
|
|
3653
4527
|
}
|
|
3654
4528
|
|
|
3655
4529
|
export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase {
|
|
4530
|
+
/**
|
|
4531
|
+
* Whether to stream the response.
|
|
4532
|
+
*/
|
|
3656
4533
|
stream: true;
|
|
3657
4534
|
}
|
|
3658
4535
|
|
|
3659
4536
|
export interface ResponseListParams extends OpenAICursorPageParams {
|
|
4537
|
+
/**
|
|
4538
|
+
* The model to filter responses by.
|
|
4539
|
+
*/
|
|
3660
4540
|
model?: string | null;
|
|
3661
4541
|
|
|
3662
4542
|
/**
|