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
|
@@ -39,11 +39,14 @@ export interface ResponseObject {
|
|
|
39
39
|
model: string;
|
|
40
40
|
output: Array<ResponseObject.OpenAIResponseMessageOutput | ResponseObject.OpenAIResponseOutputMessageWebSearchToolCall | ResponseObject.OpenAIResponseOutputMessageFileSearchToolCall | ResponseObject.OpenAIResponseOutputMessageFunctionToolCall | ResponseObject.OpenAIResponseOutputMessageMcpCall | ResponseObject.OpenAIResponseOutputMessageMcpListTools | ResponseObject.OpenAIResponseMcpApprovalRequest>;
|
|
41
41
|
status: string;
|
|
42
|
+
store: boolean;
|
|
43
|
+
completed_at?: number | null;
|
|
42
44
|
/**
|
|
43
45
|
* Error details for failed OpenAI response requests.
|
|
44
46
|
*/
|
|
45
47
|
error?: ResponseObject.Error | null;
|
|
46
48
|
instructions?: string | null;
|
|
49
|
+
max_output_tokens?: number | null;
|
|
47
50
|
max_tool_calls?: number | null;
|
|
48
51
|
metadata?: {
|
|
49
52
|
[key: string]: string;
|
|
@@ -55,11 +58,22 @@ export interface ResponseObject {
|
|
|
55
58
|
* OpenAI compatible Prompt object that is used in OpenAI responses.
|
|
56
59
|
*/
|
|
57
60
|
prompt?: ResponseObject.Prompt | null;
|
|
61
|
+
/**
|
|
62
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
63
|
+
*
|
|
64
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
65
|
+
*/
|
|
66
|
+
reasoning?: ResponseObject.Reasoning | null;
|
|
67
|
+
safety_identifier?: string | null;
|
|
58
68
|
temperature?: number | null;
|
|
59
69
|
/**
|
|
60
70
|
* Text response configuration for OpenAI responses.
|
|
61
71
|
*/
|
|
62
72
|
text?: ResponseObject.Text;
|
|
73
|
+
/**
|
|
74
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
75
|
+
*/
|
|
76
|
+
tool_choice?: 'auto' | 'required' | 'none' | ResponseObject.OpenAIResponseInputToolChoiceAllowedTools | ResponseObject.OpenAIResponseInputToolChoiceFileSearch | ResponseObject.OpenAIResponseInputToolChoiceWebSearch | ResponseObject.OpenAIResponseInputToolChoiceFunctionTool | ResponseObject.OpenAIResponseInputToolChoiceMcpTool | ResponseObject.OpenAIResponseInputToolChoiceCustomTool | null;
|
|
63
77
|
tools?: Array<ResponseObject.OpenAIResponseInputToolWebSearch | ResponseObject.OpenAIResponseInputToolFileSearch | ResponseObject.OpenAIResponseInputToolFunction | ResponseObject.OpenAIResponseToolMcp> | null;
|
|
64
78
|
top_p?: number | null;
|
|
65
79
|
truncation?: string | null;
|
|
@@ -75,7 +89,7 @@ export declare namespace ResponseObject {
|
|
|
75
89
|
* and there is no way to tell them apart in certain scenarios.
|
|
76
90
|
*/
|
|
77
91
|
interface OpenAIResponseMessageOutput {
|
|
78
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
92
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
79
93
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
80
94
|
id?: string | null;
|
|
81
95
|
status?: string | null;
|
|
@@ -108,12 +122,13 @@ export declare namespace ResponseObject {
|
|
|
108
122
|
filename?: string | null;
|
|
109
123
|
type?: 'input_file';
|
|
110
124
|
}
|
|
111
|
-
interface
|
|
125
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
112
126
|
text: string;
|
|
113
|
-
annotations?: Array<
|
|
127
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
128
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
114
129
|
type?: 'output_text';
|
|
115
130
|
}
|
|
116
|
-
namespace
|
|
131
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
117
132
|
/**
|
|
118
133
|
* File citation annotation for referencing specific files in response content.
|
|
119
134
|
*/
|
|
@@ -146,6 +161,48 @@ export declare namespace ResponseObject {
|
|
|
146
161
|
index: number;
|
|
147
162
|
type?: 'file_path';
|
|
148
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
166
|
+
* response.
|
|
167
|
+
*/
|
|
168
|
+
interface Logprob {
|
|
169
|
+
/**
|
|
170
|
+
* The token.
|
|
171
|
+
*/
|
|
172
|
+
token: string;
|
|
173
|
+
/**
|
|
174
|
+
* The log probability of the token.
|
|
175
|
+
*/
|
|
176
|
+
logprob: number;
|
|
177
|
+
/**
|
|
178
|
+
* The bytes for the token.
|
|
179
|
+
*/
|
|
180
|
+
bytes?: Array<number> | null;
|
|
181
|
+
/**
|
|
182
|
+
* The top log probabilities for the token.
|
|
183
|
+
*/
|
|
184
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
185
|
+
}
|
|
186
|
+
namespace Logprob {
|
|
187
|
+
/**
|
|
188
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
189
|
+
* response.
|
|
190
|
+
*/
|
|
191
|
+
interface TopLogprob {
|
|
192
|
+
/**
|
|
193
|
+
* The token.
|
|
194
|
+
*/
|
|
195
|
+
token: string;
|
|
196
|
+
/**
|
|
197
|
+
* The log probability of the token.
|
|
198
|
+
*/
|
|
199
|
+
logprob: number;
|
|
200
|
+
/**
|
|
201
|
+
* The bytes for the token.
|
|
202
|
+
*/
|
|
203
|
+
bytes?: Array<number> | null;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
149
206
|
}
|
|
150
207
|
/**
|
|
151
208
|
* Refusal content within a streamed response part.
|
|
@@ -286,6 +343,14 @@ export declare namespace ResponseObject {
|
|
|
286
343
|
type?: 'input_file';
|
|
287
344
|
}
|
|
288
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
348
|
+
*
|
|
349
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
350
|
+
*/
|
|
351
|
+
interface Reasoning {
|
|
352
|
+
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
|
|
353
|
+
}
|
|
289
354
|
/**
|
|
290
355
|
* Text response configuration for OpenAI responses.
|
|
291
356
|
*/
|
|
@@ -309,6 +374,50 @@ export declare namespace ResponseObject {
|
|
|
309
374
|
type?: 'text' | 'json_schema' | 'json_object';
|
|
310
375
|
}
|
|
311
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
379
|
+
*/
|
|
380
|
+
interface OpenAIResponseInputToolChoiceAllowedTools {
|
|
381
|
+
tools: Array<{
|
|
382
|
+
[key: string]: string;
|
|
383
|
+
}>;
|
|
384
|
+
mode?: 'auto' | 'required';
|
|
385
|
+
type?: 'allowed_tools';
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Indicates that the model should use file search to generate a response.
|
|
389
|
+
*/
|
|
390
|
+
interface OpenAIResponseInputToolChoiceFileSearch {
|
|
391
|
+
type?: 'file_search';
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Indicates that the model should use web search to generate a response
|
|
395
|
+
*/
|
|
396
|
+
interface OpenAIResponseInputToolChoiceWebSearch {
|
|
397
|
+
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Forces the model to call a specific function.
|
|
401
|
+
*/
|
|
402
|
+
interface OpenAIResponseInputToolChoiceFunctionTool {
|
|
403
|
+
name: string;
|
|
404
|
+
type?: 'function';
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Forces the model to call a specific tool on a remote MCP server
|
|
408
|
+
*/
|
|
409
|
+
interface OpenAIResponseInputToolChoiceMcpTool {
|
|
410
|
+
server_label: string;
|
|
411
|
+
name?: string | null;
|
|
412
|
+
type?: 'mcp';
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Forces the model to call a custom tool.
|
|
416
|
+
*/
|
|
417
|
+
interface OpenAIResponseInputToolChoiceCustomTool {
|
|
418
|
+
name: string;
|
|
419
|
+
type?: 'custom';
|
|
420
|
+
}
|
|
312
421
|
/**
|
|
313
422
|
* Web search tool configuration for OpenAI response inputs.
|
|
314
423
|
*/
|
|
@@ -327,6 +436,22 @@ export declare namespace ResponseObject {
|
|
|
327
436
|
max_num_results?: number | null;
|
|
328
437
|
/**
|
|
329
438
|
* Options for ranking and filtering search results.
|
|
439
|
+
*
|
|
440
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
441
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
442
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
443
|
+
*
|
|
444
|
+
* Examples: # Weighted ranker with custom alpha
|
|
445
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
446
|
+
*
|
|
447
|
+
* # RRF ranker with custom impact factor
|
|
448
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
449
|
+
*
|
|
450
|
+
* # Use config defaults (just specify ranker type)
|
|
451
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
452
|
+
*
|
|
453
|
+
* # Score threshold filtering
|
|
454
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
330
455
|
*/
|
|
331
456
|
ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
|
|
332
457
|
type?: 'file_search';
|
|
@@ -334,10 +459,45 @@ export declare namespace ResponseObject {
|
|
|
334
459
|
namespace OpenAIResponseInputToolFileSearch {
|
|
335
460
|
/**
|
|
336
461
|
* Options for ranking and filtering search results.
|
|
462
|
+
*
|
|
463
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
464
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
465
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
466
|
+
*
|
|
467
|
+
* Examples: # Weighted ranker with custom alpha
|
|
468
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
469
|
+
*
|
|
470
|
+
* # RRF ranker with custom impact factor
|
|
471
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
472
|
+
*
|
|
473
|
+
* # Use config defaults (just specify ranker type)
|
|
474
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
475
|
+
*
|
|
476
|
+
* # Score threshold filtering
|
|
477
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
337
478
|
*/
|
|
338
479
|
interface RankingOptions {
|
|
480
|
+
/**
|
|
481
|
+
* Weight factor for weighted ranker
|
|
482
|
+
*/
|
|
483
|
+
alpha?: number | null;
|
|
484
|
+
/**
|
|
485
|
+
* Impact factor for RRF algorithm
|
|
486
|
+
*/
|
|
487
|
+
impact_factor?: number | null;
|
|
488
|
+
/**
|
|
489
|
+
* Model identifier for neural reranker
|
|
490
|
+
*/
|
|
491
|
+
model?: string | null;
|
|
339
492
|
ranker?: string | null;
|
|
340
493
|
score_threshold?: number | null;
|
|
494
|
+
/**
|
|
495
|
+
* Weights for combining vector, keyword, and neural scores. Keys: 'vector',
|
|
496
|
+
* 'keyword', 'neural'
|
|
497
|
+
*/
|
|
498
|
+
weights?: {
|
|
499
|
+
[key: string]: number;
|
|
500
|
+
} | null;
|
|
341
501
|
}
|
|
342
502
|
}
|
|
343
503
|
/**
|
|
@@ -376,29 +536,29 @@ export declare namespace ResponseObject {
|
|
|
376
536
|
*/
|
|
377
537
|
interface Usage {
|
|
378
538
|
input_tokens: number;
|
|
379
|
-
output_tokens: number;
|
|
380
|
-
total_tokens: number;
|
|
381
539
|
/**
|
|
382
540
|
* Token details for input tokens in OpenAI response usage.
|
|
383
541
|
*/
|
|
384
|
-
input_tokens_details
|
|
542
|
+
input_tokens_details: Usage.InputTokensDetails;
|
|
543
|
+
output_tokens: number;
|
|
385
544
|
/**
|
|
386
545
|
* Token details for output tokens in OpenAI response usage.
|
|
387
546
|
*/
|
|
388
|
-
output_tokens_details
|
|
547
|
+
output_tokens_details: Usage.OutputTokensDetails;
|
|
548
|
+
total_tokens: number;
|
|
389
549
|
}
|
|
390
550
|
namespace Usage {
|
|
391
551
|
/**
|
|
392
552
|
* Token details for input tokens in OpenAI response usage.
|
|
393
553
|
*/
|
|
394
554
|
interface InputTokensDetails {
|
|
395
|
-
cached_tokens
|
|
555
|
+
cached_tokens: number;
|
|
396
556
|
}
|
|
397
557
|
/**
|
|
398
558
|
* Token details for output tokens in OpenAI response usage.
|
|
399
559
|
*/
|
|
400
560
|
interface OutputTokensDetails {
|
|
401
|
-
reasoning_tokens
|
|
561
|
+
reasoning_tokens: number;
|
|
402
562
|
}
|
|
403
563
|
}
|
|
404
564
|
}
|
|
@@ -486,6 +646,7 @@ export declare namespace ResponseObjectStream {
|
|
|
486
646
|
interface OpenAIResponseOutputMessageContentOutputText {
|
|
487
647
|
text: string;
|
|
488
648
|
annotations?: Array<OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath>;
|
|
649
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
|
|
489
650
|
type?: 'output_text';
|
|
490
651
|
}
|
|
491
652
|
namespace OpenAIResponseOutputMessageContentOutputText {
|
|
@@ -521,6 +682,48 @@ export declare namespace ResponseObjectStream {
|
|
|
521
682
|
index: number;
|
|
522
683
|
type?: 'file_path';
|
|
523
684
|
}
|
|
685
|
+
/**
|
|
686
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
687
|
+
* response.
|
|
688
|
+
*/
|
|
689
|
+
interface Logprob {
|
|
690
|
+
/**
|
|
691
|
+
* The token.
|
|
692
|
+
*/
|
|
693
|
+
token: string;
|
|
694
|
+
/**
|
|
695
|
+
* The log probability of the token.
|
|
696
|
+
*/
|
|
697
|
+
logprob: number;
|
|
698
|
+
/**
|
|
699
|
+
* The bytes for the token.
|
|
700
|
+
*/
|
|
701
|
+
bytes?: Array<number> | null;
|
|
702
|
+
/**
|
|
703
|
+
* The top log probabilities for the token.
|
|
704
|
+
*/
|
|
705
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
706
|
+
}
|
|
707
|
+
namespace Logprob {
|
|
708
|
+
/**
|
|
709
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
710
|
+
* response.
|
|
711
|
+
*/
|
|
712
|
+
interface TopLogprob {
|
|
713
|
+
/**
|
|
714
|
+
* The token.
|
|
715
|
+
*/
|
|
716
|
+
token: string;
|
|
717
|
+
/**
|
|
718
|
+
* The log probability of the token.
|
|
719
|
+
*/
|
|
720
|
+
logprob: number;
|
|
721
|
+
/**
|
|
722
|
+
* The bytes for the token.
|
|
723
|
+
*/
|
|
724
|
+
bytes?: Array<number> | null;
|
|
725
|
+
}
|
|
726
|
+
}
|
|
524
727
|
}
|
|
525
728
|
/**
|
|
526
729
|
* Refusal content within a streamed response part.
|
|
@@ -675,6 +878,7 @@ export declare namespace ResponseObjectStream {
|
|
|
675
878
|
interface OpenAIResponseOutputMessageContentOutputText {
|
|
676
879
|
text: string;
|
|
677
880
|
annotations?: Array<OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath>;
|
|
881
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputText.Logprob> | null;
|
|
678
882
|
type?: 'output_text';
|
|
679
883
|
}
|
|
680
884
|
namespace OpenAIResponseOutputMessageContentOutputText {
|
|
@@ -710,6 +914,48 @@ export declare namespace ResponseObjectStream {
|
|
|
710
914
|
index: number;
|
|
711
915
|
type?: 'file_path';
|
|
712
916
|
}
|
|
917
|
+
/**
|
|
918
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
919
|
+
* response.
|
|
920
|
+
*/
|
|
921
|
+
interface Logprob {
|
|
922
|
+
/**
|
|
923
|
+
* The token.
|
|
924
|
+
*/
|
|
925
|
+
token: string;
|
|
926
|
+
/**
|
|
927
|
+
* The log probability of the token.
|
|
928
|
+
*/
|
|
929
|
+
logprob: number;
|
|
930
|
+
/**
|
|
931
|
+
* The bytes for the token.
|
|
932
|
+
*/
|
|
933
|
+
bytes?: Array<number> | null;
|
|
934
|
+
/**
|
|
935
|
+
* The top log probabilities for the token.
|
|
936
|
+
*/
|
|
937
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
938
|
+
}
|
|
939
|
+
namespace Logprob {
|
|
940
|
+
/**
|
|
941
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
942
|
+
* response.
|
|
943
|
+
*/
|
|
944
|
+
interface TopLogprob {
|
|
945
|
+
/**
|
|
946
|
+
* The token.
|
|
947
|
+
*/
|
|
948
|
+
token: string;
|
|
949
|
+
/**
|
|
950
|
+
* The log probability of the token.
|
|
951
|
+
*/
|
|
952
|
+
logprob: number;
|
|
953
|
+
/**
|
|
954
|
+
* The bytes for the token.
|
|
955
|
+
*/
|
|
956
|
+
bytes?: Array<number> | null;
|
|
957
|
+
}
|
|
958
|
+
}
|
|
713
959
|
}
|
|
714
960
|
/**
|
|
715
961
|
* Refusal content within a streamed response part.
|
|
@@ -815,8 +1061,53 @@ export declare namespace ResponseObjectStream {
|
|
|
815
1061
|
item_id: string;
|
|
816
1062
|
output_index: number;
|
|
817
1063
|
sequence_number: number;
|
|
1064
|
+
logprobs?: Array<OpenAIResponseObjectStreamResponseOutputTextDelta.Logprob> | null;
|
|
818
1065
|
type?: 'response.output_text.delta';
|
|
819
1066
|
}
|
|
1067
|
+
namespace OpenAIResponseObjectStreamResponseOutputTextDelta {
|
|
1068
|
+
/**
|
|
1069
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1070
|
+
* response.
|
|
1071
|
+
*/
|
|
1072
|
+
interface Logprob {
|
|
1073
|
+
/**
|
|
1074
|
+
* The token.
|
|
1075
|
+
*/
|
|
1076
|
+
token: string;
|
|
1077
|
+
/**
|
|
1078
|
+
* The log probability of the token.
|
|
1079
|
+
*/
|
|
1080
|
+
logprob: number;
|
|
1081
|
+
/**
|
|
1082
|
+
* The bytes for the token.
|
|
1083
|
+
*/
|
|
1084
|
+
bytes?: Array<number> | null;
|
|
1085
|
+
/**
|
|
1086
|
+
* The top log probabilities for the token.
|
|
1087
|
+
*/
|
|
1088
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1089
|
+
}
|
|
1090
|
+
namespace Logprob {
|
|
1091
|
+
/**
|
|
1092
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1093
|
+
* response.
|
|
1094
|
+
*/
|
|
1095
|
+
interface TopLogprob {
|
|
1096
|
+
/**
|
|
1097
|
+
* The token.
|
|
1098
|
+
*/
|
|
1099
|
+
token: string;
|
|
1100
|
+
/**
|
|
1101
|
+
* The log probability of the token.
|
|
1102
|
+
*/
|
|
1103
|
+
logprob: number;
|
|
1104
|
+
/**
|
|
1105
|
+
* The bytes for the token.
|
|
1106
|
+
*/
|
|
1107
|
+
bytes?: Array<number> | null;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
820
1111
|
/**
|
|
821
1112
|
* Streaming event for when text output is completed.
|
|
822
1113
|
*/
|
|
@@ -943,9 +1234,7 @@ export declare namespace ResponseObjectStream {
|
|
|
943
1234
|
interface OpenAIResponseContentPartOutputText {
|
|
944
1235
|
text: string;
|
|
945
1236
|
annotations?: Array<OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath>;
|
|
946
|
-
logprobs?: Array<
|
|
947
|
-
[key: string]: unknown;
|
|
948
|
-
}> | null;
|
|
1237
|
+
logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
|
|
949
1238
|
type?: 'output_text';
|
|
950
1239
|
}
|
|
951
1240
|
namespace OpenAIResponseContentPartOutputText {
|
|
@@ -981,6 +1270,48 @@ export declare namespace ResponseObjectStream {
|
|
|
981
1270
|
index: number;
|
|
982
1271
|
type?: 'file_path';
|
|
983
1272
|
}
|
|
1273
|
+
/**
|
|
1274
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1275
|
+
* response.
|
|
1276
|
+
*/
|
|
1277
|
+
interface Logprob {
|
|
1278
|
+
/**
|
|
1279
|
+
* The token.
|
|
1280
|
+
*/
|
|
1281
|
+
token: string;
|
|
1282
|
+
/**
|
|
1283
|
+
* The log probability of the token.
|
|
1284
|
+
*/
|
|
1285
|
+
logprob: number;
|
|
1286
|
+
/**
|
|
1287
|
+
* The bytes for the token.
|
|
1288
|
+
*/
|
|
1289
|
+
bytes?: Array<number> | null;
|
|
1290
|
+
/**
|
|
1291
|
+
* The top log probabilities for the token.
|
|
1292
|
+
*/
|
|
1293
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1294
|
+
}
|
|
1295
|
+
namespace Logprob {
|
|
1296
|
+
/**
|
|
1297
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1298
|
+
* response.
|
|
1299
|
+
*/
|
|
1300
|
+
interface TopLogprob {
|
|
1301
|
+
/**
|
|
1302
|
+
* The token.
|
|
1303
|
+
*/
|
|
1304
|
+
token: string;
|
|
1305
|
+
/**
|
|
1306
|
+
* The log probability of the token.
|
|
1307
|
+
*/
|
|
1308
|
+
logprob: number;
|
|
1309
|
+
/**
|
|
1310
|
+
* The bytes for the token.
|
|
1311
|
+
*/
|
|
1312
|
+
bytes?: Array<number> | null;
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
984
1315
|
}
|
|
985
1316
|
/**
|
|
986
1317
|
* Refusal content within a streamed response part.
|
|
@@ -1019,9 +1350,7 @@ export declare namespace ResponseObjectStream {
|
|
|
1019
1350
|
interface OpenAIResponseContentPartOutputText {
|
|
1020
1351
|
text: string;
|
|
1021
1352
|
annotations?: Array<OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseContentPartOutputText.OpenAIResponseAnnotationFilePath>;
|
|
1022
|
-
logprobs?: Array<
|
|
1023
|
-
[key: string]: unknown;
|
|
1024
|
-
}> | null;
|
|
1353
|
+
logprobs?: Array<OpenAIResponseContentPartOutputText.Logprob> | null;
|
|
1025
1354
|
type?: 'output_text';
|
|
1026
1355
|
}
|
|
1027
1356
|
namespace OpenAIResponseContentPartOutputText {
|
|
@@ -1057,6 +1386,48 @@ export declare namespace ResponseObjectStream {
|
|
|
1057
1386
|
index: number;
|
|
1058
1387
|
type?: 'file_path';
|
|
1059
1388
|
}
|
|
1389
|
+
/**
|
|
1390
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1391
|
+
* response.
|
|
1392
|
+
*/
|
|
1393
|
+
interface Logprob {
|
|
1394
|
+
/**
|
|
1395
|
+
* The token.
|
|
1396
|
+
*/
|
|
1397
|
+
token: string;
|
|
1398
|
+
/**
|
|
1399
|
+
* The log probability of the token.
|
|
1400
|
+
*/
|
|
1401
|
+
logprob: number;
|
|
1402
|
+
/**
|
|
1403
|
+
* The bytes for the token.
|
|
1404
|
+
*/
|
|
1405
|
+
bytes?: Array<number> | null;
|
|
1406
|
+
/**
|
|
1407
|
+
* The top log probabilities for the token.
|
|
1408
|
+
*/
|
|
1409
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1410
|
+
}
|
|
1411
|
+
namespace Logprob {
|
|
1412
|
+
/**
|
|
1413
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1414
|
+
* response.
|
|
1415
|
+
*/
|
|
1416
|
+
interface TopLogprob {
|
|
1417
|
+
/**
|
|
1418
|
+
* The token.
|
|
1419
|
+
*/
|
|
1420
|
+
token: string;
|
|
1421
|
+
/**
|
|
1422
|
+
* The log probability of the token.
|
|
1423
|
+
*/
|
|
1424
|
+
logprob: number;
|
|
1425
|
+
/**
|
|
1426
|
+
* The bytes for the token.
|
|
1427
|
+
*/
|
|
1428
|
+
bytes?: Array<number> | null;
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1060
1431
|
}
|
|
1061
1432
|
/**
|
|
1062
1433
|
* Refusal content within a streamed response part.
|
|
@@ -1304,11 +1675,14 @@ export interface ResponseListResponse {
|
|
|
1304
1675
|
model: string;
|
|
1305
1676
|
output: Array<ResponseListResponse.OpenAIResponseMessageOutput | ResponseListResponse.OpenAIResponseOutputMessageWebSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFileSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFunctionToolCall | ResponseListResponse.OpenAIResponseOutputMessageMcpCall | ResponseListResponse.OpenAIResponseOutputMessageMcpListTools | ResponseListResponse.OpenAIResponseMcpApprovalRequest>;
|
|
1306
1677
|
status: string;
|
|
1678
|
+
store: boolean;
|
|
1679
|
+
completed_at?: number | null;
|
|
1307
1680
|
/**
|
|
1308
1681
|
* Error details for failed OpenAI response requests.
|
|
1309
1682
|
*/
|
|
1310
1683
|
error?: ResponseListResponse.Error | null;
|
|
1311
1684
|
instructions?: string | null;
|
|
1685
|
+
max_output_tokens?: number | null;
|
|
1312
1686
|
max_tool_calls?: number | null;
|
|
1313
1687
|
metadata?: {
|
|
1314
1688
|
[key: string]: string;
|
|
@@ -1320,11 +1694,22 @@ export interface ResponseListResponse {
|
|
|
1320
1694
|
* OpenAI compatible Prompt object that is used in OpenAI responses.
|
|
1321
1695
|
*/
|
|
1322
1696
|
prompt?: ResponseListResponse.Prompt | null;
|
|
1697
|
+
/**
|
|
1698
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
1699
|
+
*
|
|
1700
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
1701
|
+
*/
|
|
1702
|
+
reasoning?: ResponseListResponse.Reasoning | null;
|
|
1703
|
+
safety_identifier?: string | null;
|
|
1323
1704
|
temperature?: number | null;
|
|
1324
1705
|
/**
|
|
1325
1706
|
* Text response configuration for OpenAI responses.
|
|
1326
1707
|
*/
|
|
1327
1708
|
text?: ResponseListResponse.Text;
|
|
1709
|
+
/**
|
|
1710
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
1711
|
+
*/
|
|
1712
|
+
tool_choice?: 'auto' | 'required' | 'none' | ResponseListResponse.OpenAIResponseInputToolChoiceAllowedTools | ResponseListResponse.OpenAIResponseInputToolChoiceFileSearch | ResponseListResponse.OpenAIResponseInputToolChoiceWebSearch | ResponseListResponse.OpenAIResponseInputToolChoiceFunctionTool | ResponseListResponse.OpenAIResponseInputToolChoiceMcpTool | ResponseListResponse.OpenAIResponseInputToolChoiceCustomTool | null;
|
|
1328
1713
|
tools?: Array<ResponseListResponse.OpenAIResponseInputToolWebSearch | ResponseListResponse.OpenAIResponseInputToolFileSearch | ResponseListResponse.OpenAIResponseInputToolFunction | ResponseListResponse.OpenAIResponseToolMcp> | null;
|
|
1329
1714
|
top_p?: number | null;
|
|
1330
1715
|
truncation?: string | null;
|
|
@@ -1340,7 +1725,7 @@ export declare namespace ResponseListResponse {
|
|
|
1340
1725
|
* and there is no way to tell them apart in certain scenarios.
|
|
1341
1726
|
*/
|
|
1342
1727
|
interface OpenAIResponseMessageOutput {
|
|
1343
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
1728
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
1344
1729
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
1345
1730
|
id?: string | null;
|
|
1346
1731
|
status?: string | null;
|
|
@@ -1373,12 +1758,13 @@ export declare namespace ResponseListResponse {
|
|
|
1373
1758
|
filename?: string | null;
|
|
1374
1759
|
type?: 'input_file';
|
|
1375
1760
|
}
|
|
1376
|
-
interface
|
|
1761
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1377
1762
|
text: string;
|
|
1378
|
-
annotations?: Array<
|
|
1763
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
1764
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
1379
1765
|
type?: 'output_text';
|
|
1380
1766
|
}
|
|
1381
|
-
namespace
|
|
1767
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1382
1768
|
/**
|
|
1383
1769
|
* File citation annotation for referencing specific files in response content.
|
|
1384
1770
|
*/
|
|
@@ -1411,6 +1797,48 @@ export declare namespace ResponseListResponse {
|
|
|
1411
1797
|
index: number;
|
|
1412
1798
|
type?: 'file_path';
|
|
1413
1799
|
}
|
|
1800
|
+
/**
|
|
1801
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1802
|
+
* response.
|
|
1803
|
+
*/
|
|
1804
|
+
interface Logprob {
|
|
1805
|
+
/**
|
|
1806
|
+
* The token.
|
|
1807
|
+
*/
|
|
1808
|
+
token: string;
|
|
1809
|
+
/**
|
|
1810
|
+
* The log probability of the token.
|
|
1811
|
+
*/
|
|
1812
|
+
logprob: number;
|
|
1813
|
+
/**
|
|
1814
|
+
* The bytes for the token.
|
|
1815
|
+
*/
|
|
1816
|
+
bytes?: Array<number> | null;
|
|
1817
|
+
/**
|
|
1818
|
+
* The top log probabilities for the token.
|
|
1819
|
+
*/
|
|
1820
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1821
|
+
}
|
|
1822
|
+
namespace Logprob {
|
|
1823
|
+
/**
|
|
1824
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1825
|
+
* response.
|
|
1826
|
+
*/
|
|
1827
|
+
interface TopLogprob {
|
|
1828
|
+
/**
|
|
1829
|
+
* The token.
|
|
1830
|
+
*/
|
|
1831
|
+
token: string;
|
|
1832
|
+
/**
|
|
1833
|
+
* The log probability of the token.
|
|
1834
|
+
*/
|
|
1835
|
+
logprob: number;
|
|
1836
|
+
/**
|
|
1837
|
+
* The bytes for the token.
|
|
1838
|
+
*/
|
|
1839
|
+
bytes?: Array<number> | null;
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1414
1842
|
}
|
|
1415
1843
|
/**
|
|
1416
1844
|
* Refusal content within a streamed response part.
|
|
@@ -1533,7 +1961,7 @@ export declare namespace ResponseListResponse {
|
|
|
1533
1961
|
* and there is no way to tell them apart in certain scenarios.
|
|
1534
1962
|
*/
|
|
1535
1963
|
interface OpenAIResponseMessageOutput {
|
|
1536
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
1964
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
1537
1965
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
1538
1966
|
id?: string | null;
|
|
1539
1967
|
status?: string | null;
|
|
@@ -1566,12 +1994,13 @@ export declare namespace ResponseListResponse {
|
|
|
1566
1994
|
filename?: string | null;
|
|
1567
1995
|
type?: 'input_file';
|
|
1568
1996
|
}
|
|
1569
|
-
interface
|
|
1997
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1570
1998
|
text: string;
|
|
1571
|
-
annotations?: Array<
|
|
1999
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
2000
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
1572
2001
|
type?: 'output_text';
|
|
1573
2002
|
}
|
|
1574
|
-
namespace
|
|
2003
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1575
2004
|
/**
|
|
1576
2005
|
* File citation annotation for referencing specific files in response content.
|
|
1577
2006
|
*/
|
|
@@ -1604,6 +2033,48 @@ export declare namespace ResponseListResponse {
|
|
|
1604
2033
|
index: number;
|
|
1605
2034
|
type?: 'file_path';
|
|
1606
2035
|
}
|
|
2036
|
+
/**
|
|
2037
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
2038
|
+
* response.
|
|
2039
|
+
*/
|
|
2040
|
+
interface Logprob {
|
|
2041
|
+
/**
|
|
2042
|
+
* The token.
|
|
2043
|
+
*/
|
|
2044
|
+
token: string;
|
|
2045
|
+
/**
|
|
2046
|
+
* The log probability of the token.
|
|
2047
|
+
*/
|
|
2048
|
+
logprob: number;
|
|
2049
|
+
/**
|
|
2050
|
+
* The bytes for the token.
|
|
2051
|
+
*/
|
|
2052
|
+
bytes?: Array<number> | null;
|
|
2053
|
+
/**
|
|
2054
|
+
* The top log probabilities for the token.
|
|
2055
|
+
*/
|
|
2056
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
2057
|
+
}
|
|
2058
|
+
namespace Logprob {
|
|
2059
|
+
/**
|
|
2060
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
2061
|
+
* response.
|
|
2062
|
+
*/
|
|
2063
|
+
interface TopLogprob {
|
|
2064
|
+
/**
|
|
2065
|
+
* The token.
|
|
2066
|
+
*/
|
|
2067
|
+
token: string;
|
|
2068
|
+
/**
|
|
2069
|
+
* The log probability of the token.
|
|
2070
|
+
*/
|
|
2071
|
+
logprob: number;
|
|
2072
|
+
/**
|
|
2073
|
+
* The bytes for the token.
|
|
2074
|
+
*/
|
|
2075
|
+
bytes?: Array<number> | null;
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
1607
2078
|
}
|
|
1608
2079
|
/**
|
|
1609
2080
|
* Refusal content within a streamed response part.
|
|
@@ -1619,7 +2090,7 @@ export declare namespace ResponseListResponse {
|
|
|
1619
2090
|
* and there is no way to tell them apart in certain scenarios.
|
|
1620
2091
|
*/
|
|
1621
2092
|
interface OpenAIResponseMessageOutput {
|
|
1622
|
-
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.
|
|
2093
|
+
content: string | Array<OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput | OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal>;
|
|
1623
2094
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
1624
2095
|
id?: string | null;
|
|
1625
2096
|
status?: string | null;
|
|
@@ -1652,12 +2123,13 @@ export declare namespace ResponseListResponse {
|
|
|
1652
2123
|
filename?: string | null;
|
|
1653
2124
|
type?: 'input_file';
|
|
1654
2125
|
}
|
|
1655
|
-
interface
|
|
2126
|
+
interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1656
2127
|
text: string;
|
|
1657
|
-
annotations?: Array<
|
|
2128
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath>;
|
|
2129
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
1658
2130
|
type?: 'output_text';
|
|
1659
2131
|
}
|
|
1660
|
-
namespace
|
|
2132
|
+
namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
1661
2133
|
/**
|
|
1662
2134
|
* File citation annotation for referencing specific files in response content.
|
|
1663
2135
|
*/
|
|
@@ -1690,6 +2162,48 @@ export declare namespace ResponseListResponse {
|
|
|
1690
2162
|
index: number;
|
|
1691
2163
|
type?: 'file_path';
|
|
1692
2164
|
}
|
|
2165
|
+
/**
|
|
2166
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
2167
|
+
* response.
|
|
2168
|
+
*/
|
|
2169
|
+
interface Logprob {
|
|
2170
|
+
/**
|
|
2171
|
+
* The token.
|
|
2172
|
+
*/
|
|
2173
|
+
token: string;
|
|
2174
|
+
/**
|
|
2175
|
+
* The log probability of the token.
|
|
2176
|
+
*/
|
|
2177
|
+
logprob: number;
|
|
2178
|
+
/**
|
|
2179
|
+
* The bytes for the token.
|
|
2180
|
+
*/
|
|
2181
|
+
bytes?: Array<number> | null;
|
|
2182
|
+
/**
|
|
2183
|
+
* The top log probabilities for the token.
|
|
2184
|
+
*/
|
|
2185
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
2186
|
+
}
|
|
2187
|
+
namespace Logprob {
|
|
2188
|
+
/**
|
|
2189
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
2190
|
+
* response.
|
|
2191
|
+
*/
|
|
2192
|
+
interface TopLogprob {
|
|
2193
|
+
/**
|
|
2194
|
+
* The token.
|
|
2195
|
+
*/
|
|
2196
|
+
token: string;
|
|
2197
|
+
/**
|
|
2198
|
+
* The log probability of the token.
|
|
2199
|
+
*/
|
|
2200
|
+
logprob: number;
|
|
2201
|
+
/**
|
|
2202
|
+
* The bytes for the token.
|
|
2203
|
+
*/
|
|
2204
|
+
bytes?: Array<number> | null;
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
1693
2207
|
}
|
|
1694
2208
|
/**
|
|
1695
2209
|
* Refusal content within a streamed response part.
|
|
@@ -1830,6 +2344,14 @@ export declare namespace ResponseListResponse {
|
|
|
1830
2344
|
type?: 'input_file';
|
|
1831
2345
|
}
|
|
1832
2346
|
}
|
|
2347
|
+
/**
|
|
2348
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
2349
|
+
*
|
|
2350
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
2351
|
+
*/
|
|
2352
|
+
interface Reasoning {
|
|
2353
|
+
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
|
|
2354
|
+
}
|
|
1833
2355
|
/**
|
|
1834
2356
|
* Text response configuration for OpenAI responses.
|
|
1835
2357
|
*/
|
|
@@ -1853,6 +2375,50 @@ export declare namespace ResponseListResponse {
|
|
|
1853
2375
|
type?: 'text' | 'json_schema' | 'json_object';
|
|
1854
2376
|
}
|
|
1855
2377
|
}
|
|
2378
|
+
/**
|
|
2379
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
2380
|
+
*/
|
|
2381
|
+
interface OpenAIResponseInputToolChoiceAllowedTools {
|
|
2382
|
+
tools: Array<{
|
|
2383
|
+
[key: string]: string;
|
|
2384
|
+
}>;
|
|
2385
|
+
mode?: 'auto' | 'required';
|
|
2386
|
+
type?: 'allowed_tools';
|
|
2387
|
+
}
|
|
2388
|
+
/**
|
|
2389
|
+
* Indicates that the model should use file search to generate a response.
|
|
2390
|
+
*/
|
|
2391
|
+
interface OpenAIResponseInputToolChoiceFileSearch {
|
|
2392
|
+
type?: 'file_search';
|
|
2393
|
+
}
|
|
2394
|
+
/**
|
|
2395
|
+
* Indicates that the model should use web search to generate a response
|
|
2396
|
+
*/
|
|
2397
|
+
interface OpenAIResponseInputToolChoiceWebSearch {
|
|
2398
|
+
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
2399
|
+
}
|
|
2400
|
+
/**
|
|
2401
|
+
* Forces the model to call a specific function.
|
|
2402
|
+
*/
|
|
2403
|
+
interface OpenAIResponseInputToolChoiceFunctionTool {
|
|
2404
|
+
name: string;
|
|
2405
|
+
type?: 'function';
|
|
2406
|
+
}
|
|
2407
|
+
/**
|
|
2408
|
+
* Forces the model to call a specific tool on a remote MCP server
|
|
2409
|
+
*/
|
|
2410
|
+
interface OpenAIResponseInputToolChoiceMcpTool {
|
|
2411
|
+
server_label: string;
|
|
2412
|
+
name?: string | null;
|
|
2413
|
+
type?: 'mcp';
|
|
2414
|
+
}
|
|
2415
|
+
/**
|
|
2416
|
+
* Forces the model to call a custom tool.
|
|
2417
|
+
*/
|
|
2418
|
+
interface OpenAIResponseInputToolChoiceCustomTool {
|
|
2419
|
+
name: string;
|
|
2420
|
+
type?: 'custom';
|
|
2421
|
+
}
|
|
1856
2422
|
/**
|
|
1857
2423
|
* Web search tool configuration for OpenAI response inputs.
|
|
1858
2424
|
*/
|
|
@@ -1871,6 +2437,22 @@ export declare namespace ResponseListResponse {
|
|
|
1871
2437
|
max_num_results?: number | null;
|
|
1872
2438
|
/**
|
|
1873
2439
|
* Options for ranking and filtering search results.
|
|
2440
|
+
*
|
|
2441
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
2442
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
2443
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
2444
|
+
*
|
|
2445
|
+
* Examples: # Weighted ranker with custom alpha
|
|
2446
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
2447
|
+
*
|
|
2448
|
+
* # RRF ranker with custom impact factor
|
|
2449
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
2450
|
+
*
|
|
2451
|
+
* # Use config defaults (just specify ranker type)
|
|
2452
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
2453
|
+
*
|
|
2454
|
+
* # Score threshold filtering
|
|
2455
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
1874
2456
|
*/
|
|
1875
2457
|
ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
|
|
1876
2458
|
type?: 'file_search';
|
|
@@ -1878,10 +2460,45 @@ export declare namespace ResponseListResponse {
|
|
|
1878
2460
|
namespace OpenAIResponseInputToolFileSearch {
|
|
1879
2461
|
/**
|
|
1880
2462
|
* Options for ranking and filtering search results.
|
|
2463
|
+
*
|
|
2464
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
2465
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
2466
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
2467
|
+
*
|
|
2468
|
+
* Examples: # Weighted ranker with custom alpha
|
|
2469
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
2470
|
+
*
|
|
2471
|
+
* # RRF ranker with custom impact factor
|
|
2472
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
2473
|
+
*
|
|
2474
|
+
* # Use config defaults (just specify ranker type)
|
|
2475
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
2476
|
+
*
|
|
2477
|
+
* # Score threshold filtering
|
|
2478
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
1881
2479
|
*/
|
|
1882
2480
|
interface RankingOptions {
|
|
2481
|
+
/**
|
|
2482
|
+
* Weight factor for weighted ranker
|
|
2483
|
+
*/
|
|
2484
|
+
alpha?: number | null;
|
|
2485
|
+
/**
|
|
2486
|
+
* Impact factor for RRF algorithm
|
|
2487
|
+
*/
|
|
2488
|
+
impact_factor?: number | null;
|
|
2489
|
+
/**
|
|
2490
|
+
* Model identifier for neural reranker
|
|
2491
|
+
*/
|
|
2492
|
+
model?: string | null;
|
|
1883
2493
|
ranker?: string | null;
|
|
1884
2494
|
score_threshold?: number | null;
|
|
2495
|
+
/**
|
|
2496
|
+
* Weights for combining vector, keyword, and neural scores. Keys: 'vector',
|
|
2497
|
+
* 'keyword', 'neural'
|
|
2498
|
+
*/
|
|
2499
|
+
weights?: {
|
|
2500
|
+
[key: string]: number;
|
|
2501
|
+
} | null;
|
|
1885
2502
|
}
|
|
1886
2503
|
}
|
|
1887
2504
|
/**
|
|
@@ -1920,29 +2537,29 @@ export declare namespace ResponseListResponse {
|
|
|
1920
2537
|
*/
|
|
1921
2538
|
interface Usage {
|
|
1922
2539
|
input_tokens: number;
|
|
1923
|
-
output_tokens: number;
|
|
1924
|
-
total_tokens: number;
|
|
1925
2540
|
/**
|
|
1926
2541
|
* Token details for input tokens in OpenAI response usage.
|
|
1927
2542
|
*/
|
|
1928
|
-
input_tokens_details
|
|
2543
|
+
input_tokens_details: Usage.InputTokensDetails;
|
|
2544
|
+
output_tokens: number;
|
|
1929
2545
|
/**
|
|
1930
2546
|
* Token details for output tokens in OpenAI response usage.
|
|
1931
2547
|
*/
|
|
1932
|
-
output_tokens_details
|
|
2548
|
+
output_tokens_details: Usage.OutputTokensDetails;
|
|
2549
|
+
total_tokens: number;
|
|
1933
2550
|
}
|
|
1934
2551
|
namespace Usage {
|
|
1935
2552
|
/**
|
|
1936
2553
|
* Token details for input tokens in OpenAI response usage.
|
|
1937
2554
|
*/
|
|
1938
2555
|
interface InputTokensDetails {
|
|
1939
|
-
cached_tokens
|
|
2556
|
+
cached_tokens: number;
|
|
1940
2557
|
}
|
|
1941
2558
|
/**
|
|
1942
2559
|
* Token details for output tokens in OpenAI response usage.
|
|
1943
2560
|
*/
|
|
1944
2561
|
interface OutputTokensDetails {
|
|
1945
|
-
reasoning_tokens
|
|
2562
|
+
reasoning_tokens: number;
|
|
1946
2563
|
}
|
|
1947
2564
|
}
|
|
1948
2565
|
}
|
|
@@ -1956,29 +2573,93 @@ export interface ResponseDeleteResponse {
|
|
|
1956
2573
|
}
|
|
1957
2574
|
export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCreateParamsStreaming;
|
|
1958
2575
|
export interface ResponseCreateParamsBase {
|
|
1959
|
-
|
|
2576
|
+
/**
|
|
2577
|
+
* Input message(s) to create the response.
|
|
2578
|
+
*/
|
|
2579
|
+
input: string | Array<ResponseCreateParams.OpenAIResponseMessageInput | ResponseCreateParams.OpenAIResponseOutputMessageWebSearchToolCall | ResponseCreateParams.OpenAIResponseOutputMessageFileSearchToolCall | ResponseCreateParams.OpenAIResponseOutputMessageFunctionToolCall | ResponseCreateParams.OpenAIResponseOutputMessageMcpCall | ResponseCreateParams.OpenAIResponseOutputMessageMcpListTools | ResponseCreateParams.OpenAIResponseMcpApprovalRequest | ResponseCreateParams.OpenAIResponseInputFunctionToolCallOutput | ResponseCreateParams.OpenAIResponseMcpApprovalResponse>;
|
|
2580
|
+
/**
|
|
2581
|
+
* The underlying LLM used for completions.
|
|
2582
|
+
*/
|
|
1960
2583
|
model: string;
|
|
2584
|
+
/**
|
|
2585
|
+
* Optional ID of a conversation to add the response to.
|
|
2586
|
+
*/
|
|
1961
2587
|
conversation?: string | null;
|
|
1962
|
-
|
|
2588
|
+
/**
|
|
2589
|
+
* List of guardrails to apply during response generation.
|
|
2590
|
+
*/
|
|
2591
|
+
guardrails?: Array<string | ResponseCreateParams.ResponseGuardrailSpec> | null;
|
|
2592
|
+
/**
|
|
2593
|
+
* Additional fields to include in the response.
|
|
2594
|
+
*/
|
|
2595
|
+
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;
|
|
2596
|
+
/**
|
|
2597
|
+
* Instructions to guide the model's behavior.
|
|
2598
|
+
*/
|
|
1963
2599
|
instructions?: string | null;
|
|
2600
|
+
/**
|
|
2601
|
+
* Maximum number of inference iterations.
|
|
2602
|
+
*/
|
|
1964
2603
|
max_infer_iters?: number | null;
|
|
2604
|
+
/**
|
|
2605
|
+
* Upper bound for the number of tokens that can be generated for a response.
|
|
2606
|
+
*/
|
|
2607
|
+
max_output_tokens?: number | null;
|
|
2608
|
+
/**
|
|
2609
|
+
* Max number of total calls to built-in tools that can be processed in a response.
|
|
2610
|
+
*/
|
|
1965
2611
|
max_tool_calls?: number | null;
|
|
2612
|
+
/**
|
|
2613
|
+
* Dictionary of metadata key-value pairs to attach to the response.
|
|
2614
|
+
*/
|
|
1966
2615
|
metadata?: {
|
|
1967
2616
|
[key: string]: string;
|
|
1968
2617
|
} | null;
|
|
2618
|
+
/**
|
|
2619
|
+
* Whether to enable parallel tool calls.
|
|
2620
|
+
*/
|
|
1969
2621
|
parallel_tool_calls?: boolean | null;
|
|
2622
|
+
/**
|
|
2623
|
+
* Optional ID of a previous response to continue from.
|
|
2624
|
+
*/
|
|
1970
2625
|
previous_response_id?: string | null;
|
|
1971
2626
|
/**
|
|
1972
2627
|
* OpenAI compatible Prompt object that is used in OpenAI responses.
|
|
1973
2628
|
*/
|
|
1974
2629
|
prompt?: ResponseCreateParams.Prompt | null;
|
|
2630
|
+
/**
|
|
2631
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
2632
|
+
*
|
|
2633
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
2634
|
+
*/
|
|
2635
|
+
reasoning?: ResponseCreateParams.Reasoning | null;
|
|
2636
|
+
/**
|
|
2637
|
+
* A stable identifier used for safety monitoring and abuse detection.
|
|
2638
|
+
*/
|
|
2639
|
+
safety_identifier?: string | null;
|
|
2640
|
+
/**
|
|
2641
|
+
* Whether to store the response in the database.
|
|
2642
|
+
*/
|
|
1975
2643
|
store?: boolean | null;
|
|
2644
|
+
/**
|
|
2645
|
+
* Whether to stream the response.
|
|
2646
|
+
*/
|
|
1976
2647
|
stream?: boolean | null;
|
|
2648
|
+
/**
|
|
2649
|
+
* Sampling temperature.
|
|
2650
|
+
*/
|
|
1977
2651
|
temperature?: number | null;
|
|
1978
2652
|
/**
|
|
1979
2653
|
* Text response configuration for OpenAI responses.
|
|
1980
2654
|
*/
|
|
1981
2655
|
text?: ResponseCreateParams.Text | null;
|
|
2656
|
+
/**
|
|
2657
|
+
* How the model should select which tool to call (if any).
|
|
2658
|
+
*/
|
|
2659
|
+
tool_choice?: 'auto' | 'required' | 'none' | ResponseCreateParams.OpenAIResponseInputToolChoiceAllowedTools | ResponseCreateParams.OpenAIResponseInputToolChoiceFileSearch | ResponseCreateParams.OpenAIResponseInputToolChoiceWebSearch | ResponseCreateParams.OpenAIResponseInputToolChoiceFunctionTool | ResponseCreateParams.OpenAIResponseInputToolChoiceMcpTool | ResponseCreateParams.OpenAIResponseInputToolChoiceCustomTool | null;
|
|
2660
|
+
/**
|
|
2661
|
+
* List of tools available to the model.
|
|
2662
|
+
*/
|
|
1982
2663
|
tools?: Array<ResponseCreateParams.OpenAIResponseInputToolWebSearch | ResponseCreateParams.OpenAIResponseInputToolFileSearch | ResponseCreateParams.OpenAIResponseInputToolFunction | ResponseCreateParams.OpenAIResponseInputToolMcp> | null;
|
|
1983
2664
|
}
|
|
1984
2665
|
export declare namespace ResponseCreateParams {
|
|
@@ -1988,7 +2669,7 @@ export declare namespace ResponseCreateParams {
|
|
|
1988
2669
|
* and there is no way to tell them apart in certain scenarios.
|
|
1989
2670
|
*/
|
|
1990
2671
|
interface OpenAIResponseMessageInput {
|
|
1991
|
-
content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.
|
|
2672
|
+
content: string | Array<OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage | OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile> | Array<OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput | OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal>;
|
|
1992
2673
|
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
1993
2674
|
id?: string | null;
|
|
1994
2675
|
status?: string | null;
|
|
@@ -2021,12 +2702,13 @@ export declare namespace ResponseCreateParams {
|
|
|
2021
2702
|
filename?: string | null;
|
|
2022
2703
|
type?: 'input_file';
|
|
2023
2704
|
}
|
|
2024
|
-
interface
|
|
2705
|
+
interface OpenAIResponseOutputMessageContentOutputTextInput {
|
|
2025
2706
|
text: string;
|
|
2026
|
-
annotations?: Array<
|
|
2707
|
+
annotations?: Array<OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath>;
|
|
2708
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
|
|
2027
2709
|
type?: 'output_text';
|
|
2028
2710
|
}
|
|
2029
|
-
namespace
|
|
2711
|
+
namespace OpenAIResponseOutputMessageContentOutputTextInput {
|
|
2030
2712
|
/**
|
|
2031
2713
|
* File citation annotation for referencing specific files in response content.
|
|
2032
2714
|
*/
|
|
@@ -2059,6 +2741,48 @@ export declare namespace ResponseCreateParams {
|
|
|
2059
2741
|
index: number;
|
|
2060
2742
|
type?: 'file_path';
|
|
2061
2743
|
}
|
|
2744
|
+
/**
|
|
2745
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
2746
|
+
* response.
|
|
2747
|
+
*/
|
|
2748
|
+
interface Logprob {
|
|
2749
|
+
/**
|
|
2750
|
+
* The token.
|
|
2751
|
+
*/
|
|
2752
|
+
token: string;
|
|
2753
|
+
/**
|
|
2754
|
+
* The log probability of the token.
|
|
2755
|
+
*/
|
|
2756
|
+
logprob: number;
|
|
2757
|
+
/**
|
|
2758
|
+
* The bytes for the token.
|
|
2759
|
+
*/
|
|
2760
|
+
bytes?: Array<number> | null;
|
|
2761
|
+
/**
|
|
2762
|
+
* The top log probabilities for the token.
|
|
2763
|
+
*/
|
|
2764
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
2765
|
+
}
|
|
2766
|
+
namespace Logprob {
|
|
2767
|
+
/**
|
|
2768
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
2769
|
+
* response.
|
|
2770
|
+
*/
|
|
2771
|
+
interface TopLogprob {
|
|
2772
|
+
/**
|
|
2773
|
+
* The token.
|
|
2774
|
+
*/
|
|
2775
|
+
token: string;
|
|
2776
|
+
/**
|
|
2777
|
+
* The log probability of the token.
|
|
2778
|
+
*/
|
|
2779
|
+
logprob: number;
|
|
2780
|
+
/**
|
|
2781
|
+
* The bytes for the token.
|
|
2782
|
+
*/
|
|
2783
|
+
bytes?: Array<number> | null;
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2062
2786
|
}
|
|
2063
2787
|
/**
|
|
2064
2788
|
* Refusal content within a streamed response part.
|
|
@@ -2176,90 +2900,10 @@ export declare namespace ResponseCreateParams {
|
|
|
2176
2900
|
type?: 'mcp_approval_response';
|
|
2177
2901
|
}
|
|
2178
2902
|
/**
|
|
2179
|
-
*
|
|
2180
|
-
* under one type because the Responses API gives them all the same "type" value,
|
|
2181
|
-
* and there is no way to tell them apart in certain scenarios.
|
|
2903
|
+
* Specification for a guardrail to apply during response generation.
|
|
2182
2904
|
*/
|
|
2183
|
-
interface
|
|
2184
|
-
|
|
2185
|
-
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
2186
|
-
id?: string | null;
|
|
2187
|
-
status?: string | null;
|
|
2188
|
-
type?: 'message';
|
|
2189
|
-
}
|
|
2190
|
-
namespace OpenAIResponseMessageInput {
|
|
2191
|
-
/**
|
|
2192
|
-
* Text content for input messages in OpenAI response format.
|
|
2193
|
-
*/
|
|
2194
|
-
interface OpenAIResponseInputMessageContentText {
|
|
2195
|
-
text: string;
|
|
2196
|
-
type?: 'input_text';
|
|
2197
|
-
}
|
|
2198
|
-
/**
|
|
2199
|
-
* Image content for input messages in OpenAI response format.
|
|
2200
|
-
*/
|
|
2201
|
-
interface OpenAIResponseInputMessageContentImage {
|
|
2202
|
-
detail?: 'low' | 'high' | 'auto';
|
|
2203
|
-
file_id?: string | null;
|
|
2204
|
-
image_url?: string | null;
|
|
2205
|
-
type?: 'input_image';
|
|
2206
|
-
}
|
|
2207
|
-
/**
|
|
2208
|
-
* File content for input messages in OpenAI response format.
|
|
2209
|
-
*/
|
|
2210
|
-
interface OpenAIResponseInputMessageContentFile {
|
|
2211
|
-
file_data?: string | null;
|
|
2212
|
-
file_id?: string | null;
|
|
2213
|
-
file_url?: string | null;
|
|
2214
|
-
filename?: string | null;
|
|
2215
|
-
type?: 'input_file';
|
|
2216
|
-
}
|
|
2217
|
-
interface OpenAIResponseOutputMessageContentOutputText {
|
|
2218
|
-
text: string;
|
|
2219
|
-
annotations?: Array<OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation | OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath>;
|
|
2220
|
-
type?: 'output_text';
|
|
2221
|
-
}
|
|
2222
|
-
namespace OpenAIResponseOutputMessageContentOutputText {
|
|
2223
|
-
/**
|
|
2224
|
-
* File citation annotation for referencing specific files in response content.
|
|
2225
|
-
*/
|
|
2226
|
-
interface OpenAIResponseAnnotationFileCitation {
|
|
2227
|
-
file_id: string;
|
|
2228
|
-
filename: string;
|
|
2229
|
-
index: number;
|
|
2230
|
-
type?: 'file_citation';
|
|
2231
|
-
}
|
|
2232
|
-
/**
|
|
2233
|
-
* URL citation annotation for referencing external web resources.
|
|
2234
|
-
*/
|
|
2235
|
-
interface OpenAIResponseAnnotationCitation {
|
|
2236
|
-
end_index: number;
|
|
2237
|
-
start_index: number;
|
|
2238
|
-
title: string;
|
|
2239
|
-
url: string;
|
|
2240
|
-
type?: 'url_citation';
|
|
2241
|
-
}
|
|
2242
|
-
interface OpenAIResponseAnnotationContainerFileCitation {
|
|
2243
|
-
container_id: string;
|
|
2244
|
-
end_index: number;
|
|
2245
|
-
file_id: string;
|
|
2246
|
-
filename: string;
|
|
2247
|
-
start_index: number;
|
|
2248
|
-
type?: 'container_file_citation';
|
|
2249
|
-
}
|
|
2250
|
-
interface OpenAIResponseAnnotationFilePath {
|
|
2251
|
-
file_id: string;
|
|
2252
|
-
index: number;
|
|
2253
|
-
type?: 'file_path';
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
/**
|
|
2257
|
-
* Refusal content within a streamed response part.
|
|
2258
|
-
*/
|
|
2259
|
-
interface OpenAIResponseContentPartRefusal {
|
|
2260
|
-
refusal: string;
|
|
2261
|
-
type?: 'refusal';
|
|
2262
|
-
}
|
|
2905
|
+
interface ResponseGuardrailSpec {
|
|
2906
|
+
type: string;
|
|
2263
2907
|
}
|
|
2264
2908
|
/**
|
|
2265
2909
|
* OpenAI compatible Prompt object that is used in OpenAI responses.
|
|
@@ -2299,6 +2943,14 @@ export declare namespace ResponseCreateParams {
|
|
|
2299
2943
|
type?: 'input_file';
|
|
2300
2944
|
}
|
|
2301
2945
|
}
|
|
2946
|
+
/**
|
|
2947
|
+
* Configuration for reasoning effort in OpenAI responses.
|
|
2948
|
+
*
|
|
2949
|
+
* Controls how much reasoning the model performs before generating a response.
|
|
2950
|
+
*/
|
|
2951
|
+
interface Reasoning {
|
|
2952
|
+
effort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | null;
|
|
2953
|
+
}
|
|
2302
2954
|
/**
|
|
2303
2955
|
* Text response configuration for OpenAI responses.
|
|
2304
2956
|
*/
|
|
@@ -2322,6 +2974,50 @@ export declare namespace ResponseCreateParams {
|
|
|
2322
2974
|
type?: 'text' | 'json_schema' | 'json_object';
|
|
2323
2975
|
}
|
|
2324
2976
|
}
|
|
2977
|
+
/**
|
|
2978
|
+
* Constrains the tools available to the model to a pre-defined set.
|
|
2979
|
+
*/
|
|
2980
|
+
interface OpenAIResponseInputToolChoiceAllowedTools {
|
|
2981
|
+
tools: Array<{
|
|
2982
|
+
[key: string]: string;
|
|
2983
|
+
}>;
|
|
2984
|
+
mode?: 'auto' | 'required';
|
|
2985
|
+
type?: 'allowed_tools';
|
|
2986
|
+
}
|
|
2987
|
+
/**
|
|
2988
|
+
* Indicates that the model should use file search to generate a response.
|
|
2989
|
+
*/
|
|
2990
|
+
interface OpenAIResponseInputToolChoiceFileSearch {
|
|
2991
|
+
type?: 'file_search';
|
|
2992
|
+
}
|
|
2993
|
+
/**
|
|
2994
|
+
* Indicates that the model should use web search to generate a response
|
|
2995
|
+
*/
|
|
2996
|
+
interface OpenAIResponseInputToolChoiceWebSearch {
|
|
2997
|
+
type?: 'web_search' | 'web_search_preview' | 'web_search_preview_2025_03_11' | 'web_search_2025_08_26';
|
|
2998
|
+
}
|
|
2999
|
+
/**
|
|
3000
|
+
* Forces the model to call a specific function.
|
|
3001
|
+
*/
|
|
3002
|
+
interface OpenAIResponseInputToolChoiceFunctionTool {
|
|
3003
|
+
name: string;
|
|
3004
|
+
type?: 'function';
|
|
3005
|
+
}
|
|
3006
|
+
/**
|
|
3007
|
+
* Forces the model to call a specific tool on a remote MCP server
|
|
3008
|
+
*/
|
|
3009
|
+
interface OpenAIResponseInputToolChoiceMcpTool {
|
|
3010
|
+
server_label: string;
|
|
3011
|
+
name?: string | null;
|
|
3012
|
+
type?: 'mcp';
|
|
3013
|
+
}
|
|
3014
|
+
/**
|
|
3015
|
+
* Forces the model to call a custom tool.
|
|
3016
|
+
*/
|
|
3017
|
+
interface OpenAIResponseInputToolChoiceCustomTool {
|
|
3018
|
+
name: string;
|
|
3019
|
+
type?: 'custom';
|
|
3020
|
+
}
|
|
2325
3021
|
/**
|
|
2326
3022
|
* Web search tool configuration for OpenAI response inputs.
|
|
2327
3023
|
*/
|
|
@@ -2340,6 +3036,22 @@ export declare namespace ResponseCreateParams {
|
|
|
2340
3036
|
max_num_results?: number | null;
|
|
2341
3037
|
/**
|
|
2342
3038
|
* Options for ranking and filtering search results.
|
|
3039
|
+
*
|
|
3040
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
3041
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
3042
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
3043
|
+
*
|
|
3044
|
+
* Examples: # Weighted ranker with custom alpha
|
|
3045
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
3046
|
+
*
|
|
3047
|
+
* # RRF ranker with custom impact factor
|
|
3048
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
3049
|
+
*
|
|
3050
|
+
* # Use config defaults (just specify ranker type)
|
|
3051
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
3052
|
+
*
|
|
3053
|
+
* # Score threshold filtering
|
|
3054
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
2343
3055
|
*/
|
|
2344
3056
|
ranking_options?: OpenAIResponseInputToolFileSearch.RankingOptions | null;
|
|
2345
3057
|
type?: 'file_search';
|
|
@@ -2347,10 +3059,45 @@ export declare namespace ResponseCreateParams {
|
|
|
2347
3059
|
namespace OpenAIResponseInputToolFileSearch {
|
|
2348
3060
|
/**
|
|
2349
3061
|
* Options for ranking and filtering search results.
|
|
3062
|
+
*
|
|
3063
|
+
* This class configures how search results are ranked and filtered. You can use
|
|
3064
|
+
* algorithm-based rerankers (weighted, RRF) or neural rerankers. Defaults from
|
|
3065
|
+
* VectorStoresConfig are used when parameters are not provided.
|
|
3066
|
+
*
|
|
3067
|
+
* Examples: # Weighted ranker with custom alpha
|
|
3068
|
+
* SearchRankingOptions(ranker="weighted", alpha=0.7)
|
|
3069
|
+
*
|
|
3070
|
+
* # RRF ranker with custom impact factor
|
|
3071
|
+
* SearchRankingOptions(ranker="rrf", impact_factor=50.0)
|
|
3072
|
+
*
|
|
3073
|
+
* # Use config defaults (just specify ranker type)
|
|
3074
|
+
* SearchRankingOptions(ranker="weighted") # Uses alpha from VectorStoresConfig
|
|
3075
|
+
*
|
|
3076
|
+
* # Score threshold filtering
|
|
3077
|
+
* SearchRankingOptions(ranker="weighted", score_threshold=0.5)
|
|
2350
3078
|
*/
|
|
2351
3079
|
interface RankingOptions {
|
|
3080
|
+
/**
|
|
3081
|
+
* Weight factor for weighted ranker
|
|
3082
|
+
*/
|
|
3083
|
+
alpha?: number | null;
|
|
3084
|
+
/**
|
|
3085
|
+
* Impact factor for RRF algorithm
|
|
3086
|
+
*/
|
|
3087
|
+
impact_factor?: number | null;
|
|
3088
|
+
/**
|
|
3089
|
+
* Model identifier for neural reranker
|
|
3090
|
+
*/
|
|
3091
|
+
model?: string | null;
|
|
2352
3092
|
ranker?: string | null;
|
|
2353
3093
|
score_threshold?: number | null;
|
|
3094
|
+
/**
|
|
3095
|
+
* Weights for combining vector, keyword, and neural scores. Keys: 'vector',
|
|
3096
|
+
* 'keyword', 'neural'
|
|
3097
|
+
*/
|
|
3098
|
+
weights?: {
|
|
3099
|
+
[key: string]: number;
|
|
3100
|
+
} | null;
|
|
2354
3101
|
}
|
|
2355
3102
|
}
|
|
2356
3103
|
/**
|
|
@@ -2370,12 +3117,12 @@ export declare namespace ResponseCreateParams {
|
|
|
2370
3117
|
*/
|
|
2371
3118
|
interface OpenAIResponseInputToolMcp {
|
|
2372
3119
|
server_label: string;
|
|
2373
|
-
server_url: string;
|
|
2374
3120
|
/**
|
|
2375
3121
|
* Filter configuration for restricting which MCP tools can be used.
|
|
2376
3122
|
*/
|
|
2377
3123
|
allowed_tools?: Array<string> | OpenAIResponseInputToolMcp.AllowedToolsFilter | null;
|
|
2378
3124
|
authorization?: string | null;
|
|
3125
|
+
connector_id?: string | null;
|
|
2379
3126
|
headers?: {
|
|
2380
3127
|
[key: string]: unknown;
|
|
2381
3128
|
} | null;
|
|
@@ -2383,6 +3130,7 @@ export declare namespace ResponseCreateParams {
|
|
|
2383
3130
|
* Filter configuration for MCP tool approval requirements.
|
|
2384
3131
|
*/
|
|
2385
3132
|
require_approval?: 'always' | 'never' | OpenAIResponseInputToolMcp.ApprovalFilter;
|
|
3133
|
+
server_url?: string | null;
|
|
2386
3134
|
type?: 'mcp';
|
|
2387
3135
|
}
|
|
2388
3136
|
namespace OpenAIResponseInputToolMcp {
|
|
@@ -2404,12 +3152,21 @@ export declare namespace ResponseCreateParams {
|
|
|
2404
3152
|
type ResponseCreateParamsStreaming = ResponsesAPI.ResponseCreateParamsStreaming;
|
|
2405
3153
|
}
|
|
2406
3154
|
export interface ResponseCreateParamsNonStreaming extends ResponseCreateParamsBase {
|
|
3155
|
+
/**
|
|
3156
|
+
* Whether to stream the response.
|
|
3157
|
+
*/
|
|
2407
3158
|
stream?: false | null;
|
|
2408
3159
|
}
|
|
2409
3160
|
export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase {
|
|
3161
|
+
/**
|
|
3162
|
+
* Whether to stream the response.
|
|
3163
|
+
*/
|
|
2410
3164
|
stream: true;
|
|
2411
3165
|
}
|
|
2412
3166
|
export interface ResponseListParams extends OpenAICursorPageParams {
|
|
3167
|
+
/**
|
|
3168
|
+
* The model to filter responses by.
|
|
3169
|
+
*/
|
|
2413
3170
|
model?: string | null;
|
|
2414
3171
|
/**
|
|
2415
3172
|
* Sort order for paginated responses.
|