llama-stack-client 0.3.4-rc3 → 0.4.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +153 -0
- package/README.md +19 -21
- package/error.d.ts.map +1 -1
- package/error.js +1 -0
- package/error.js.map +1 -1
- package/error.mjs.map +1 -1
- package/index.d.mts +23 -50
- package/index.d.ts +23 -50
- package/index.d.ts.map +1 -1
- package/index.js +20 -29
- package/index.js.map +1 -1
- package/index.mjs +18 -28
- package/index.mjs.map +1 -1
- package/lib/response-helpers.d.ts +23 -0
- package/lib/response-helpers.d.ts.map +1 -0
- package/lib/response-helpers.js +53 -0
- package/lib/response-helpers.js.map +1 -0
- package/lib/response-helpers.mjs +49 -0
- package/lib/response-helpers.mjs.map +1 -0
- package/package.json +1 -1
- package/pagination.d.ts.map +1 -1
- package/pagination.js +2 -4
- package/pagination.js.map +1 -1
- package/pagination.mjs +1 -4
- package/pagination.mjs.map +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/alpha/alpha.d.ts +22 -0
- package/resources/alpha/alpha.d.ts.map +1 -0
- package/resources/alpha/alpha.js +57 -0
- package/resources/alpha/alpha.js.map +1 -0
- package/resources/alpha/alpha.mjs +30 -0
- package/resources/alpha/alpha.mjs.map +1 -0
- package/resources/{benchmarks.d.ts → alpha/benchmarks.d.ts} +25 -35
- package/resources/alpha/benchmarks.d.ts.map +1 -0
- package/resources/{benchmarks.js → alpha/benchmarks.js} +18 -4
- package/resources/alpha/benchmarks.js.map +1 -0
- package/resources/alpha/benchmarks.mjs +44 -0
- package/resources/alpha/benchmarks.mjs.map +1 -0
- package/resources/alpha/eval/eval.d.ts +160 -0
- package/resources/alpha/eval/eval.d.ts.map +1 -0
- package/resources/{eval → alpha/eval}/eval.js +7 -6
- package/resources/alpha/eval/eval.js.map +1 -0
- package/resources/{eval → alpha/eval}/eval.mjs +7 -5
- package/resources/alpha/eval/eval.mjs.map +1 -0
- package/resources/alpha/eval/index.d.ts +3 -0
- package/resources/alpha/eval/index.d.ts.map +1 -0
- package/resources/{eval → alpha/eval}/index.js +2 -1
- package/resources/alpha/eval/index.js.map +1 -0
- package/resources/{eval → alpha/eval}/index.mjs +2 -0
- package/resources/alpha/eval/index.mjs.map +1 -0
- package/resources/{eval → alpha/eval}/jobs.d.ts +2 -2
- package/resources/alpha/eval/jobs.d.ts.map +1 -0
- package/resources/{eval → alpha/eval}/jobs.js +6 -5
- package/resources/alpha/eval/jobs.js.map +1 -0
- package/resources/{eval → alpha/eval}/jobs.mjs +6 -4
- package/resources/alpha/eval/jobs.mjs.map +1 -0
- package/resources/alpha/eval.d.ts.map +1 -0
- package/resources/{eval.js → alpha/eval.js} +1 -0
- package/resources/alpha/eval.js.map +1 -0
- package/resources/alpha/eval.mjs.map +1 -0
- package/resources/alpha/index.d.ts +6 -0
- package/resources/alpha/index.d.ts.map +1 -0
- package/resources/alpha/index.js +21 -0
- package/resources/alpha/index.js.map +1 -0
- package/resources/alpha/index.mjs +13 -0
- package/resources/alpha/index.mjs.map +1 -0
- package/resources/alpha/inference.d.ts +85 -0
- package/resources/alpha/inference.d.ts.map +1 -0
- package/resources/{agents/steps.js → alpha/inference.js} +9 -8
- package/resources/alpha/inference.js.map +1 -0
- package/resources/alpha/inference.mjs +17 -0
- package/resources/alpha/inference.mjs.map +1 -0
- package/resources/alpha/post-training/index.d.ts +3 -0
- package/resources/alpha/post-training/index.d.ts.map +1 -0
- package/resources/{post-training → alpha/post-training}/index.js +2 -1
- package/resources/alpha/post-training/index.js.map +1 -0
- package/resources/{post-training → alpha/post-training}/index.mjs +2 -0
- package/resources/alpha/post-training/index.mjs.map +1 -0
- package/resources/alpha/post-training/job.d.ts +116 -0
- package/resources/alpha/post-training/job.d.ts.map +1 -0
- package/resources/{post-training → alpha/post-training}/job.js +7 -6
- package/resources/alpha/post-training/job.js.map +1 -0
- package/resources/{post-training → alpha/post-training}/job.mjs +7 -5
- package/resources/alpha/post-training/job.mjs.map +1 -0
- package/resources/alpha/post-training/post-training.d.ts +242 -0
- package/resources/alpha/post-training/post-training.d.ts.map +1 -0
- package/resources/{post-training → alpha/post-training}/post-training.js +5 -4
- package/resources/alpha/post-training/post-training.js.map +1 -0
- package/resources/{post-training → alpha/post-training}/post-training.mjs +5 -3
- package/resources/alpha/post-training/post-training.mjs.map +1 -0
- package/resources/alpha/post-training.d.ts.map +1 -0
- package/resources/{post-training.js → alpha/post-training.js} +2 -1
- package/resources/alpha/post-training.js.map +1 -0
- package/resources/{post-training.mjs → alpha/post-training.mjs} +2 -0
- package/resources/alpha/post-training.mjs.map +1 -0
- package/resources/alpha.d.ts +2 -0
- package/resources/alpha.d.ts.map +1 -0
- package/resources/alpha.js +25 -0
- package/resources/alpha.js.map +1 -0
- package/resources/alpha.mjs +9 -0
- package/resources/alpha.mjs.map +1 -0
- package/resources/batches.d.ts +322 -0
- package/resources/batches.d.ts.map +1 -0
- package/resources/batches.js +45 -0
- package/resources/batches.js.map +1 -0
- package/resources/batches.mjs +40 -0
- package/resources/batches.mjs.map +1 -0
- package/resources/beta/beta.d.ts +10 -0
- package/resources/beta/beta.d.ts.map +1 -0
- package/resources/{tool-runtime/tool-runtime.js → beta/beta.js} +10 -22
- package/resources/beta/beta.js.map +1 -0
- package/resources/beta/beta.mjs +18 -0
- package/resources/beta/beta.mjs.map +1 -0
- package/resources/beta/datasets.d.ts +257 -0
- package/resources/beta/datasets.d.ts.map +1 -0
- package/resources/{datasets.js → beta/datasets.js} +14 -9
- package/resources/beta/datasets.js.map +1 -0
- package/resources/{datasets.mjs → beta/datasets.mjs} +14 -8
- package/resources/beta/datasets.mjs.map +1 -0
- package/resources/beta/index.d.ts +3 -0
- package/resources/beta/index.d.ts.map +1 -0
- package/resources/beta/index.js +15 -0
- package/resources/beta/index.js.map +1 -0
- package/resources/beta/index.mjs +10 -0
- package/resources/beta/index.mjs.map +1 -0
- package/resources/beta.d.ts +2 -0
- package/resources/beta.d.ts.map +1 -0
- package/resources/{agents.js → beta.js} +4 -3
- package/resources/beta.js.map +1 -0
- package/resources/beta.mjs +9 -0
- package/resources/beta.mjs.map +1 -0
- package/resources/chat/chat.d.ts +73 -78
- package/resources/chat/chat.d.ts.map +1 -1
- package/resources/chat/chat.js +2 -2
- package/resources/chat/chat.js.map +1 -1
- package/resources/chat/chat.mjs +3 -2
- package/resources/chat/chat.mjs.map +1 -1
- package/resources/chat/completions.d.ts +756 -1402
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/chat/completions.js +8 -14
- package/resources/chat/completions.js.map +1 -1
- package/resources/chat/completions.mjs +7 -11
- package/resources/chat/completions.mjs.map +1 -1
- package/resources/chat/index.d.ts +1 -1
- package/resources/chat/index.d.ts.map +1 -1
- package/resources/chat/index.js +3 -3
- package/resources/chat/index.js.map +1 -1
- package/resources/chat/index.mjs +3 -1
- package/resources/chat/index.mjs.map +1 -1
- package/resources/chat.js +2 -1
- package/resources/chat.js.map +1 -1
- package/resources/chat.mjs +2 -0
- package/resources/chat.mjs.map +1 -1
- package/resources/completions.d.ts +52 -95
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js +3 -6
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs +3 -5
- package/resources/completions.mjs.map +1 -1
- package/resources/conversations/conversations.d.ts +292 -0
- package/resources/conversations/conversations.d.ts.map +1 -0
- package/resources/conversations/conversations.js +78 -0
- package/resources/conversations/conversations.js.map +1 -0
- package/resources/conversations/conversations.mjs +51 -0
- package/resources/conversations/conversations.mjs.map +1 -0
- package/resources/conversations/index.d.ts +3 -0
- package/resources/conversations/index.d.ts.map +1 -0
- package/resources/conversations/index.js +16 -0
- package/resources/conversations/index.js.map +1 -0
- package/resources/conversations/index.mjs +10 -0
- package/resources/conversations/index.mjs.map +1 -0
- package/resources/conversations/items.d.ts +762 -0
- package/resources/conversations/items.d.ts.map +1 -0
- package/resources/conversations/items.js +51 -0
- package/resources/conversations/items.js.map +1 -0
- package/resources/conversations/items.mjs +46 -0
- package/resources/conversations/items.mjs.map +1 -0
- package/resources/conversations.d.ts +2 -0
- package/resources/conversations.d.ts.map +1 -0
- package/resources/conversations.js +25 -0
- package/resources/conversations.js.map +1 -0
- package/resources/conversations.mjs +9 -0
- package/resources/conversations.mjs.map +1 -0
- package/resources/embeddings.d.ts +10 -52
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +5 -2
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +5 -1
- package/resources/embeddings.mjs.map +1 -1
- package/resources/files.d.ts +44 -54
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +18 -9
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +18 -8
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.ts +9 -13
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +15 -21
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +9 -11
- package/resources/index.mjs.map +1 -1
- package/resources/inspect.d.ts +6 -32
- package/resources/inspect.d.ts.map +1 -1
- package/resources/inspect.js +6 -1
- package/resources/inspect.js.map +1 -1
- package/resources/inspect.mjs +6 -0
- package/resources/inspect.mjs.map +1 -1
- package/resources/models/index.d.ts +2 -2
- package/resources/models/index.d.ts.map +1 -1
- package/resources/models/index.js +2 -1
- package/resources/models/index.js.map +1 -1
- package/resources/models/index.mjs +2 -0
- package/resources/models/index.mjs.map +1 -1
- package/resources/models/models.d.ts +71 -31
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +13 -2
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +13 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/openai.d.ts +2 -16
- package/resources/models/openai.d.ts.map +1 -1
- package/resources/models/openai.js +3 -2
- package/resources/models/openai.js.map +1 -1
- package/resources/models/openai.mjs +3 -1
- package/resources/models/openai.mjs.map +1 -1
- package/resources/models.js +2 -1
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +2 -0
- package/resources/models.mjs.map +1 -1
- package/resources/moderations.d.ts +9 -35
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +5 -2
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +5 -1
- package/resources/moderations.mjs.map +1 -1
- package/resources/prompts/index.d.ts +3 -0
- package/resources/prompts/index.d.ts.map +1 -0
- package/resources/prompts/index.js +15 -0
- package/resources/prompts/index.js.map +1 -0
- package/resources/prompts/index.mjs +10 -0
- package/resources/prompts/index.mjs.map +1 -0
- package/resources/prompts/prompts.d.ts +96 -0
- package/resources/prompts/prompts.d.ts.map +1 -0
- package/resources/{agents/agents.js → prompts/prompts.js} +43 -30
- package/resources/prompts/prompts.js.map +1 -0
- package/resources/prompts/prompts.mjs +66 -0
- package/resources/prompts/prompts.mjs.map +1 -0
- package/resources/prompts/versions.d.ts +12 -0
- package/resources/prompts/versions.d.ts.map +1 -0
- package/resources/prompts/versions.js +23 -0
- package/resources/prompts/versions.js.map +1 -0
- package/resources/prompts/versions.mjs +19 -0
- package/resources/prompts/versions.mjs.map +1 -0
- package/resources/prompts.d.ts +2 -0
- package/resources/prompts.d.ts.map +1 -0
- package/resources/prompts.js +25 -0
- package/resources/prompts.js.map +1 -0
- package/resources/prompts.mjs +9 -0
- package/resources/prompts.mjs.map +1 -0
- package/resources/providers.d.ts +4 -6
- package/resources/providers.d.ts.map +1 -1
- package/resources/providers.js +6 -1
- package/resources/providers.js.map +1 -1
- package/resources/providers.mjs +6 -0
- package/resources/providers.mjs.map +1 -1
- package/resources/responses/index.js +2 -1
- package/resources/responses/index.js.map +1 -1
- package/resources/responses/index.mjs +2 -0
- package/resources/responses/index.mjs.map +1 -1
- package/resources/responses/input-items.d.ts +190 -151
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/input-items.js +3 -2
- package/resources/responses/input-items.js.map +1 -1
- package/resources/responses/input-items.mjs +3 -1
- package/resources/responses/input-items.mjs.map +1 -1
- package/resources/responses/responses.d.ts +1387 -1449
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +8 -11
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +8 -10
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/responses.js +2 -1
- package/resources/responses.js.map +1 -1
- package/resources/responses.mjs +2 -0
- package/resources/responses.mjs.map +1 -1
- package/resources/routes.d.ts +7 -7
- package/resources/routes.d.ts.map +1 -1
- package/resources/routes.js +8 -6
- package/resources/routes.js.map +1 -1
- package/resources/routes.mjs +8 -5
- package/resources/routes.mjs.map +1 -1
- package/resources/safety.d.ts +144 -10
- package/resources/safety.d.ts.map +1 -1
- package/resources/safety.js +4 -1
- package/resources/safety.js.map +1 -1
- package/resources/safety.mjs +4 -0
- package/resources/safety.mjs.map +1 -1
- package/resources/scoring-functions.d.ts +120 -50
- package/resources/scoring-functions.d.ts.map +1 -1
- package/resources/scoring-functions.js +15 -1
- package/resources/scoring-functions.js.map +1 -1
- package/resources/scoring-functions.mjs +15 -0
- package/resources/scoring-functions.mjs.map +1 -1
- package/resources/scoring.d.ts +85 -26
- package/resources/scoring.d.ts.map +1 -1
- package/resources/scoring.js +2 -1
- package/resources/scoring.js.map +1 -1
- package/resources/scoring.mjs +2 -0
- package/resources/scoring.mjs.map +1 -1
- package/resources/shared.d.ts +125 -629
- package/resources/shared.d.ts.map +1 -1
- package/resources/shared.js +2 -0
- package/resources/shared.js.map +1 -1
- package/resources/shared.mjs +2 -0
- package/resources/shared.mjs.map +1 -1
- package/resources/shields.d.ts +19 -24
- package/resources/shields.d.ts.map +1 -1
- package/resources/shields.js +6 -1
- package/resources/shields.js.map +1 -1
- package/resources/shields.mjs +6 -0
- package/resources/shields.mjs.map +1 -1
- package/resources/tool-runtime.d.ts +151 -1
- package/resources/tool-runtime.d.ts.map +1 -1
- package/resources/tool-runtime.js +22 -16
- package/resources/tool-runtime.js.map +1 -1
- package/resources/tool-runtime.mjs +20 -1
- package/resources/tool-runtime.mjs.map +1 -1
- package/resources/toolgroups.d.ts +27 -37
- package/resources/toolgroups.d.ts.map +1 -1
- package/resources/toolgroups.js +10 -1
- package/resources/toolgroups.js.map +1 -1
- package/resources/toolgroups.mjs +10 -0
- package/resources/toolgroups.mjs.map +1 -1
- package/resources/tools.d.ts +9 -76
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +4 -1
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +4 -0
- package/resources/tools.mjs.map +1 -1
- package/resources/vector-io.d.ts +272 -148
- package/resources/vector-io.d.ts.map +1 -1
- package/resources/vector-io.js +2 -1
- package/resources/vector-io.js.map +1 -1
- package/resources/vector-io.mjs +2 -0
- package/resources/vector-io.mjs.map +1 -1
- package/resources/vector-stores/file-batches.d.ts +111 -0
- package/resources/vector-stores/file-batches.d.ts.map +1 -0
- package/resources/vector-stores/file-batches.js +45 -0
- package/resources/vector-stores/file-batches.js.map +1 -0
- package/resources/vector-stores/file-batches.mjs +41 -0
- package/resources/vector-stores/file-batches.mjs.map +1 -0
- package/resources/vector-stores/files.d.ts +83 -135
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +15 -14
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +15 -13
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/index.d.ts +2 -1
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js +5 -2
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs +3 -0
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +118 -217
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +18 -12
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +18 -11
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/vector-stores.js +2 -1
- package/resources/vector-stores.js.map +1 -1
- package/resources/vector-stores.mjs +2 -0
- package/resources/vector-stores.mjs.map +1 -1
- package/src/error.ts +1 -0
- package/src/index.ts +82 -252
- package/src/lib/response-helpers.ts +60 -0
- package/src/pagination.ts +2 -5
- package/src/resource.ts +1 -0
- package/src/resources/alpha/alpha.ts +85 -0
- package/src/resources/{benchmarks.ts → alpha/benchmarks.ts} +36 -37
- package/src/resources/{eval → alpha/eval}/eval.ts +83 -65
- package/src/resources/{eval → alpha/eval}/index.ts +1 -2
- package/src/resources/{eval → alpha/eval}/jobs.ts +6 -6
- package/src/resources/{eval.ts → alpha/eval.ts} +1 -0
- package/src/resources/alpha/index.ts +34 -0
- package/src/resources/alpha/inference.ts +132 -0
- package/src/resources/{post-training → alpha/post-training}/index.ts +2 -2
- package/src/resources/alpha/post-training/job.ts +182 -0
- package/src/resources/alpha/post-training/post-training.ts +369 -0
- package/src/resources/{post-training.ts → alpha/post-training.ts} +1 -1
- package/src/resources/alpha.ts +9 -0
- package/src/resources/batches.ts +572 -0
- package/src/resources/beta/beta.ts +41 -0
- package/src/resources/beta/datasets.ts +350 -0
- package/src/resources/beta/index.ts +20 -0
- package/src/resources/{agents.ts → beta.ts} +2 -2
- package/src/resources/chat/chat.ts +82 -81
- package/src/resources/chat/completions.ts +874 -1484
- package/src/resources/chat/index.ts +1 -2
- package/src/resources/chat.ts +1 -1
- package/src/resources/completions.ts +57 -101
- package/src/resources/conversations/conversations.ts +455 -0
- package/src/resources/conversations/index.ts +25 -0
- package/src/resources/conversations/items.ts +1221 -0
- package/src/resources/conversations.ts +9 -0
- package/src/resources/embeddings.ts +14 -55
- package/src/resources/files.ts +54 -61
- package/src/resources/index.ts +33 -109
- package/src/resources/inspect.ts +7 -33
- package/src/resources/models/index.ts +4 -2
- package/src/resources/models/models.ts +79 -30
- package/src/resources/models/openai.ts +4 -24
- package/src/resources/models.ts +1 -1
- package/src/resources/moderations.ts +10 -36
- package/src/resources/prompts/index.ts +19 -0
- package/src/resources/prompts/prompts.ts +171 -0
- package/src/resources/prompts/versions.ts +26 -0
- package/src/resources/prompts.ts +9 -0
- package/src/resources/providers.ts +5 -7
- package/src/resources/responses/index.ts +1 -1
- package/src/resources/responses/input-items.ts +293 -161
- package/src/resources/responses/responses.ts +2112 -1632
- package/src/resources/responses.ts +1 -1
- package/src/resources/routes.ts +25 -10
- package/src/resources/safety.ts +199 -9
- package/src/resources/scoring-functions.ts +168 -52
- package/src/resources/scoring.ts +125 -22
- package/src/resources/shared.ts +141 -714
- package/src/resources/shields.ts +18 -23
- package/src/resources/tool-runtime.ts +210 -2
- package/src/resources/toolgroups.ts +26 -36
- package/src/resources/tools.ts +10 -94
- package/src/resources/vector-io.ts +323 -145
- package/src/resources/vector-stores/file-batches.ts +201 -0
- package/src/resources/vector-stores/files.ts +123 -143
- package/src/resources/vector-stores/index.ts +9 -1
- package/src/resources/vector-stores/vector-stores.ts +150 -216
- package/src/resources/vector-stores.ts +1 -1
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/agents/agents.d.ts +0 -246
- package/resources/agents/agents.d.ts.map +0 -1
- package/resources/agents/agents.js.map +0 -1
- package/resources/agents/agents.mjs +0 -52
- package/resources/agents/agents.mjs.map +0 -1
- package/resources/agents/index.d.ts +0 -5
- package/resources/agents/index.d.ts.map +0 -1
- package/resources/agents/index.js +0 -18
- package/resources/agents/index.js.map +0 -1
- package/resources/agents/index.mjs +0 -10
- package/resources/agents/index.mjs.map +0 -1
- package/resources/agents/session.d.ts +0 -98
- package/resources/agents/session.d.ts.map +0 -1
- package/resources/agents/session.js +0 -42
- package/resources/agents/session.js.map +0 -1
- package/resources/agents/session.mjs +0 -37
- package/resources/agents/session.mjs.map +0 -1
- package/resources/agents/steps.d.ts +0 -22
- package/resources/agents/steps.d.ts.map +0 -1
- package/resources/agents/steps.js.map +0 -1
- package/resources/agents/steps.mjs +0 -15
- package/resources/agents/steps.mjs.map +0 -1
- package/resources/agents/turn.d.ts +0 -461
- package/resources/agents/turn.d.ts.map +0 -1
- package/resources/agents/turn.js +0 -34
- package/resources/agents/turn.js.map +0 -1
- package/resources/agents/turn.mjs +0 -29
- package/resources/agents/turn.mjs.map +0 -1
- package/resources/agents.d.ts +0 -2
- package/resources/agents.d.ts.map +0 -1
- package/resources/agents.js.map +0 -1
- package/resources/agents.mjs +0 -7
- package/resources/agents.mjs.map +0 -1
- package/resources/benchmarks.d.ts.map +0 -1
- package/resources/benchmarks.js.map +0 -1
- package/resources/benchmarks.mjs +0 -31
- package/resources/benchmarks.mjs.map +0 -1
- package/resources/datasets.d.ts +0 -320
- package/resources/datasets.d.ts.map +0 -1
- package/resources/datasets.js.map +0 -1
- package/resources/datasets.mjs.map +0 -1
- package/resources/eval/eval.d.ts +0 -159
- package/resources/eval/eval.d.ts.map +0 -1
- package/resources/eval/eval.js.map +0 -1
- package/resources/eval/eval.mjs.map +0 -1
- package/resources/eval/index.d.ts +0 -3
- package/resources/eval/index.d.ts.map +0 -1
- package/resources/eval/index.js.map +0 -1
- package/resources/eval/index.mjs.map +0 -1
- package/resources/eval/jobs.d.ts.map +0 -1
- package/resources/eval/jobs.js.map +0 -1
- package/resources/eval/jobs.mjs.map +0 -1
- package/resources/eval.d.ts.map +0 -1
- package/resources/eval.js.map +0 -1
- package/resources/eval.mjs.map +0 -1
- package/resources/inference.d.ts +0 -580
- package/resources/inference.d.ts.map +0 -1
- package/resources/inference.js +0 -54
- package/resources/inference.js.map +0 -1
- package/resources/inference.mjs +0 -49
- package/resources/inference.mjs.map +0 -1
- package/resources/post-training/index.d.ts +0 -3
- package/resources/post-training/index.d.ts.map +0 -1
- package/resources/post-training/index.js.map +0 -1
- package/resources/post-training/index.mjs.map +0 -1
- package/resources/post-training/job.d.ts +0 -205
- package/resources/post-training/job.d.ts.map +0 -1
- package/resources/post-training/job.js.map +0 -1
- package/resources/post-training/job.mjs.map +0 -1
- package/resources/post-training/post-training.d.ts +0 -402
- package/resources/post-training/post-training.d.ts.map +0 -1
- package/resources/post-training/post-training.js.map +0 -1
- package/resources/post-training/post-training.mjs.map +0 -1
- package/resources/post-training.d.ts.map +0 -1
- package/resources/post-training.js.map +0 -1
- package/resources/post-training.mjs.map +0 -1
- package/resources/synthetic-data-generation.d.ts +0 -47
- package/resources/synthetic-data-generation.d.ts.map +0 -1
- package/resources/synthetic-data-generation.js +0 -20
- package/resources/synthetic-data-generation.js.map +0 -1
- package/resources/synthetic-data-generation.mjs +0 -15
- package/resources/synthetic-data-generation.mjs.map +0 -1
- package/resources/telemetry.d.ts +0 -519
- package/resources/telemetry.d.ts.map +0 -1
- package/resources/telemetry.js +0 -70
- package/resources/telemetry.js.map +0 -1
- package/resources/telemetry.mjs +0 -65
- package/resources/telemetry.mjs.map +0 -1
- package/resources/tool-runtime/index.d.ts +0 -3
- package/resources/tool-runtime/index.d.ts.map +0 -1
- package/resources/tool-runtime/index.js +0 -14
- package/resources/tool-runtime/index.js.map +0 -1
- package/resources/tool-runtime/index.mjs +0 -8
- package/resources/tool-runtime/index.mjs.map +0 -1
- package/resources/tool-runtime/rag-tool.d.ts +0 -45
- package/resources/tool-runtime/rag-tool.d.ts.map +0 -1
- package/resources/tool-runtime/rag-tool.js +0 -30
- package/resources/tool-runtime/rag-tool.js.map +0 -1
- package/resources/tool-runtime/rag-tool.mjs +0 -25
- package/resources/tool-runtime/rag-tool.mjs.map +0 -1
- package/resources/tool-runtime/tool-runtime.d.ts +0 -132
- package/resources/tool-runtime/tool-runtime.d.ts.map +0 -1
- package/resources/tool-runtime/tool-runtime.js.map +0 -1
- package/resources/tool-runtime/tool-runtime.mjs +0 -29
- package/resources/tool-runtime/tool-runtime.mjs.map +0 -1
- package/resources/vector-dbs.d.ts +0 -128
- package/resources/vector-dbs.d.ts.map +0 -1
- package/resources/vector-dbs.js +0 -41
- package/resources/vector-dbs.js.map +0 -1
- package/resources/vector-dbs.mjs +0 -36
- package/resources/vector-dbs.mjs.map +0 -1
- package/src/resources/agents/agents.ts +0 -372
- package/src/resources/agents/index.ts +0 -44
- package/src/resources/agents/session.ts +0 -169
- package/src/resources/agents/steps.ts +0 -47
- package/src/resources/agents/turn.ts +0 -638
- package/src/resources/datasets.ts +0 -413
- package/src/resources/inference.ts +0 -768
- package/src/resources/post-training/job.ts +0 -274
- package/src/resources/post-training/post-training.ts +0 -516
- package/src/resources/synthetic-data-generation.ts +0 -65
- package/src/resources/telemetry.ts +0 -692
- package/src/resources/tool-runtime/index.ts +0 -17
- package/src/resources/tool-runtime/rag-tool.ts +0 -69
- package/src/resources/tool-runtime/tool-runtime.ts +0 -191
- package/src/resources/vector-dbs.ts +0 -191
- /package/resources/{eval.d.ts → alpha/eval.d.ts} +0 -0
- /package/resources/{eval.mjs → alpha/eval.mjs} +0 -0
- /package/resources/{post-training.d.ts → alpha/post-training.d.ts} +0 -0
|
@@ -0,0 +1,1221 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
// All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the terms described in the LICENSE file in
|
|
5
|
+
// the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8
|
+
|
|
9
|
+
import { APIResource } from '../../resource';
|
|
10
|
+
import { isRequestOptions } from '../../core';
|
|
11
|
+
import * as Core from '../../core';
|
|
12
|
+
import { OpenAICursorPage, type OpenAICursorPageParams } from '../../pagination';
|
|
13
|
+
|
|
14
|
+
export class Items extends APIResource {
|
|
15
|
+
/**
|
|
16
|
+
* Create items.
|
|
17
|
+
*
|
|
18
|
+
* Create items in the conversation.
|
|
19
|
+
*/
|
|
20
|
+
create(
|
|
21
|
+
conversationId: string,
|
|
22
|
+
body: ItemCreateParams,
|
|
23
|
+
options?: Core.RequestOptions,
|
|
24
|
+
): Core.APIPromise<ItemCreateResponse> {
|
|
25
|
+
return this._client.post(`/v1/conversations/${conversationId}/items`, { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* List items.
|
|
30
|
+
*
|
|
31
|
+
* List items in the conversation.
|
|
32
|
+
*/
|
|
33
|
+
list(
|
|
34
|
+
conversationId: string,
|
|
35
|
+
query?: ItemListParams,
|
|
36
|
+
options?: Core.RequestOptions,
|
|
37
|
+
): Core.PagePromise<ItemListResponsesOpenAICursorPage, ItemListResponse>;
|
|
38
|
+
list(
|
|
39
|
+
conversationId: string,
|
|
40
|
+
options?: Core.RequestOptions,
|
|
41
|
+
): Core.PagePromise<ItemListResponsesOpenAICursorPage, ItemListResponse>;
|
|
42
|
+
list(
|
|
43
|
+
conversationId: string,
|
|
44
|
+
query: ItemListParams | Core.RequestOptions = {},
|
|
45
|
+
options?: Core.RequestOptions,
|
|
46
|
+
): Core.PagePromise<ItemListResponsesOpenAICursorPage, ItemListResponse> {
|
|
47
|
+
if (isRequestOptions(query)) {
|
|
48
|
+
return this.list(conversationId, {}, query);
|
|
49
|
+
}
|
|
50
|
+
return this._client.getAPIList(
|
|
51
|
+
`/v1/conversations/${conversationId}/items`,
|
|
52
|
+
ItemListResponsesOpenAICursorPage,
|
|
53
|
+
{ query, ...options },
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Delete an item.
|
|
59
|
+
*
|
|
60
|
+
* Delete a conversation item.
|
|
61
|
+
*/
|
|
62
|
+
delete(
|
|
63
|
+
conversationId: string,
|
|
64
|
+
itemId: string,
|
|
65
|
+
options?: Core.RequestOptions,
|
|
66
|
+
): Core.APIPromise<ItemDeleteResponse> {
|
|
67
|
+
return this._client.delete(`/v1/conversations/${conversationId}/items/${itemId}`, options);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Retrieve an item.
|
|
72
|
+
*
|
|
73
|
+
* Retrieve a conversation item.
|
|
74
|
+
*/
|
|
75
|
+
get(
|
|
76
|
+
conversationId: string,
|
|
77
|
+
itemId: string,
|
|
78
|
+
options?: Core.RequestOptions,
|
|
79
|
+
): Core.APIPromise<ItemGetResponse> {
|
|
80
|
+
return this._client.get(`/v1/conversations/${conversationId}/items/${itemId}`, options);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export class ItemListResponsesOpenAICursorPage extends OpenAICursorPage<ItemListResponse> {}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* List of conversation items with pagination.
|
|
88
|
+
*/
|
|
89
|
+
export interface ItemCreateResponse {
|
|
90
|
+
/**
|
|
91
|
+
* List of conversation items
|
|
92
|
+
*/
|
|
93
|
+
data: Array<
|
|
94
|
+
| ItemCreateResponse.OpenAIResponseMessageOutput
|
|
95
|
+
| ItemCreateResponse.OpenAIResponseOutputMessageWebSearchToolCall
|
|
96
|
+
| ItemCreateResponse.OpenAIResponseOutputMessageFileSearchToolCall
|
|
97
|
+
| ItemCreateResponse.OpenAIResponseOutputMessageFunctionToolCall
|
|
98
|
+
| ItemCreateResponse.OpenAIResponseInputFunctionToolCallOutput
|
|
99
|
+
| ItemCreateResponse.OpenAIResponseMcpApprovalRequest
|
|
100
|
+
| ItemCreateResponse.OpenAIResponseMcpApprovalResponse
|
|
101
|
+
| ItemCreateResponse.OpenAIResponseOutputMessageMcpCall
|
|
102
|
+
| ItemCreateResponse.OpenAIResponseOutputMessageMcpListTools
|
|
103
|
+
>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The ID of the first item in the list
|
|
107
|
+
*/
|
|
108
|
+
first_id?: string | null;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Whether there are more items available
|
|
112
|
+
*/
|
|
113
|
+
has_more?: boolean;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The ID of the last item in the list
|
|
117
|
+
*/
|
|
118
|
+
last_id?: string | null;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Object type
|
|
122
|
+
*/
|
|
123
|
+
object?: string;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export namespace ItemCreateResponse {
|
|
127
|
+
/**
|
|
128
|
+
* Corresponds to the various Message types in the Responses API. They are all
|
|
129
|
+
* under one type because the Responses API gives them all the same "type" value,
|
|
130
|
+
* and there is no way to tell them apart in certain scenarios.
|
|
131
|
+
*/
|
|
132
|
+
export interface OpenAIResponseMessageOutput {
|
|
133
|
+
content:
|
|
134
|
+
| string
|
|
135
|
+
| Array<
|
|
136
|
+
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText
|
|
137
|
+
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage
|
|
138
|
+
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
|
|
139
|
+
>
|
|
140
|
+
| Array<
|
|
141
|
+
| OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputText
|
|
142
|
+
| OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
|
|
143
|
+
>;
|
|
144
|
+
|
|
145
|
+
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
146
|
+
|
|
147
|
+
id?: string | null;
|
|
148
|
+
|
|
149
|
+
status?: string | null;
|
|
150
|
+
|
|
151
|
+
type?: 'message';
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export namespace OpenAIResponseMessageOutput {
|
|
155
|
+
/**
|
|
156
|
+
* Text content for input messages in OpenAI response format.
|
|
157
|
+
*/
|
|
158
|
+
export interface OpenAIResponseInputMessageContentText {
|
|
159
|
+
text: string;
|
|
160
|
+
|
|
161
|
+
type?: 'input_text';
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Image content for input messages in OpenAI response format.
|
|
166
|
+
*/
|
|
167
|
+
export interface OpenAIResponseInputMessageContentImage {
|
|
168
|
+
detail?: 'low' | 'high' | 'auto';
|
|
169
|
+
|
|
170
|
+
file_id?: string | null;
|
|
171
|
+
|
|
172
|
+
image_url?: string | null;
|
|
173
|
+
|
|
174
|
+
type?: 'input_image';
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* File content for input messages in OpenAI response format.
|
|
179
|
+
*/
|
|
180
|
+
export interface OpenAIResponseInputMessageContentFile {
|
|
181
|
+
file_data?: string | null;
|
|
182
|
+
|
|
183
|
+
file_id?: string | null;
|
|
184
|
+
|
|
185
|
+
file_url?: string | null;
|
|
186
|
+
|
|
187
|
+
filename?: string | null;
|
|
188
|
+
|
|
189
|
+
type?: 'input_file';
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface OpenAIResponseOutputMessageContentOutputText {
|
|
193
|
+
text: string;
|
|
194
|
+
|
|
195
|
+
annotations?: Array<
|
|
196
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
|
|
197
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
|
|
198
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
|
|
199
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
|
|
200
|
+
>;
|
|
201
|
+
|
|
202
|
+
type?: 'output_text';
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export namespace OpenAIResponseOutputMessageContentOutputText {
|
|
206
|
+
/**
|
|
207
|
+
* File citation annotation for referencing specific files in response content.
|
|
208
|
+
*/
|
|
209
|
+
export interface OpenAIResponseAnnotationFileCitation {
|
|
210
|
+
file_id: string;
|
|
211
|
+
|
|
212
|
+
filename: string;
|
|
213
|
+
|
|
214
|
+
index: number;
|
|
215
|
+
|
|
216
|
+
type?: 'file_citation';
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* URL citation annotation for referencing external web resources.
|
|
221
|
+
*/
|
|
222
|
+
export interface OpenAIResponseAnnotationCitation {
|
|
223
|
+
end_index: number;
|
|
224
|
+
|
|
225
|
+
start_index: number;
|
|
226
|
+
|
|
227
|
+
title: string;
|
|
228
|
+
|
|
229
|
+
url: string;
|
|
230
|
+
|
|
231
|
+
type?: 'url_citation';
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
235
|
+
container_id: string;
|
|
236
|
+
|
|
237
|
+
end_index: number;
|
|
238
|
+
|
|
239
|
+
file_id: string;
|
|
240
|
+
|
|
241
|
+
filename: string;
|
|
242
|
+
|
|
243
|
+
start_index: number;
|
|
244
|
+
|
|
245
|
+
type?: 'container_file_citation';
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface OpenAIResponseAnnotationFilePath {
|
|
249
|
+
file_id: string;
|
|
250
|
+
|
|
251
|
+
index: number;
|
|
252
|
+
|
|
253
|
+
type?: 'file_path';
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Refusal content within a streamed response part.
|
|
259
|
+
*/
|
|
260
|
+
export interface OpenAIResponseContentPartRefusal {
|
|
261
|
+
refusal: string;
|
|
262
|
+
|
|
263
|
+
type?: 'refusal';
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Web search tool call output message for OpenAI responses.
|
|
269
|
+
*/
|
|
270
|
+
export interface OpenAIResponseOutputMessageWebSearchToolCall {
|
|
271
|
+
id: string;
|
|
272
|
+
|
|
273
|
+
status: string;
|
|
274
|
+
|
|
275
|
+
type?: 'web_search_call';
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* File search tool call output message for OpenAI responses.
|
|
280
|
+
*/
|
|
281
|
+
export interface OpenAIResponseOutputMessageFileSearchToolCall {
|
|
282
|
+
id: string;
|
|
283
|
+
|
|
284
|
+
queries: Array<string>;
|
|
285
|
+
|
|
286
|
+
status: string;
|
|
287
|
+
|
|
288
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
|
|
289
|
+
|
|
290
|
+
type?: 'file_search_call';
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
294
|
+
/**
|
|
295
|
+
* Search results returned by the file search operation.
|
|
296
|
+
*/
|
|
297
|
+
export interface Result {
|
|
298
|
+
attributes: { [key: string]: unknown };
|
|
299
|
+
|
|
300
|
+
file_id: string;
|
|
301
|
+
|
|
302
|
+
filename: string;
|
|
303
|
+
|
|
304
|
+
score: number;
|
|
305
|
+
|
|
306
|
+
text: string;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Function tool call output message for OpenAI responses.
|
|
312
|
+
*/
|
|
313
|
+
export interface OpenAIResponseOutputMessageFunctionToolCall {
|
|
314
|
+
arguments: string;
|
|
315
|
+
|
|
316
|
+
call_id: string;
|
|
317
|
+
|
|
318
|
+
name: string;
|
|
319
|
+
|
|
320
|
+
id?: string | null;
|
|
321
|
+
|
|
322
|
+
status?: string | null;
|
|
323
|
+
|
|
324
|
+
type?: 'function_call';
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* This represents the output of a function call that gets passed back to the
|
|
329
|
+
* model.
|
|
330
|
+
*/
|
|
331
|
+
export interface OpenAIResponseInputFunctionToolCallOutput {
|
|
332
|
+
call_id: string;
|
|
333
|
+
|
|
334
|
+
output: string;
|
|
335
|
+
|
|
336
|
+
id?: string | null;
|
|
337
|
+
|
|
338
|
+
status?: string | null;
|
|
339
|
+
|
|
340
|
+
type?: 'function_call_output';
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* A request for human approval of a tool invocation.
|
|
345
|
+
*/
|
|
346
|
+
export interface OpenAIResponseMcpApprovalRequest {
|
|
347
|
+
id: string;
|
|
348
|
+
|
|
349
|
+
arguments: string;
|
|
350
|
+
|
|
351
|
+
name: string;
|
|
352
|
+
|
|
353
|
+
server_label: string;
|
|
354
|
+
|
|
355
|
+
type?: 'mcp_approval_request';
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* A response to an MCP approval request.
|
|
360
|
+
*/
|
|
361
|
+
export interface OpenAIResponseMcpApprovalResponse {
|
|
362
|
+
approval_request_id: string;
|
|
363
|
+
|
|
364
|
+
approve: boolean;
|
|
365
|
+
|
|
366
|
+
id?: string | null;
|
|
367
|
+
|
|
368
|
+
reason?: string | null;
|
|
369
|
+
|
|
370
|
+
type?: 'mcp_approval_response';
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Model Context Protocol (MCP) call output message for OpenAI responses.
|
|
375
|
+
*/
|
|
376
|
+
export interface OpenAIResponseOutputMessageMcpCall {
|
|
377
|
+
id: string;
|
|
378
|
+
|
|
379
|
+
arguments: string;
|
|
380
|
+
|
|
381
|
+
name: string;
|
|
382
|
+
|
|
383
|
+
server_label: string;
|
|
384
|
+
|
|
385
|
+
error?: string | null;
|
|
386
|
+
|
|
387
|
+
output?: string | null;
|
|
388
|
+
|
|
389
|
+
type?: 'mcp_call';
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* MCP list tools output message containing available tools from an MCP server.
|
|
394
|
+
*/
|
|
395
|
+
export interface OpenAIResponseOutputMessageMcpListTools {
|
|
396
|
+
id: string;
|
|
397
|
+
|
|
398
|
+
server_label: string;
|
|
399
|
+
|
|
400
|
+
tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
|
|
401
|
+
|
|
402
|
+
type?: 'mcp_list_tools';
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export namespace OpenAIResponseOutputMessageMcpListTools {
|
|
406
|
+
/**
|
|
407
|
+
* Tool definition returned by MCP list tools operation.
|
|
408
|
+
*/
|
|
409
|
+
export interface Tool {
|
|
410
|
+
input_schema: { [key: string]: unknown };
|
|
411
|
+
|
|
412
|
+
name: string;
|
|
413
|
+
|
|
414
|
+
description?: string | null;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Corresponds to the various Message types in the Responses API. They are all
|
|
421
|
+
* under one type because the Responses API gives them all the same "type" value,
|
|
422
|
+
* and there is no way to tell them apart in certain scenarios.
|
|
423
|
+
*/
|
|
424
|
+
export type ItemListResponse =
|
|
425
|
+
| ItemListResponse.OpenAIResponseMessageOutput
|
|
426
|
+
| ItemListResponse.OpenAIResponseOutputMessageWebSearchToolCall
|
|
427
|
+
| ItemListResponse.OpenAIResponseOutputMessageFileSearchToolCall
|
|
428
|
+
| ItemListResponse.OpenAIResponseOutputMessageFunctionToolCall
|
|
429
|
+
| ItemListResponse.OpenAIResponseInputFunctionToolCallOutput
|
|
430
|
+
| ItemListResponse.OpenAIResponseMcpApprovalRequest
|
|
431
|
+
| ItemListResponse.OpenAIResponseMcpApprovalResponse
|
|
432
|
+
| ItemListResponse.OpenAIResponseOutputMessageMcpCall
|
|
433
|
+
| ItemListResponse.OpenAIResponseOutputMessageMcpListTools;
|
|
434
|
+
|
|
435
|
+
export namespace ItemListResponse {
|
|
436
|
+
/**
|
|
437
|
+
* Corresponds to the various Message types in the Responses API. They are all
|
|
438
|
+
* under one type because the Responses API gives them all the same "type" value,
|
|
439
|
+
* and there is no way to tell them apart in certain scenarios.
|
|
440
|
+
*/
|
|
441
|
+
export interface OpenAIResponseMessageOutput {
|
|
442
|
+
content:
|
|
443
|
+
| string
|
|
444
|
+
| Array<
|
|
445
|
+
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentText
|
|
446
|
+
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentImage
|
|
447
|
+
| OpenAIResponseMessageOutput.OpenAIResponseInputMessageContentFile
|
|
448
|
+
>
|
|
449
|
+
| Array<
|
|
450
|
+
| OpenAIResponseMessageOutput.OpenAIResponseOutputMessageContentOutputText
|
|
451
|
+
| OpenAIResponseMessageOutput.OpenAIResponseContentPartRefusal
|
|
452
|
+
>;
|
|
453
|
+
|
|
454
|
+
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
455
|
+
|
|
456
|
+
id?: string | null;
|
|
457
|
+
|
|
458
|
+
status?: string | null;
|
|
459
|
+
|
|
460
|
+
type?: 'message';
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
export namespace OpenAIResponseMessageOutput {
|
|
464
|
+
/**
|
|
465
|
+
* Text content for input messages in OpenAI response format.
|
|
466
|
+
*/
|
|
467
|
+
export interface OpenAIResponseInputMessageContentText {
|
|
468
|
+
text: string;
|
|
469
|
+
|
|
470
|
+
type?: 'input_text';
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Image content for input messages in OpenAI response format.
|
|
475
|
+
*/
|
|
476
|
+
export interface OpenAIResponseInputMessageContentImage {
|
|
477
|
+
detail?: 'low' | 'high' | 'auto';
|
|
478
|
+
|
|
479
|
+
file_id?: string | null;
|
|
480
|
+
|
|
481
|
+
image_url?: string | null;
|
|
482
|
+
|
|
483
|
+
type?: 'input_image';
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* File content for input messages in OpenAI response format.
|
|
488
|
+
*/
|
|
489
|
+
export interface OpenAIResponseInputMessageContentFile {
|
|
490
|
+
file_data?: string | null;
|
|
491
|
+
|
|
492
|
+
file_id?: string | null;
|
|
493
|
+
|
|
494
|
+
file_url?: string | null;
|
|
495
|
+
|
|
496
|
+
filename?: string | null;
|
|
497
|
+
|
|
498
|
+
type?: 'input_file';
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface OpenAIResponseOutputMessageContentOutputText {
|
|
502
|
+
text: string;
|
|
503
|
+
|
|
504
|
+
annotations?: Array<
|
|
505
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
|
|
506
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
|
|
507
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
|
|
508
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
|
|
509
|
+
>;
|
|
510
|
+
|
|
511
|
+
type?: 'output_text';
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
export namespace OpenAIResponseOutputMessageContentOutputText {
|
|
515
|
+
/**
|
|
516
|
+
* File citation annotation for referencing specific files in response content.
|
|
517
|
+
*/
|
|
518
|
+
export interface OpenAIResponseAnnotationFileCitation {
|
|
519
|
+
file_id: string;
|
|
520
|
+
|
|
521
|
+
filename: string;
|
|
522
|
+
|
|
523
|
+
index: number;
|
|
524
|
+
|
|
525
|
+
type?: 'file_citation';
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* URL citation annotation for referencing external web resources.
|
|
530
|
+
*/
|
|
531
|
+
export interface OpenAIResponseAnnotationCitation {
|
|
532
|
+
end_index: number;
|
|
533
|
+
|
|
534
|
+
start_index: number;
|
|
535
|
+
|
|
536
|
+
title: string;
|
|
537
|
+
|
|
538
|
+
url: string;
|
|
539
|
+
|
|
540
|
+
type?: 'url_citation';
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
544
|
+
container_id: string;
|
|
545
|
+
|
|
546
|
+
end_index: number;
|
|
547
|
+
|
|
548
|
+
file_id: string;
|
|
549
|
+
|
|
550
|
+
filename: string;
|
|
551
|
+
|
|
552
|
+
start_index: number;
|
|
553
|
+
|
|
554
|
+
type?: 'container_file_citation';
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
export interface OpenAIResponseAnnotationFilePath {
|
|
558
|
+
file_id: string;
|
|
559
|
+
|
|
560
|
+
index: number;
|
|
561
|
+
|
|
562
|
+
type?: 'file_path';
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
/**
|
|
567
|
+
* Refusal content within a streamed response part.
|
|
568
|
+
*/
|
|
569
|
+
export interface OpenAIResponseContentPartRefusal {
|
|
570
|
+
refusal: string;
|
|
571
|
+
|
|
572
|
+
type?: 'refusal';
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Web search tool call output message for OpenAI responses.
|
|
578
|
+
*/
|
|
579
|
+
export interface OpenAIResponseOutputMessageWebSearchToolCall {
|
|
580
|
+
id: string;
|
|
581
|
+
|
|
582
|
+
status: string;
|
|
583
|
+
|
|
584
|
+
type?: 'web_search_call';
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* File search tool call output message for OpenAI responses.
|
|
589
|
+
*/
|
|
590
|
+
export interface OpenAIResponseOutputMessageFileSearchToolCall {
|
|
591
|
+
id: string;
|
|
592
|
+
|
|
593
|
+
queries: Array<string>;
|
|
594
|
+
|
|
595
|
+
status: string;
|
|
596
|
+
|
|
597
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
|
|
598
|
+
|
|
599
|
+
type?: 'file_search_call';
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
603
|
+
/**
|
|
604
|
+
* Search results returned by the file search operation.
|
|
605
|
+
*/
|
|
606
|
+
export interface Result {
|
|
607
|
+
attributes: { [key: string]: unknown };
|
|
608
|
+
|
|
609
|
+
file_id: string;
|
|
610
|
+
|
|
611
|
+
filename: string;
|
|
612
|
+
|
|
613
|
+
score: number;
|
|
614
|
+
|
|
615
|
+
text: string;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Function tool call output message for OpenAI responses.
|
|
621
|
+
*/
|
|
622
|
+
export interface OpenAIResponseOutputMessageFunctionToolCall {
|
|
623
|
+
arguments: string;
|
|
624
|
+
|
|
625
|
+
call_id: string;
|
|
626
|
+
|
|
627
|
+
name: string;
|
|
628
|
+
|
|
629
|
+
id?: string | null;
|
|
630
|
+
|
|
631
|
+
status?: string | null;
|
|
632
|
+
|
|
633
|
+
type?: 'function_call';
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* This represents the output of a function call that gets passed back to the
|
|
638
|
+
* model.
|
|
639
|
+
*/
|
|
640
|
+
export interface OpenAIResponseInputFunctionToolCallOutput {
|
|
641
|
+
call_id: string;
|
|
642
|
+
|
|
643
|
+
output: string;
|
|
644
|
+
|
|
645
|
+
id?: string | null;
|
|
646
|
+
|
|
647
|
+
status?: string | null;
|
|
648
|
+
|
|
649
|
+
type?: 'function_call_output';
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* A request for human approval of a tool invocation.
|
|
654
|
+
*/
|
|
655
|
+
export interface OpenAIResponseMcpApprovalRequest {
|
|
656
|
+
id: string;
|
|
657
|
+
|
|
658
|
+
arguments: string;
|
|
659
|
+
|
|
660
|
+
name: string;
|
|
661
|
+
|
|
662
|
+
server_label: string;
|
|
663
|
+
|
|
664
|
+
type?: 'mcp_approval_request';
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* A response to an MCP approval request.
|
|
669
|
+
*/
|
|
670
|
+
export interface OpenAIResponseMcpApprovalResponse {
|
|
671
|
+
approval_request_id: string;
|
|
672
|
+
|
|
673
|
+
approve: boolean;
|
|
674
|
+
|
|
675
|
+
id?: string | null;
|
|
676
|
+
|
|
677
|
+
reason?: string | null;
|
|
678
|
+
|
|
679
|
+
type?: 'mcp_approval_response';
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Model Context Protocol (MCP) call output message for OpenAI responses.
|
|
684
|
+
*/
|
|
685
|
+
export interface OpenAIResponseOutputMessageMcpCall {
|
|
686
|
+
id: string;
|
|
687
|
+
|
|
688
|
+
arguments: string;
|
|
689
|
+
|
|
690
|
+
name: string;
|
|
691
|
+
|
|
692
|
+
server_label: string;
|
|
693
|
+
|
|
694
|
+
error?: string | null;
|
|
695
|
+
|
|
696
|
+
output?: string | null;
|
|
697
|
+
|
|
698
|
+
type?: 'mcp_call';
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* MCP list tools output message containing available tools from an MCP server.
|
|
703
|
+
*/
|
|
704
|
+
export interface OpenAIResponseOutputMessageMcpListTools {
|
|
705
|
+
id: string;
|
|
706
|
+
|
|
707
|
+
server_label: string;
|
|
708
|
+
|
|
709
|
+
tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
|
|
710
|
+
|
|
711
|
+
type?: 'mcp_list_tools';
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
export namespace OpenAIResponseOutputMessageMcpListTools {
|
|
715
|
+
/**
|
|
716
|
+
* Tool definition returned by MCP list tools operation.
|
|
717
|
+
*/
|
|
718
|
+
export interface Tool {
|
|
719
|
+
input_schema: { [key: string]: unknown };
|
|
720
|
+
|
|
721
|
+
name: string;
|
|
722
|
+
|
|
723
|
+
description?: string | null;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Response for deleted conversation item.
|
|
730
|
+
*/
|
|
731
|
+
export interface ItemDeleteResponse {
|
|
732
|
+
/**
|
|
733
|
+
* The deleted item identifier
|
|
734
|
+
*/
|
|
735
|
+
id: string;
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Whether the object was deleted
|
|
739
|
+
*/
|
|
740
|
+
deleted?: boolean;
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* Object type
|
|
744
|
+
*/
|
|
745
|
+
object?: string;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* Corresponds to the various Message types in the Responses API. They are all
|
|
750
|
+
* under one type because the Responses API gives them all the same "type" value,
|
|
751
|
+
* and there is no way to tell them apart in certain scenarios.
|
|
752
|
+
*/
|
|
753
|
+
export interface ItemGetResponse {
|
|
754
|
+
content:
|
|
755
|
+
| string
|
|
756
|
+
| Array<
|
|
757
|
+
| ItemGetResponse.OpenAIResponseInputMessageContentText
|
|
758
|
+
| ItemGetResponse.OpenAIResponseInputMessageContentImage
|
|
759
|
+
| ItemGetResponse.OpenAIResponseInputMessageContentFile
|
|
760
|
+
>
|
|
761
|
+
| Array<
|
|
762
|
+
| ItemGetResponse.OpenAIResponseOutputMessageContentOutputText
|
|
763
|
+
| ItemGetResponse.OpenAIResponseContentPartRefusal
|
|
764
|
+
>;
|
|
765
|
+
|
|
766
|
+
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
767
|
+
|
|
768
|
+
id?: string | null;
|
|
769
|
+
|
|
770
|
+
status?: string | null;
|
|
771
|
+
|
|
772
|
+
type?: 'message';
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
export namespace ItemGetResponse {
|
|
776
|
+
/**
|
|
777
|
+
* Text content for input messages in OpenAI response format.
|
|
778
|
+
*/
|
|
779
|
+
export interface OpenAIResponseInputMessageContentText {
|
|
780
|
+
text: string;
|
|
781
|
+
|
|
782
|
+
type?: 'input_text';
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Image content for input messages in OpenAI response format.
|
|
787
|
+
*/
|
|
788
|
+
export interface OpenAIResponseInputMessageContentImage {
|
|
789
|
+
detail?: 'low' | 'high' | 'auto';
|
|
790
|
+
|
|
791
|
+
file_id?: string | null;
|
|
792
|
+
|
|
793
|
+
image_url?: string | null;
|
|
794
|
+
|
|
795
|
+
type?: 'input_image';
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* File content for input messages in OpenAI response format.
|
|
800
|
+
*/
|
|
801
|
+
export interface OpenAIResponseInputMessageContentFile {
|
|
802
|
+
file_data?: string | null;
|
|
803
|
+
|
|
804
|
+
file_id?: string | null;
|
|
805
|
+
|
|
806
|
+
file_url?: string | null;
|
|
807
|
+
|
|
808
|
+
filename?: string | null;
|
|
809
|
+
|
|
810
|
+
type?: 'input_file';
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
export interface OpenAIResponseOutputMessageContentOutputText {
|
|
814
|
+
text: string;
|
|
815
|
+
|
|
816
|
+
annotations?: Array<
|
|
817
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
|
|
818
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
|
|
819
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
|
|
820
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
|
|
821
|
+
>;
|
|
822
|
+
|
|
823
|
+
type?: 'output_text';
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
export namespace OpenAIResponseOutputMessageContentOutputText {
|
|
827
|
+
/**
|
|
828
|
+
* File citation annotation for referencing specific files in response content.
|
|
829
|
+
*/
|
|
830
|
+
export interface OpenAIResponseAnnotationFileCitation {
|
|
831
|
+
file_id: string;
|
|
832
|
+
|
|
833
|
+
filename: string;
|
|
834
|
+
|
|
835
|
+
index: number;
|
|
836
|
+
|
|
837
|
+
type?: 'file_citation';
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* URL citation annotation for referencing external web resources.
|
|
842
|
+
*/
|
|
843
|
+
export interface OpenAIResponseAnnotationCitation {
|
|
844
|
+
end_index: number;
|
|
845
|
+
|
|
846
|
+
start_index: number;
|
|
847
|
+
|
|
848
|
+
title: string;
|
|
849
|
+
|
|
850
|
+
url: string;
|
|
851
|
+
|
|
852
|
+
type?: 'url_citation';
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
856
|
+
container_id: string;
|
|
857
|
+
|
|
858
|
+
end_index: number;
|
|
859
|
+
|
|
860
|
+
file_id: string;
|
|
861
|
+
|
|
862
|
+
filename: string;
|
|
863
|
+
|
|
864
|
+
start_index: number;
|
|
865
|
+
|
|
866
|
+
type?: 'container_file_citation';
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export interface OpenAIResponseAnnotationFilePath {
|
|
870
|
+
file_id: string;
|
|
871
|
+
|
|
872
|
+
index: number;
|
|
873
|
+
|
|
874
|
+
type?: 'file_path';
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Refusal content within a streamed response part.
|
|
880
|
+
*/
|
|
881
|
+
export interface OpenAIResponseContentPartRefusal {
|
|
882
|
+
refusal: string;
|
|
883
|
+
|
|
884
|
+
type?: 'refusal';
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
export interface ItemCreateParams {
|
|
889
|
+
items: Array<
|
|
890
|
+
| ItemCreateParams.OpenAIResponseMessageInput
|
|
891
|
+
| ItemCreateParams.OpenAIResponseOutputMessageWebSearchToolCall
|
|
892
|
+
| ItemCreateParams.OpenAIResponseOutputMessageFileSearchToolCall
|
|
893
|
+
| ItemCreateParams.OpenAIResponseOutputMessageFunctionToolCall
|
|
894
|
+
| ItemCreateParams.OpenAIResponseInputFunctionToolCallOutput
|
|
895
|
+
| ItemCreateParams.OpenAIResponseMcpApprovalRequest
|
|
896
|
+
| ItemCreateParams.OpenAIResponseMcpApprovalResponse
|
|
897
|
+
| ItemCreateParams.OpenAIResponseOutputMessageMcpCall
|
|
898
|
+
| ItemCreateParams.OpenAIResponseOutputMessageMcpListTools
|
|
899
|
+
>;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
export namespace ItemCreateParams {
|
|
903
|
+
/**
|
|
904
|
+
* Corresponds to the various Message types in the Responses API. They are all
|
|
905
|
+
* under one type because the Responses API gives them all the same "type" value,
|
|
906
|
+
* and there is no way to tell them apart in certain scenarios.
|
|
907
|
+
*/
|
|
908
|
+
export interface OpenAIResponseMessageInput {
|
|
909
|
+
content:
|
|
910
|
+
| string
|
|
911
|
+
| Array<
|
|
912
|
+
| OpenAIResponseMessageInput.OpenAIResponseInputMessageContentText
|
|
913
|
+
| OpenAIResponseMessageInput.OpenAIResponseInputMessageContentImage
|
|
914
|
+
| OpenAIResponseMessageInput.OpenAIResponseInputMessageContentFile
|
|
915
|
+
>
|
|
916
|
+
| Array<
|
|
917
|
+
| OpenAIResponseMessageInput.OpenAIResponseOutputMessageContentOutputText
|
|
918
|
+
| OpenAIResponseMessageInput.OpenAIResponseContentPartRefusal
|
|
919
|
+
>;
|
|
920
|
+
|
|
921
|
+
role: 'system' | 'developer' | 'user' | 'assistant';
|
|
922
|
+
|
|
923
|
+
id?: string | null;
|
|
924
|
+
|
|
925
|
+
status?: string | null;
|
|
926
|
+
|
|
927
|
+
type?: 'message';
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
export namespace OpenAIResponseMessageInput {
|
|
931
|
+
/**
|
|
932
|
+
* Text content for input messages in OpenAI response format.
|
|
933
|
+
*/
|
|
934
|
+
export interface OpenAIResponseInputMessageContentText {
|
|
935
|
+
text: string;
|
|
936
|
+
|
|
937
|
+
type?: 'input_text';
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Image content for input messages in OpenAI response format.
|
|
942
|
+
*/
|
|
943
|
+
export interface OpenAIResponseInputMessageContentImage {
|
|
944
|
+
detail?: 'low' | 'high' | 'auto';
|
|
945
|
+
|
|
946
|
+
file_id?: string | null;
|
|
947
|
+
|
|
948
|
+
image_url?: string | null;
|
|
949
|
+
|
|
950
|
+
type?: 'input_image';
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/**
|
|
954
|
+
* File content for input messages in OpenAI response format.
|
|
955
|
+
*/
|
|
956
|
+
export interface OpenAIResponseInputMessageContentFile {
|
|
957
|
+
file_data?: string | null;
|
|
958
|
+
|
|
959
|
+
file_id?: string | null;
|
|
960
|
+
|
|
961
|
+
file_url?: string | null;
|
|
962
|
+
|
|
963
|
+
filename?: string | null;
|
|
964
|
+
|
|
965
|
+
type?: 'input_file';
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
export interface OpenAIResponseOutputMessageContentOutputText {
|
|
969
|
+
text: string;
|
|
970
|
+
|
|
971
|
+
annotations?: Array<
|
|
972
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFileCitation
|
|
973
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationCitation
|
|
974
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationContainerFileCitation
|
|
975
|
+
| OpenAIResponseOutputMessageContentOutputText.OpenAIResponseAnnotationFilePath
|
|
976
|
+
>;
|
|
977
|
+
|
|
978
|
+
type?: 'output_text';
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
export namespace OpenAIResponseOutputMessageContentOutputText {
|
|
982
|
+
/**
|
|
983
|
+
* File citation annotation for referencing specific files in response content.
|
|
984
|
+
*/
|
|
985
|
+
export interface OpenAIResponseAnnotationFileCitation {
|
|
986
|
+
file_id: string;
|
|
987
|
+
|
|
988
|
+
filename: string;
|
|
989
|
+
|
|
990
|
+
index: number;
|
|
991
|
+
|
|
992
|
+
type?: 'file_citation';
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* URL citation annotation for referencing external web resources.
|
|
997
|
+
*/
|
|
998
|
+
export interface OpenAIResponseAnnotationCitation {
|
|
999
|
+
end_index: number;
|
|
1000
|
+
|
|
1001
|
+
start_index: number;
|
|
1002
|
+
|
|
1003
|
+
title: string;
|
|
1004
|
+
|
|
1005
|
+
url: string;
|
|
1006
|
+
|
|
1007
|
+
type?: 'url_citation';
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
1011
|
+
container_id: string;
|
|
1012
|
+
|
|
1013
|
+
end_index: number;
|
|
1014
|
+
|
|
1015
|
+
file_id: string;
|
|
1016
|
+
|
|
1017
|
+
filename: string;
|
|
1018
|
+
|
|
1019
|
+
start_index: number;
|
|
1020
|
+
|
|
1021
|
+
type?: 'container_file_citation';
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
export interface OpenAIResponseAnnotationFilePath {
|
|
1025
|
+
file_id: string;
|
|
1026
|
+
|
|
1027
|
+
index: number;
|
|
1028
|
+
|
|
1029
|
+
type?: 'file_path';
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Refusal content within a streamed response part.
|
|
1035
|
+
*/
|
|
1036
|
+
export interface OpenAIResponseContentPartRefusal {
|
|
1037
|
+
refusal: string;
|
|
1038
|
+
|
|
1039
|
+
type?: 'refusal';
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Web search tool call output message for OpenAI responses.
|
|
1045
|
+
*/
|
|
1046
|
+
export interface OpenAIResponseOutputMessageWebSearchToolCall {
|
|
1047
|
+
id: string;
|
|
1048
|
+
|
|
1049
|
+
status: string;
|
|
1050
|
+
|
|
1051
|
+
type?: 'web_search_call';
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* File search tool call output message for OpenAI responses.
|
|
1056
|
+
*/
|
|
1057
|
+
export interface OpenAIResponseOutputMessageFileSearchToolCall {
|
|
1058
|
+
id: string;
|
|
1059
|
+
|
|
1060
|
+
queries: Array<string>;
|
|
1061
|
+
|
|
1062
|
+
status: string;
|
|
1063
|
+
|
|
1064
|
+
results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result> | null;
|
|
1065
|
+
|
|
1066
|
+
type?: 'file_search_call';
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
export namespace OpenAIResponseOutputMessageFileSearchToolCall {
|
|
1070
|
+
/**
|
|
1071
|
+
* Search results returned by the file search operation.
|
|
1072
|
+
*/
|
|
1073
|
+
export interface Result {
|
|
1074
|
+
attributes: { [key: string]: unknown };
|
|
1075
|
+
|
|
1076
|
+
file_id: string;
|
|
1077
|
+
|
|
1078
|
+
filename: string;
|
|
1079
|
+
|
|
1080
|
+
score: number;
|
|
1081
|
+
|
|
1082
|
+
text: string;
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* Function tool call output message for OpenAI responses.
|
|
1088
|
+
*/
|
|
1089
|
+
export interface OpenAIResponseOutputMessageFunctionToolCall {
|
|
1090
|
+
arguments: string;
|
|
1091
|
+
|
|
1092
|
+
call_id: string;
|
|
1093
|
+
|
|
1094
|
+
name: string;
|
|
1095
|
+
|
|
1096
|
+
id?: string | null;
|
|
1097
|
+
|
|
1098
|
+
status?: string | null;
|
|
1099
|
+
|
|
1100
|
+
type?: 'function_call';
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* This represents the output of a function call that gets passed back to the
|
|
1105
|
+
* model.
|
|
1106
|
+
*/
|
|
1107
|
+
export interface OpenAIResponseInputFunctionToolCallOutput {
|
|
1108
|
+
call_id: string;
|
|
1109
|
+
|
|
1110
|
+
output: string;
|
|
1111
|
+
|
|
1112
|
+
id?: string | null;
|
|
1113
|
+
|
|
1114
|
+
status?: string | null;
|
|
1115
|
+
|
|
1116
|
+
type?: 'function_call_output';
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* A request for human approval of a tool invocation.
|
|
1121
|
+
*/
|
|
1122
|
+
export interface OpenAIResponseMcpApprovalRequest {
|
|
1123
|
+
id: string;
|
|
1124
|
+
|
|
1125
|
+
arguments: string;
|
|
1126
|
+
|
|
1127
|
+
name: string;
|
|
1128
|
+
|
|
1129
|
+
server_label: string;
|
|
1130
|
+
|
|
1131
|
+
type?: 'mcp_approval_request';
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* A response to an MCP approval request.
|
|
1136
|
+
*/
|
|
1137
|
+
export interface OpenAIResponseMcpApprovalResponse {
|
|
1138
|
+
approval_request_id: string;
|
|
1139
|
+
|
|
1140
|
+
approve: boolean;
|
|
1141
|
+
|
|
1142
|
+
id?: string | null;
|
|
1143
|
+
|
|
1144
|
+
reason?: string | null;
|
|
1145
|
+
|
|
1146
|
+
type?: 'mcp_approval_response';
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* Model Context Protocol (MCP) call output message for OpenAI responses.
|
|
1151
|
+
*/
|
|
1152
|
+
export interface OpenAIResponseOutputMessageMcpCall {
|
|
1153
|
+
id: string;
|
|
1154
|
+
|
|
1155
|
+
arguments: string;
|
|
1156
|
+
|
|
1157
|
+
name: string;
|
|
1158
|
+
|
|
1159
|
+
server_label: string;
|
|
1160
|
+
|
|
1161
|
+
error?: string | null;
|
|
1162
|
+
|
|
1163
|
+
output?: string | null;
|
|
1164
|
+
|
|
1165
|
+
type?: 'mcp_call';
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* MCP list tools output message containing available tools from an MCP server.
|
|
1170
|
+
*/
|
|
1171
|
+
export interface OpenAIResponseOutputMessageMcpListTools {
|
|
1172
|
+
id: string;
|
|
1173
|
+
|
|
1174
|
+
server_label: string;
|
|
1175
|
+
|
|
1176
|
+
tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
|
|
1177
|
+
|
|
1178
|
+
type?: 'mcp_list_tools';
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
export namespace OpenAIResponseOutputMessageMcpListTools {
|
|
1182
|
+
/**
|
|
1183
|
+
* Tool definition returned by MCP list tools operation.
|
|
1184
|
+
*/
|
|
1185
|
+
export interface Tool {
|
|
1186
|
+
input_schema: { [key: string]: unknown };
|
|
1187
|
+
|
|
1188
|
+
name: string;
|
|
1189
|
+
|
|
1190
|
+
description?: string | null;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
export interface ItemListParams extends OpenAICursorPageParams {
|
|
1196
|
+
include?: Array<
|
|
1197
|
+
| 'web_search_call.action.sources'
|
|
1198
|
+
| 'code_interpreter_call.outputs'
|
|
1199
|
+
| 'computer_call_output.output.image_url'
|
|
1200
|
+
| 'file_search_call.results'
|
|
1201
|
+
| 'message.input_image.image_url'
|
|
1202
|
+
| 'message.output_text.logprobs'
|
|
1203
|
+
| 'reasoning.encrypted_content'
|
|
1204
|
+
> | null;
|
|
1205
|
+
|
|
1206
|
+
order?: 'asc' | 'desc' | null;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
Items.ItemListResponsesOpenAICursorPage = ItemListResponsesOpenAICursorPage;
|
|
1210
|
+
|
|
1211
|
+
export declare namespace Items {
|
|
1212
|
+
export {
|
|
1213
|
+
type ItemCreateResponse as ItemCreateResponse,
|
|
1214
|
+
type ItemListResponse as ItemListResponse,
|
|
1215
|
+
type ItemDeleteResponse as ItemDeleteResponse,
|
|
1216
|
+
type ItemGetResponse as ItemGetResponse,
|
|
1217
|
+
ItemListResponsesOpenAICursorPage as ItemListResponsesOpenAICursorPage,
|
|
1218
|
+
type ItemCreateParams as ItemCreateParams,
|
|
1219
|
+
type ItemListParams as ItemListParams,
|
|
1220
|
+
};
|
|
1221
|
+
}
|