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
|
@@ -13,8 +13,6 @@ import { OpenAICursorPage, type OpenAICursorPageParams } from '../../pagination'
|
|
|
13
13
|
|
|
14
14
|
export class Items extends APIResource {
|
|
15
15
|
/**
|
|
16
|
-
* Create items.
|
|
17
|
-
*
|
|
18
16
|
* Create items in the conversation.
|
|
19
17
|
*/
|
|
20
18
|
create(
|
|
@@ -26,8 +24,6 @@ export class Items extends APIResource {
|
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
/**
|
|
29
|
-
* List items.
|
|
30
|
-
*
|
|
31
27
|
* List items in the conversation.
|
|
32
28
|
*/
|
|
33
29
|
list(
|
|
@@ -55,8 +51,6 @@ export class Items extends APIResource {
|
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
/**
|
|
58
|
-
* Delete an item.
|
|
59
|
-
*
|
|
60
54
|
* Delete a conversation item.
|
|
61
55
|
*/
|
|
62
56
|
delete(
|
|
@@ -68,8 +62,6 @@ export class Items extends APIResource {
|
|
|
68
62
|
}
|
|
69
63
|
|
|
70
64
|
/**
|
|
71
|
-
* Retrieve an item.
|
|
72
|
-
*
|
|
73
65
|
* Retrieve a conversation item.
|
|
74
66
|
*/
|
|
75
67
|
get(
|
|
@@ -138,7 +130,7 @@ export namespace ItemCreateResponse {
|
|
|
138
130
|
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
|
|
139
131
|
>
|
|
140
132
|
| Array<
|
|
141
|
-
| OpenAIResponseMessageOutput.
|
|
133
|
+
| OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
|
|
142
134
|
| OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
|
|
143
135
|
>;
|
|
144
136
|
|
|
@@ -189,20 +181,22 @@ export namespace ItemCreateResponse {
|
|
|
189
181
|
type?: 'input_file';
|
|
190
182
|
}
|
|
191
183
|
|
|
192
|
-
export interface
|
|
184
|
+
export interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
193
185
|
text: string;
|
|
194
186
|
|
|
195
187
|
annotations?: Array<
|
|
196
|
-
|
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
188
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
|
|
189
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
|
|
190
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
|
|
191
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
|
|
200
192
|
>;
|
|
201
193
|
|
|
194
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
195
|
+
|
|
202
196
|
type?: 'output_text';
|
|
203
197
|
}
|
|
204
198
|
|
|
205
|
-
export namespace
|
|
199
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
206
200
|
/**
|
|
207
201
|
* File citation annotation for referencing specific files in response content.
|
|
208
202
|
*/
|
|
@@ -252,6 +246,55 @@ export namespace ItemCreateResponse {
|
|
|
252
246
|
|
|
253
247
|
type?: 'file_path';
|
|
254
248
|
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
252
|
+
* response.
|
|
253
|
+
*/
|
|
254
|
+
export interface Logprob {
|
|
255
|
+
/**
|
|
256
|
+
* The token.
|
|
257
|
+
*/
|
|
258
|
+
token: string;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* The log probability of the token.
|
|
262
|
+
*/
|
|
263
|
+
logprob: number;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The bytes for the token.
|
|
267
|
+
*/
|
|
268
|
+
bytes?: Array<number> | null;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* The top log probabilities for the token.
|
|
272
|
+
*/
|
|
273
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export namespace Logprob {
|
|
277
|
+
/**
|
|
278
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
279
|
+
* response.
|
|
280
|
+
*/
|
|
281
|
+
export interface TopLogprob {
|
|
282
|
+
/**
|
|
283
|
+
* The token.
|
|
284
|
+
*/
|
|
285
|
+
token: string;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* The log probability of the token.
|
|
289
|
+
*/
|
|
290
|
+
logprob: number;
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* The bytes for the token.
|
|
294
|
+
*/
|
|
295
|
+
bytes?: Array<number> | null;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
255
298
|
}
|
|
256
299
|
|
|
257
300
|
/**
|
|
@@ -447,7 +490,7 @@ export namespace ItemListResponse {
|
|
|
447
490
|
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
|
|
448
491
|
>
|
|
449
492
|
| Array<
|
|
450
|
-
| OpenAIResponseMessageOutput.
|
|
493
|
+
| OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
|
|
451
494
|
| OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
|
|
452
495
|
>;
|
|
453
496
|
|
|
@@ -498,20 +541,22 @@ export namespace ItemListResponse {
|
|
|
498
541
|
type?: 'input_file';
|
|
499
542
|
}
|
|
500
543
|
|
|
501
|
-
export interface
|
|
544
|
+
export interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
502
545
|
text: string;
|
|
503
546
|
|
|
504
547
|
annotations?: Array<
|
|
505
|
-
|
|
|
506
|
-
|
|
|
507
|
-
|
|
|
508
|
-
|
|
|
548
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
|
|
549
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
|
|
550
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
|
|
551
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
|
|
509
552
|
>;
|
|
510
553
|
|
|
554
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
555
|
+
|
|
511
556
|
type?: 'output_text';
|
|
512
557
|
}
|
|
513
558
|
|
|
514
|
-
export namespace
|
|
559
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
515
560
|
/**
|
|
516
561
|
* File citation annotation for referencing specific files in response content.
|
|
517
562
|
*/
|
|
@@ -561,6 +606,55 @@ export namespace ItemListResponse {
|
|
|
561
606
|
|
|
562
607
|
type?: 'file_path';
|
|
563
608
|
}
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
612
|
+
* response.
|
|
613
|
+
*/
|
|
614
|
+
export interface Logprob {
|
|
615
|
+
/**
|
|
616
|
+
* The token.
|
|
617
|
+
*/
|
|
618
|
+
token: string;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* The log probability of the token.
|
|
622
|
+
*/
|
|
623
|
+
logprob: number;
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* The bytes for the token.
|
|
627
|
+
*/
|
|
628
|
+
bytes?: Array<number> | null;
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* The top log probabilities for the token.
|
|
632
|
+
*/
|
|
633
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
export namespace Logprob {
|
|
637
|
+
/**
|
|
638
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
639
|
+
* response.
|
|
640
|
+
*/
|
|
641
|
+
export interface TopLogprob {
|
|
642
|
+
/**
|
|
643
|
+
* The token.
|
|
644
|
+
*/
|
|
645
|
+
token: string;
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* The log probability of the token.
|
|
649
|
+
*/
|
|
650
|
+
logprob: number;
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* The bytes for the token.
|
|
654
|
+
*/
|
|
655
|
+
bytes?: Array<number> | null;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
564
658
|
}
|
|
565
659
|
|
|
566
660
|
/**
|
|
@@ -750,142 +844,366 @@ export interface ItemDeleteResponse {
|
|
|
750
844
|
* under one type because the Responses API gives them all the same "type" value,
|
|
751
845
|
* and there is no way to tell them apart in certain scenarios.
|
|
752
846
|
*/
|
|
753
|
-
export
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
847
|
+
export type ItemGetResponse =
|
|
848
|
+
| ItemGetResponse.OpenAIResponseMessageOutput
|
|
849
|
+
| ItemGetResponse.OpenAIResponseOutputMessageWebSearchToolCall
|
|
850
|
+
| ItemGetResponse.OpenAIResponseOutputMessageFileSearchToolCall
|
|
851
|
+
| ItemGetResponse.OpenAIResponseOutputMessageFunctionToolCall
|
|
852
|
+
| ItemGetResponse.OpenAIResponseInputFunctionToolCallOutput
|
|
853
|
+
| ItemGetResponse.OpenAIResponseMcpApprovalRequest
|
|
854
|
+
| ItemGetResponse.OpenAIResponseMcpApprovalResponse
|
|
855
|
+
| ItemGetResponse.OpenAIResponseOutputMessageMcpCall
|
|
856
|
+
| ItemGetResponse.OpenAIResponseOutputMessageMcpListTools;
|
|
857
|
+
|
|
858
|
+
export namespace ItemGetResponse {
|
|
859
|
+
/**
|
|
860
|
+
* Corresponds to the various Message types in the Responses API. They are all
|
|
861
|
+
* under one type because the Responses API gives them all the same "type" value,
|
|
862
|
+
* and there is no way to tell them apart in certain scenarios.
|
|
863
|
+
*/
|
|
864
|
+
export interface OpenAIResponseMessageOutput {
|
|
865
|
+
content:
|
|
866
|
+
| string
|
|
867
|
+
| Array<
|
|
868
|
+
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText
|
|
869
|
+
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage
|
|
870
|
+
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
|
|
871
|
+
>
|
|
872
|
+
| Array<
|
|
873
|
+
| OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputTextOutput
|
|
874
|
+
| OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
|
|
875
|
+
>;
|
|
876
|
+
|
|
877
|
+
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
878
|
+
|
|
879
|
+
id?: string | null;
|
|
880
|
+
|
|
881
|
+
status?: string | null;
|
|
882
|
+
|
|
883
|
+
type?: 'message';
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export namespace OpenAIResponseMessageOutput {
|
|
887
|
+
/**
|
|
888
|
+
* Text content for input messages in OpenAI response format.
|
|
889
|
+
*/
|
|
890
|
+
export interface OpenAIResponseInputMessageContentText {
|
|
891
|
+
text: string;
|
|
892
|
+
|
|
893
|
+
type?: 'input_text';
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Image content for input messages in OpenAI response format.
|
|
898
|
+
*/
|
|
899
|
+
export interface OpenAIResponseInputMessageContentImage {
|
|
900
|
+
detail?: 'low' | 'high' | 'auto';
|
|
901
|
+
|
|
902
|
+
file_id?: string | null;
|
|
903
|
+
|
|
904
|
+
image_url?: string | null;
|
|
905
|
+
|
|
906
|
+
type?: 'input_image';
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* File content for input messages in OpenAI response format.
|
|
911
|
+
*/
|
|
912
|
+
export interface OpenAIResponseInputMessageContentFile {
|
|
913
|
+
file_data?: string | null;
|
|
914
|
+
|
|
915
|
+
file_id?: string | null;
|
|
916
|
+
|
|
917
|
+
file_url?: string | null;
|
|
918
|
+
|
|
919
|
+
filename?: string | null;
|
|
920
|
+
|
|
921
|
+
type?: 'input_file';
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
export interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
925
|
+
text: string;
|
|
926
|
+
|
|
927
|
+
annotations?: Array<
|
|
928
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFileCitation
|
|
929
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationCitation
|
|
930
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationContainerFileCitation
|
|
931
|
+
| OpenAIResponseOutputMessageContentOutputTextOutput.OpenAIResponseAnnotationFilePath
|
|
764
932
|
>;
|
|
765
933
|
|
|
766
|
-
|
|
934
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextOutput.Logprob> | null;
|
|
767
935
|
|
|
768
|
-
|
|
936
|
+
type?: 'output_text';
|
|
937
|
+
}
|
|
769
938
|
|
|
770
|
-
|
|
939
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
940
|
+
/**
|
|
941
|
+
* File citation annotation for referencing specific files in response content.
|
|
942
|
+
*/
|
|
943
|
+
export interface OpenAIResponseAnnotationFileCitation {
|
|
944
|
+
file_id: string;
|
|
771
945
|
|
|
772
|
-
|
|
773
|
-
}
|
|
946
|
+
filename: string;
|
|
774
947
|
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
* Text content for input messages in OpenAI response format.
|
|
778
|
-
*/
|
|
779
|
-
export interface OpenAIResponseInputMessageContentText {
|
|
780
|
-
text: string;
|
|
948
|
+
index: number;
|
|
781
949
|
|
|
782
|
-
|
|
783
|
-
|
|
950
|
+
type?: 'file_citation';
|
|
951
|
+
}
|
|
784
952
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
953
|
+
/**
|
|
954
|
+
* URL citation annotation for referencing external web resources.
|
|
955
|
+
*/
|
|
956
|
+
export interface OpenAIResponseAnnotationCitation {
|
|
957
|
+
end_index: number;
|
|
958
|
+
|
|
959
|
+
start_index: number;
|
|
960
|
+
|
|
961
|
+
title: string;
|
|
962
|
+
|
|
963
|
+
url: string;
|
|
964
|
+
|
|
965
|
+
type?: 'url_citation';
|
|
966
|
+
}
|
|
790
967
|
|
|
791
|
-
|
|
968
|
+
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
969
|
+
container_id: string;
|
|
792
970
|
|
|
793
|
-
|
|
971
|
+
end_index: number;
|
|
794
972
|
|
|
795
|
-
|
|
973
|
+
file_id: string;
|
|
974
|
+
|
|
975
|
+
filename: string;
|
|
976
|
+
|
|
977
|
+
start_index: number;
|
|
978
|
+
|
|
979
|
+
type?: 'container_file_citation';
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
export interface OpenAIResponseAnnotationFilePath {
|
|
983
|
+
file_id: string;
|
|
984
|
+
|
|
985
|
+
index: number;
|
|
986
|
+
|
|
987
|
+
type?: 'file_path';
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
/**
|
|
991
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
992
|
+
* response.
|
|
993
|
+
*/
|
|
994
|
+
export interface Logprob {
|
|
995
|
+
/**
|
|
996
|
+
* The token.
|
|
997
|
+
*/
|
|
998
|
+
token: string;
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* The log probability of the token.
|
|
1002
|
+
*/
|
|
1003
|
+
logprob: number;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* The bytes for the token.
|
|
1007
|
+
*/
|
|
1008
|
+
bytes?: Array<number> | null;
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* The top log probabilities for the token.
|
|
1012
|
+
*/
|
|
1013
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
export namespace Logprob {
|
|
1017
|
+
/**
|
|
1018
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1019
|
+
* response.
|
|
1020
|
+
*/
|
|
1021
|
+
export interface TopLogprob {
|
|
1022
|
+
/**
|
|
1023
|
+
* The token.
|
|
1024
|
+
*/
|
|
1025
|
+
token: string;
|
|
1026
|
+
|
|
1027
|
+
/**
|
|
1028
|
+
* The log probability of the token.
|
|
1029
|
+
*/
|
|
1030
|
+
logprob: number;
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* The bytes for the token.
|
|
1034
|
+
*/
|
|
1035
|
+
bytes?: Array<number> | null;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* Refusal content within a streamed response part.
|
|
1042
|
+
*/
|
|
1043
|
+
export interface OpenAIResponseContentPartRefusal {
|
|
1044
|
+
refusal: string;
|
|
1045
|
+
|
|
1046
|
+
type?: 'refusal';
|
|
1047
|
+
}
|
|
796
1048
|
}
|
|
797
1049
|
|
|
798
1050
|
/**
|
|
799
|
-
*
|
|
1051
|
+
* Web search tool call output message for OpenAI responses.
|
|
800
1052
|
*/
|
|
801
|
-
export interface
|
|
802
|
-
|
|
1053
|
+
export interface OpenAIResponseOutputMessageWebSearchToolCall {
|
|
1054
|
+
id: string;
|
|
803
1055
|
|
|
804
|
-
|
|
1056
|
+
status: string;
|
|
805
1057
|
|
|
806
|
-
|
|
1058
|
+
type?: 'web_search_call';
|
|
1059
|
+
}
|
|
807
1060
|
|
|
808
|
-
|
|
1061
|
+
/**
|
|
1062
|
+
* File search tool call output message for OpenAI responses.
|
|
1063
|
+
*/
|
|
1064
|
+
export interface OpenAIResponseOutputMessageFileSearchToolCall {
|
|
1065
|
+
id: string;
|
|
809
1066
|
|
|
810
|
-
|
|
811
|
-
}
|
|
1067
|
+
queries: Array<string>;
|
|
812
1068
|
|
|
813
|
-
|
|
814
|
-
text: string;
|
|
1069
|
+
status: string;
|
|
815
1070
|
|
|
816
|
-
|
|
817
|
-
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
|
|
818
|
-
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
|
|
819
|
-
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
|
|
820
|
-
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
|
|
821
|
-
>;
|
|
1071
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
|
|
822
1072
|
|
|
823
|
-
type?: '
|
|
1073
|
+
type?: 'file_search_call';
|
|
824
1074
|
}
|
|
825
1075
|
|
|
826
|
-
export namespace
|
|
1076
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
827
1077
|
/**
|
|
828
|
-
*
|
|
1078
|
+
* Search results returned by the file search operation.
|
|
829
1079
|
*/
|
|
830
|
-
export interface
|
|
1080
|
+
export interface Result {
|
|
1081
|
+
attributes: { [key: string]: unknown };
|
|
1082
|
+
|
|
831
1083
|
file_id: string;
|
|
832
1084
|
|
|
833
1085
|
filename: string;
|
|
834
1086
|
|
|
835
|
-
|
|
1087
|
+
score: number;
|
|
836
1088
|
|
|
837
|
-
|
|
1089
|
+
text: string;
|
|
838
1090
|
}
|
|
1091
|
+
}
|
|
839
1092
|
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
1093
|
+
/**
|
|
1094
|
+
* Function tool call output message for OpenAI responses.
|
|
1095
|
+
*/
|
|
1096
|
+
export interface OpenAIResponseOutputMessageFunctionToolCall {
|
|
1097
|
+
arguments: string;
|
|
845
1098
|
|
|
846
|
-
|
|
1099
|
+
call_id: string;
|
|
847
1100
|
|
|
848
|
-
|
|
1101
|
+
name: string;
|
|
849
1102
|
|
|
850
|
-
|
|
1103
|
+
id?: string | null;
|
|
851
1104
|
|
|
852
|
-
|
|
853
|
-
}
|
|
1105
|
+
status?: string | null;
|
|
854
1106
|
|
|
855
|
-
|
|
856
|
-
|
|
1107
|
+
type?: 'function_call';
|
|
1108
|
+
}
|
|
857
1109
|
|
|
858
|
-
|
|
1110
|
+
/**
|
|
1111
|
+
* This represents the output of a function call that gets passed back to the
|
|
1112
|
+
* model.
|
|
1113
|
+
*/
|
|
1114
|
+
export interface OpenAIResponseInputFunctionToolCallOutput {
|
|
1115
|
+
call_id: string;
|
|
859
1116
|
|
|
860
|
-
|
|
1117
|
+
output: string;
|
|
861
1118
|
|
|
862
|
-
|
|
1119
|
+
id?: string | null;
|
|
863
1120
|
|
|
864
|
-
|
|
1121
|
+
status?: string | null;
|
|
865
1122
|
|
|
866
|
-
|
|
867
|
-
|
|
1123
|
+
type?: 'function_call_output';
|
|
1124
|
+
}
|
|
868
1125
|
|
|
869
|
-
|
|
870
|
-
|
|
1126
|
+
/**
|
|
1127
|
+
* A request for human approval of a tool invocation.
|
|
1128
|
+
*/
|
|
1129
|
+
export interface OpenAIResponseMcpApprovalRequest {
|
|
1130
|
+
id: string;
|
|
871
1131
|
|
|
872
|
-
|
|
1132
|
+
arguments: string;
|
|
873
1133
|
|
|
874
|
-
|
|
875
|
-
|
|
1134
|
+
name: string;
|
|
1135
|
+
|
|
1136
|
+
server_label: string;
|
|
1137
|
+
|
|
1138
|
+
type?: 'mcp_approval_request';
|
|
876
1139
|
}
|
|
877
1140
|
|
|
878
1141
|
/**
|
|
879
|
-
*
|
|
1142
|
+
* A response to an MCP approval request.
|
|
880
1143
|
*/
|
|
881
|
-
export interface
|
|
882
|
-
|
|
1144
|
+
export interface OpenAIResponseMcpApprovalResponse {
|
|
1145
|
+
approval_request_id: string;
|
|
1146
|
+
|
|
1147
|
+
approve: boolean;
|
|
1148
|
+
|
|
1149
|
+
id?: string | null;
|
|
1150
|
+
|
|
1151
|
+
reason?: string | null;
|
|
883
1152
|
|
|
884
|
-
type?: '
|
|
1153
|
+
type?: 'mcp_approval_response';
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Model Context Protocol (MCP) call output message for OpenAI responses.
|
|
1158
|
+
*/
|
|
1159
|
+
export interface OpenAIResponseOutputMessageMcpCall {
|
|
1160
|
+
id: string;
|
|
1161
|
+
|
|
1162
|
+
arguments: string;
|
|
1163
|
+
|
|
1164
|
+
name: string;
|
|
1165
|
+
|
|
1166
|
+
server_label: string;
|
|
1167
|
+
|
|
1168
|
+
error?: string | null;
|
|
1169
|
+
|
|
1170
|
+
output?: string | null;
|
|
1171
|
+
|
|
1172
|
+
type?: 'mcp_call';
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
/**
|
|
1176
|
+
* MCP list tools output message containing available tools from an MCP server.
|
|
1177
|
+
*/
|
|
1178
|
+
export interface OpenAIResponseOutputMessageMcpListTools {
|
|
1179
|
+
id: string;
|
|
1180
|
+
|
|
1181
|
+
server_label: string;
|
|
1182
|
+
|
|
1183
|
+
tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
|
|
1184
|
+
|
|
1185
|
+
type?: 'mcp_list_tools';
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
export namespace OpenAIResponseOutputMessageMcpListTools {
|
|
1189
|
+
/**
|
|
1190
|
+
* Tool definition returned by MCP list tools operation.
|
|
1191
|
+
*/
|
|
1192
|
+
export interface Tool {
|
|
1193
|
+
input_schema: { [key: string]: unknown };
|
|
1194
|
+
|
|
1195
|
+
name: string;
|
|
1196
|
+
|
|
1197
|
+
description?: string | null;
|
|
1198
|
+
}
|
|
885
1199
|
}
|
|
886
1200
|
}
|
|
887
1201
|
|
|
888
1202
|
export interface ItemCreateParams {
|
|
1203
|
+
/**
|
|
1204
|
+
* Items to include in the conversation context. You may add up to 20 items at a
|
|
1205
|
+
* time.
|
|
1206
|
+
*/
|
|
889
1207
|
items: Array<
|
|
890
1208
|
| ItemCreateParams.OpenAIResponseMessageInput
|
|
891
1209
|
| ItemCreateParams.OpenAIResponseOutputMessageWebSearchToolCall
|
|
@@ -914,7 +1232,7 @@ export namespace ItemCreateParams {
|
|
|
914
1232
|
| OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile
|
|
915
1233
|
>
|
|
916
1234
|
| Array<
|
|
917
|
-
| OpenAIResponseMessageInput.
|
|
1235
|
+
| OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputTextInput
|
|
918
1236
|
| OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal
|
|
919
1237
|
>;
|
|
920
1238
|
|
|
@@ -965,20 +1283,22 @@ export namespace ItemCreateParams {
|
|
|
965
1283
|
type?: 'input_file';
|
|
966
1284
|
}
|
|
967
1285
|
|
|
968
|
-
export interface
|
|
1286
|
+
export interface OpenAIResponseOutputMessageContentOutputTextInput {
|
|
969
1287
|
text: string;
|
|
970
1288
|
|
|
971
1289
|
annotations?: Array<
|
|
972
|
-
|
|
|
973
|
-
|
|
|
974
|
-
|
|
|
975
|
-
|
|
|
1290
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFileCitation
|
|
1291
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationCitation
|
|
1292
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationContainerFileCitation
|
|
1293
|
+
| OpenAIResponseOutputMessageContentOutputTextInput.OpenAIResponseAnnotationFilePath
|
|
976
1294
|
>;
|
|
977
1295
|
|
|
1296
|
+
logprobs?: Array<OpenAIResponseOutputMessageContentOutputTextInput.Logprob> | null;
|
|
1297
|
+
|
|
978
1298
|
type?: 'output_text';
|
|
979
1299
|
}
|
|
980
1300
|
|
|
981
|
-
export namespace
|
|
1301
|
+
export namespace OpenAIResponseOutputMessageContentOutputTextInput {
|
|
982
1302
|
/**
|
|
983
1303
|
* File citation annotation for referencing specific files in response content.
|
|
984
1304
|
*/
|
|
@@ -1028,6 +1348,55 @@ export namespace ItemCreateParams {
|
|
|
1028
1348
|
|
|
1029
1349
|
type?: 'file_path';
|
|
1030
1350
|
}
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* The log probability for a token from an OpenAI-compatible chat completion
|
|
1354
|
+
* response.
|
|
1355
|
+
*/
|
|
1356
|
+
export interface Logprob {
|
|
1357
|
+
/**
|
|
1358
|
+
* The token.
|
|
1359
|
+
*/
|
|
1360
|
+
token: string;
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* The log probability of the token.
|
|
1364
|
+
*/
|
|
1365
|
+
logprob: number;
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* The bytes for the token.
|
|
1369
|
+
*/
|
|
1370
|
+
bytes?: Array<number> | null;
|
|
1371
|
+
|
|
1372
|
+
/**
|
|
1373
|
+
* The top log probabilities for the token.
|
|
1374
|
+
*/
|
|
1375
|
+
top_logprobs?: Array<Logprob.TopLogprob> | null;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
export namespace Logprob {
|
|
1379
|
+
/**
|
|
1380
|
+
* The top log probability for a token from an OpenAI-compatible chat completion
|
|
1381
|
+
* response.
|
|
1382
|
+
*/
|
|
1383
|
+
export interface TopLogprob {
|
|
1384
|
+
/**
|
|
1385
|
+
* The token.
|
|
1386
|
+
*/
|
|
1387
|
+
token: string;
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* The log probability of the token.
|
|
1391
|
+
*/
|
|
1392
|
+
logprob: number;
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* The bytes for the token.
|
|
1396
|
+
*/
|
|
1397
|
+
bytes?: Array<number> | null;
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1031
1400
|
}
|
|
1032
1401
|
|
|
1033
1402
|
/**
|