llama-stack-client 0.3.5 → 0.4.0-rc2
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 +48 -39
- 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 +33 -54
- package/index.d.ts +33 -54
- 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 +7 -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/admin.d.ts +41 -0
- package/resources/alpha/admin.d.ts.map +1 -0
- package/resources/alpha/admin.js +46 -0
- package/resources/alpha/admin.js.map +1 -0
- package/resources/alpha/admin.mjs +42 -0
- package/resources/alpha/admin.mjs.map +1 -0
- package/resources/alpha/alpha.d.ts +26 -0
- package/resources/alpha/alpha.d.ts.map +1 -0
- package/resources/alpha/alpha.js +61 -0
- package/resources/alpha/alpha.js.map +1 -0
- package/resources/alpha/alpha.mjs +34 -0
- package/resources/alpha/alpha.mjs.map +1 -0
- package/resources/{benchmarks.d.ts → alpha/benchmarks.d.ts} +41 -15
- 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 +7 -0
- package/resources/alpha/index.d.ts.map +1 -0
- package/resources/alpha/index.js +23 -0
- package/resources/alpha/index.js.map +1 -0
- package/resources/alpha/index.mjs +14 -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.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 +113 -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 +245 -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/{datasets.d.ts → beta/datasets.d.ts} +117 -99
- 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 +75 -80
- 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 +760 -1406
- 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 +54 -97
- 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 +320 -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 +874 -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 +11 -15
- 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 +3 -71
- package/resources/inspect.d.ts.map +1 -1
- package/resources/inspect.js +2 -1
- package/resources/inspect.js.map +1 -1
- package/resources/inspect.mjs +2 -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 -13
- package/resources/providers.d.ts.map +1 -1
- package/resources/providers.js +2 -1
- package/resources/providers.js.map +1 -1
- package/resources/providers.mjs +2 -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 +246 -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 +1841 -1455
- 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 +11 -10
- 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 +173 -591
- 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 +92 -267
- package/src/lib/response-helpers.ts +60 -0
- package/src/pagination.ts +2 -5
- package/src/resource.ts +1 -0
- package/src/resources/alpha/admin.ts +84 -0
- package/src/resources/alpha/alpha.ts +93 -0
- package/src/resources/{benchmarks.ts → alpha/benchmarks.ts} +51 -16
- 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 +36 -0
- package/src/resources/alpha/inference.ts +132 -0
- package/src/resources/{post-training → alpha/post-training}/index.ts +1 -1
- package/src/resources/alpha/post-training/job.ts +177 -0
- package/src/resources/alpha/post-training/post-training.ts +372 -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/{datasets.ts → beta/datasets.ts} +128 -110
- package/src/resources/beta/index.ts +20 -0
- package/src/resources/{agents.ts → beta.ts} +2 -2
- package/src/resources/chat/chat.ts +84 -83
- package/src/resources/chat/completions.ts +876 -1486
- package/src/resources/chat/index.ts +1 -2
- package/src/resources/chat.ts +1 -1
- package/src/resources/completions.ts +59 -103
- package/src/resources/conversations/conversations.ts +491 -0
- package/src/resources/conversations/index.ts +25 -0
- package/src/resources/conversations/items.ts +1365 -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 +35 -111
- package/src/resources/inspect.ts +4 -84
- 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 -18
- package/src/resources/responses/index.ts +1 -1
- package/src/resources/responses/input-items.ts +365 -161
- package/src/resources/responses/responses.ts +2959 -1870
- package/src/resources/responses.ts +1 -1
- package/src/resources/routes.ts +25 -14
- 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 +187 -665
- 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.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +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.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.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/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 → alpha/post-training}/index.d.ts +0 -0
- /package/resources/{post-training.d.ts → alpha/post-training.d.ts} +0 -0
package/src/resources/shared.ts
CHANGED
|
@@ -3,303 +3,62 @@
|
|
|
3
3
|
//
|
|
4
4
|
// This source code is licensed under the terms described in the LICENSE file in
|
|
5
5
|
// the root directory of this source tree.
|
|
6
|
-
|
|
6
|
+
//
|
|
7
7
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8
8
|
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
11
|
-
import * as ToolRuntimeAPI from './tool-runtime/tool-runtime';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Configuration for an agent.
|
|
15
|
-
*/
|
|
16
|
-
export interface AgentConfig {
|
|
17
|
-
/**
|
|
18
|
-
* The system instructions for the agent
|
|
19
|
-
*/
|
|
20
|
-
instructions: string;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* The model identifier to use for the agent
|
|
24
|
-
*/
|
|
25
|
-
model: string;
|
|
26
|
-
|
|
27
|
-
client_tools?: Array<ToolRuntimeAPI.ToolDef>;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Optional flag indicating whether session data has to be persisted
|
|
31
|
-
*/
|
|
32
|
-
enable_session_persistence?: boolean;
|
|
33
|
-
|
|
34
|
-
input_shields?: Array<string>;
|
|
35
|
-
|
|
36
|
-
max_infer_iters?: number;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Optional name for the agent, used in telemetry and identification
|
|
40
|
-
*/
|
|
41
|
-
name?: string;
|
|
42
|
-
|
|
43
|
-
output_shields?: Array<string>;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Optional response format configuration
|
|
47
|
-
*/
|
|
48
|
-
response_format?: ResponseFormat;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Sampling parameters.
|
|
52
|
-
*/
|
|
53
|
-
sampling_params?: SamplingParams;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @deprecated Whether tool use is required or automatic. This is a hint to the
|
|
57
|
-
* model which may not be followed. It depends on the Instruction Following
|
|
58
|
-
* capabilities of the model.
|
|
59
|
-
*/
|
|
60
|
-
tool_choice?: 'auto' | 'required' | 'none';
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Configuration for tool use.
|
|
64
|
-
*/
|
|
65
|
-
tool_config?: AgentConfig.ToolConfig;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated Prompt format for calling custom / zero shot tools.
|
|
69
|
-
*/
|
|
70
|
-
tool_prompt_format?: 'json' | 'function_tag' | 'python_list';
|
|
71
|
-
|
|
72
|
-
toolgroups?: Array<string | AgentConfig.AgentToolGroupWithArgs>;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export namespace AgentConfig {
|
|
76
|
-
/**
|
|
77
|
-
* Configuration for tool use.
|
|
78
|
-
*/
|
|
79
|
-
export interface ToolConfig {
|
|
80
|
-
/**
|
|
81
|
-
* (Optional) Config for how to override the default system prompt. -
|
|
82
|
-
* `SystemMessageBehavior.append`: Appends the provided system message to the
|
|
83
|
-
* default system prompt. - `SystemMessageBehavior.replace`: Replaces the default
|
|
84
|
-
* system prompt with the provided system message. The system message can include
|
|
85
|
-
* the string '{{function_definitions}}' to indicate where the function definitions
|
|
86
|
-
* should be inserted.
|
|
87
|
-
*/
|
|
88
|
-
system_message_behavior?: 'append' | 'replace';
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* (Optional) Whether tool use is automatic, required, or none. Can also specify a
|
|
92
|
-
* tool name to use a specific tool. Defaults to ToolChoice.auto.
|
|
93
|
-
*/
|
|
94
|
-
tool_choice?: 'auto' | 'required' | 'none' | (string & {});
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* (Optional) Instructs the model how to format tool calls. By default, Llama Stack
|
|
98
|
-
* will attempt to use a format that is best adapted to the model. -
|
|
99
|
-
* `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. -
|
|
100
|
-
* `ToolPromptFormat.function_tag`: The tool calls are enclosed in a
|
|
101
|
-
* <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls
|
|
102
|
-
* are output as Python syntax -- a list of function calls.
|
|
103
|
-
*/
|
|
104
|
-
tool_prompt_format?: 'json' | 'function_tag' | 'python_list';
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export interface AgentToolGroupWithArgs {
|
|
108
|
-
args: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
109
|
-
|
|
110
|
-
name: string;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Response from a batch completion request.
|
|
116
|
-
*/
|
|
117
|
-
export interface BatchCompletion {
|
|
118
|
-
/**
|
|
119
|
-
* List of completion responses, one for each input in the batch
|
|
120
|
-
*/
|
|
121
|
-
batch: Array<InferenceAPI.CompletionResponse>;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Response from a chat completion request.
|
|
126
|
-
*/
|
|
127
|
-
export interface ChatCompletionResponse {
|
|
128
|
-
/**
|
|
129
|
-
* The complete response message
|
|
130
|
-
*/
|
|
131
|
-
completion_message: CompletionMessage;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Optional log probabilities for generated tokens
|
|
135
|
-
*/
|
|
136
|
-
logprobs?: Array<InferenceAPI.TokenLogProbs>;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* (Optional) List of metrics associated with the API response
|
|
140
|
-
*/
|
|
141
|
-
metrics?: Array<Metric>;
|
|
142
|
-
}
|
|
9
|
+
import * as ProvidersAPI from './providers';
|
|
10
|
+
import * as RoutesAPI from './routes';
|
|
143
11
|
|
|
144
12
|
/**
|
|
145
|
-
*
|
|
13
|
+
* Health status information for the service.
|
|
146
14
|
*/
|
|
147
|
-
export interface
|
|
148
|
-
/**
|
|
149
|
-
* The content of the model's response
|
|
150
|
-
*/
|
|
151
|
-
content: InterleavedContent;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Must be "assistant" to identify this as the model's response
|
|
155
|
-
*/
|
|
156
|
-
role: 'assistant';
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Reason why the model stopped generating. Options are: -
|
|
160
|
-
* `StopReason.end_of_turn`: The model finished generating the entire response. -
|
|
161
|
-
* `StopReason.end_of_message`: The model finished generating but generated a
|
|
162
|
-
* partial response -- usually, a tool call. The user may call the tool and
|
|
163
|
-
* continue the conversation with the tool's response. -
|
|
164
|
-
* `StopReason.out_of_tokens`: The model ran out of token budget.
|
|
165
|
-
*/
|
|
166
|
-
stop_reason: 'end_of_turn' | 'end_of_message' | 'out_of_tokens';
|
|
167
|
-
|
|
15
|
+
export interface HealthInfo {
|
|
168
16
|
/**
|
|
169
|
-
*
|
|
17
|
+
* The health status of the service
|
|
170
18
|
*/
|
|
171
|
-
|
|
19
|
+
status: 'OK' | 'Error' | 'Not Implemented';
|
|
172
20
|
}
|
|
173
21
|
|
|
174
22
|
/**
|
|
175
|
-
* A
|
|
176
|
-
*/
|
|
177
|
-
export type ContentDelta = ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.ToolCallDelta;
|
|
178
|
-
|
|
179
|
-
export namespace ContentDelta {
|
|
180
|
-
/**
|
|
181
|
-
* A text content delta for streaming responses.
|
|
182
|
-
*/
|
|
183
|
-
export interface TextDelta {
|
|
184
|
-
/**
|
|
185
|
-
* The incremental text content
|
|
186
|
-
*/
|
|
187
|
-
text: string;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Discriminator type of the delta. Always "text"
|
|
191
|
-
*/
|
|
192
|
-
type: 'text';
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* An image content delta for streaming responses.
|
|
197
|
-
*/
|
|
198
|
-
export interface ImageDelta {
|
|
199
|
-
/**
|
|
200
|
-
* The incremental image data as bytes
|
|
201
|
-
*/
|
|
202
|
-
image: string;
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Discriminator type of the delta. Always "image"
|
|
206
|
-
*/
|
|
207
|
-
type: 'image';
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* A tool call content delta for streaming responses.
|
|
212
|
-
*/
|
|
213
|
-
export interface ToolCallDelta {
|
|
214
|
-
/**
|
|
215
|
-
* Current parsing status of the tool call
|
|
216
|
-
*/
|
|
217
|
-
parse_status: 'started' | 'in_progress' | 'failed' | 'succeeded';
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Either an in-progress tool call string or the final parsed tool call
|
|
221
|
-
*/
|
|
222
|
-
tool_call: string | Shared.ToolCall;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Discriminator type of the delta. Always "tool_call"
|
|
226
|
-
*/
|
|
227
|
-
type: 'tool_call';
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* A document to be used for document ingestion in the RAG Tool.
|
|
23
|
+
* A image content item
|
|
233
24
|
*/
|
|
234
|
-
export
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
| string
|
|
240
|
-
| Document.ImageContentItem
|
|
241
|
-
| Document.TextContentItem
|
|
242
|
-
| Array<InterleavedContentItem>
|
|
243
|
-
| Document.URL;
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* The unique identifier for the document.
|
|
247
|
-
*/
|
|
248
|
-
document_id: string;
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Additional metadata for the document.
|
|
252
|
-
*/
|
|
253
|
-
metadata: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* The MIME type of the document.
|
|
257
|
-
*/
|
|
258
|
-
mime_type?: string;
|
|
259
|
-
}
|
|
25
|
+
export type InterleavedContent =
|
|
26
|
+
| string
|
|
27
|
+
| InterleavedContent.ImageContentItem
|
|
28
|
+
| InterleavedContent.TextContentItem
|
|
29
|
+
| Array<InterleavedContent.ImageContentItem | InterleavedContent.TextContentItem>;
|
|
260
30
|
|
|
261
|
-
export namespace
|
|
31
|
+
export namespace InterleavedContent {
|
|
262
32
|
/**
|
|
263
33
|
* A image content item
|
|
264
34
|
*/
|
|
265
35
|
export interface ImageContentItem {
|
|
266
36
|
/**
|
|
267
|
-
*
|
|
37
|
+
* A URL or a base64 encoded string
|
|
268
38
|
*/
|
|
269
39
|
image: ImageContentItem.Image;
|
|
270
40
|
|
|
271
|
-
|
|
272
|
-
* Discriminator type of the content item. Always "image"
|
|
273
|
-
*/
|
|
274
|
-
type: 'image';
|
|
41
|
+
type?: 'image';
|
|
275
42
|
}
|
|
276
43
|
|
|
277
44
|
export namespace ImageContentItem {
|
|
278
45
|
/**
|
|
279
|
-
*
|
|
46
|
+
* A URL or a base64 encoded string
|
|
280
47
|
*/
|
|
281
48
|
export interface Image {
|
|
282
|
-
|
|
283
|
-
* base64 encoded image data as string
|
|
284
|
-
*/
|
|
285
|
-
data?: string;
|
|
49
|
+
data?: string | null;
|
|
286
50
|
|
|
287
51
|
/**
|
|
288
|
-
* A URL
|
|
289
|
-
* Note that URL could have length limits.
|
|
52
|
+
* A URL reference to external content.
|
|
290
53
|
*/
|
|
291
|
-
url?: Image.URL;
|
|
54
|
+
url?: Image.URL | null;
|
|
292
55
|
}
|
|
293
56
|
|
|
294
57
|
export namespace Image {
|
|
295
58
|
/**
|
|
296
|
-
* A URL
|
|
297
|
-
* Note that URL could have length limits.
|
|
59
|
+
* A URL reference to external content.
|
|
298
60
|
*/
|
|
299
61
|
export interface URL {
|
|
300
|
-
/**
|
|
301
|
-
* The URL string pointing to the resource
|
|
302
|
-
*/
|
|
303
62
|
uri: string;
|
|
304
63
|
}
|
|
305
64
|
}
|
|
@@ -309,79 +68,41 @@ export namespace Document {
|
|
|
309
68
|
* A text content item
|
|
310
69
|
*/
|
|
311
70
|
export interface TextContentItem {
|
|
312
|
-
/**
|
|
313
|
-
* Text content
|
|
314
|
-
*/
|
|
315
71
|
text: string;
|
|
316
72
|
|
|
317
|
-
|
|
318
|
-
* Discriminator type of the content item. Always "text"
|
|
319
|
-
*/
|
|
320
|
-
type: 'text';
|
|
73
|
+
type?: 'text';
|
|
321
74
|
}
|
|
322
75
|
|
|
323
|
-
/**
|
|
324
|
-
* A URL reference to external content.
|
|
325
|
-
*/
|
|
326
|
-
export interface URL {
|
|
327
|
-
/**
|
|
328
|
-
* The URL string pointing to the resource
|
|
329
|
-
*/
|
|
330
|
-
uri: string;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* A image content item
|
|
336
|
-
*/
|
|
337
|
-
export type InterleavedContent =
|
|
338
|
-
| string
|
|
339
|
-
| InterleavedContent.ImageContentItem
|
|
340
|
-
| InterleavedContent.TextContentItem
|
|
341
|
-
| Array<InterleavedContentItem>;
|
|
342
|
-
|
|
343
|
-
export namespace InterleavedContent {
|
|
344
76
|
/**
|
|
345
77
|
* A image content item
|
|
346
78
|
*/
|
|
347
79
|
export interface ImageContentItem {
|
|
348
80
|
/**
|
|
349
|
-
*
|
|
81
|
+
* A URL or a base64 encoded string
|
|
350
82
|
*/
|
|
351
83
|
image: ImageContentItem.Image;
|
|
352
84
|
|
|
353
|
-
|
|
354
|
-
* Discriminator type of the content item. Always "image"
|
|
355
|
-
*/
|
|
356
|
-
type: 'image';
|
|
85
|
+
type?: 'image';
|
|
357
86
|
}
|
|
358
87
|
|
|
359
88
|
export namespace ImageContentItem {
|
|
360
89
|
/**
|
|
361
|
-
*
|
|
90
|
+
* A URL or a base64 encoded string
|
|
362
91
|
*/
|
|
363
92
|
export interface Image {
|
|
364
|
-
|
|
365
|
-
* base64 encoded image data as string
|
|
366
|
-
*/
|
|
367
|
-
data?: string;
|
|
93
|
+
data?: string | null;
|
|
368
94
|
|
|
369
95
|
/**
|
|
370
|
-
* A URL
|
|
371
|
-
* Note that URL could have length limits.
|
|
96
|
+
* A URL reference to external content.
|
|
372
97
|
*/
|
|
373
|
-
url?: Image.URL;
|
|
98
|
+
url?: Image.URL | null;
|
|
374
99
|
}
|
|
375
100
|
|
|
376
101
|
export namespace Image {
|
|
377
102
|
/**
|
|
378
|
-
* A URL
|
|
379
|
-
* Note that URL could have length limits.
|
|
103
|
+
* A URL reference to external content.
|
|
380
104
|
*/
|
|
381
105
|
export interface URL {
|
|
382
|
-
/**
|
|
383
|
-
* The URL string pointing to the resource
|
|
384
|
-
*/
|
|
385
106
|
uri: string;
|
|
386
107
|
}
|
|
387
108
|
}
|
|
@@ -391,15 +112,9 @@ export namespace InterleavedContent {
|
|
|
391
112
|
* A text content item
|
|
392
113
|
*/
|
|
393
114
|
export interface TextContentItem {
|
|
394
|
-
/**
|
|
395
|
-
* Text content
|
|
396
|
-
*/
|
|
397
115
|
text: string;
|
|
398
116
|
|
|
399
|
-
|
|
400
|
-
* Discriminator type of the content item. Always "text"
|
|
401
|
-
*/
|
|
402
|
-
type: 'text';
|
|
117
|
+
type?: 'text';
|
|
403
118
|
}
|
|
404
119
|
}
|
|
405
120
|
|
|
@@ -416,42 +131,31 @@ export namespace InterleavedContentItem {
|
|
|
416
131
|
*/
|
|
417
132
|
export interface ImageContentItem {
|
|
418
133
|
/**
|
|
419
|
-
*
|
|
134
|
+
* A URL or a base64 encoded string
|
|
420
135
|
*/
|
|
421
136
|
image: ImageContentItem.Image;
|
|
422
137
|
|
|
423
|
-
|
|
424
|
-
* Discriminator type of the content item. Always "image"
|
|
425
|
-
*/
|
|
426
|
-
type: 'image';
|
|
138
|
+
type?: 'image';
|
|
427
139
|
}
|
|
428
140
|
|
|
429
141
|
export namespace ImageContentItem {
|
|
430
142
|
/**
|
|
431
|
-
*
|
|
143
|
+
* A URL or a base64 encoded string
|
|
432
144
|
*/
|
|
433
145
|
export interface Image {
|
|
434
|
-
|
|
435
|
-
* base64 encoded image data as string
|
|
436
|
-
*/
|
|
437
|
-
data?: string;
|
|
146
|
+
data?: string | null;
|
|
438
147
|
|
|
439
148
|
/**
|
|
440
|
-
* A URL
|
|
441
|
-
* Note that URL could have length limits.
|
|
149
|
+
* A URL reference to external content.
|
|
442
150
|
*/
|
|
443
|
-
url?: Image.URL;
|
|
151
|
+
url?: Image.URL | null;
|
|
444
152
|
}
|
|
445
153
|
|
|
446
154
|
export namespace Image {
|
|
447
155
|
/**
|
|
448
|
-
* A URL
|
|
449
|
-
* Note that URL could have length limits.
|
|
156
|
+
* A URL reference to external content.
|
|
450
157
|
*/
|
|
451
158
|
export interface URL {
|
|
452
|
-
/**
|
|
453
|
-
* The URL string pointing to the resource
|
|
454
|
-
*/
|
|
455
159
|
uri: string;
|
|
456
160
|
}
|
|
457
161
|
}
|
|
@@ -461,41 +165,30 @@ export namespace InterleavedContentItem {
|
|
|
461
165
|
* A text content item
|
|
462
166
|
*/
|
|
463
167
|
export interface TextContentItem {
|
|
464
|
-
/**
|
|
465
|
-
* Text content
|
|
466
|
-
*/
|
|
467
168
|
text: string;
|
|
468
169
|
|
|
469
|
-
|
|
470
|
-
* Discriminator type of the content item. Always "text"
|
|
471
|
-
*/
|
|
472
|
-
type: 'text';
|
|
170
|
+
type?: 'text';
|
|
473
171
|
}
|
|
474
172
|
}
|
|
475
173
|
|
|
476
174
|
/**
|
|
477
|
-
*
|
|
478
|
-
*/
|
|
479
|
-
export type Message = UserMessage | SystemMessage | ToolResponseMessage | CompletionMessage;
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* A metric value included in API responses.
|
|
175
|
+
* Response containing a list of all available providers.
|
|
483
176
|
*/
|
|
484
|
-
export interface
|
|
177
|
+
export interface ListProvidersResponse {
|
|
485
178
|
/**
|
|
486
|
-
*
|
|
179
|
+
* List of provider information objects
|
|
487
180
|
*/
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* The numeric value of the metric
|
|
492
|
-
*/
|
|
493
|
-
value: number;
|
|
181
|
+
data: ProvidersAPI.ProviderListResponse;
|
|
182
|
+
}
|
|
494
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Response containing a list of all available API routes.
|
|
186
|
+
*/
|
|
187
|
+
export interface ListRoutesResponse {
|
|
495
188
|
/**
|
|
496
|
-
*
|
|
189
|
+
* List of available API routes
|
|
497
190
|
*/
|
|
498
|
-
|
|
191
|
+
data: RoutesAPI.RouteListResponse;
|
|
499
192
|
}
|
|
500
193
|
|
|
501
194
|
/**
|
|
@@ -510,279 +203,123 @@ export type ParamType =
|
|
|
510
203
|
| ParamType.JsonType
|
|
511
204
|
| ParamType.UnionType
|
|
512
205
|
| ParamType.ChatCompletionInputType
|
|
513
|
-
| ParamType.CompletionInputType
|
|
514
|
-
| ParamType.AgentTurnInputType;
|
|
206
|
+
| ParamType.CompletionInputType;
|
|
515
207
|
|
|
516
208
|
export namespace ParamType {
|
|
517
209
|
/**
|
|
518
210
|
* Parameter type for string values.
|
|
519
211
|
*/
|
|
520
212
|
export interface StringType {
|
|
521
|
-
|
|
522
|
-
* Discriminator type. Always "string"
|
|
523
|
-
*/
|
|
524
|
-
type: 'string';
|
|
213
|
+
type?: 'string';
|
|
525
214
|
}
|
|
526
215
|
|
|
527
216
|
/**
|
|
528
217
|
* Parameter type for numeric values.
|
|
529
218
|
*/
|
|
530
219
|
export interface NumberType {
|
|
531
|
-
|
|
532
|
-
* Discriminator type. Always "number"
|
|
533
|
-
*/
|
|
534
|
-
type: 'number';
|
|
220
|
+
type?: 'number';
|
|
535
221
|
}
|
|
536
222
|
|
|
537
223
|
/**
|
|
538
224
|
* Parameter type for boolean values.
|
|
539
225
|
*/
|
|
540
226
|
export interface BooleanType {
|
|
541
|
-
|
|
542
|
-
* Discriminator type. Always "boolean"
|
|
543
|
-
*/
|
|
544
|
-
type: 'boolean';
|
|
227
|
+
type?: 'boolean';
|
|
545
228
|
}
|
|
546
229
|
|
|
547
230
|
/**
|
|
548
231
|
* Parameter type for array values.
|
|
549
232
|
*/
|
|
550
233
|
export interface ArrayType {
|
|
551
|
-
|
|
552
|
-
* Discriminator type. Always "array"
|
|
553
|
-
*/
|
|
554
|
-
type: 'array';
|
|
234
|
+
type?: 'array';
|
|
555
235
|
}
|
|
556
236
|
|
|
557
237
|
/**
|
|
558
238
|
* Parameter type for object values.
|
|
559
239
|
*/
|
|
560
240
|
export interface ObjectType {
|
|
561
|
-
|
|
562
|
-
* Discriminator type. Always "object"
|
|
563
|
-
*/
|
|
564
|
-
type: 'object';
|
|
241
|
+
type?: 'object';
|
|
565
242
|
}
|
|
566
243
|
|
|
567
244
|
/**
|
|
568
245
|
* Parameter type for JSON values.
|
|
569
246
|
*/
|
|
570
247
|
export interface JsonType {
|
|
571
|
-
|
|
572
|
-
* Discriminator type. Always "json"
|
|
573
|
-
*/
|
|
574
|
-
type: 'json';
|
|
248
|
+
type?: 'json';
|
|
575
249
|
}
|
|
576
250
|
|
|
577
251
|
/**
|
|
578
252
|
* Parameter type for union values.
|
|
579
253
|
*/
|
|
580
254
|
export interface UnionType {
|
|
581
|
-
|
|
582
|
-
* Discriminator type. Always "union"
|
|
583
|
-
*/
|
|
584
|
-
type: 'union';
|
|
255
|
+
type?: 'union';
|
|
585
256
|
}
|
|
586
257
|
|
|
587
258
|
/**
|
|
588
259
|
* Parameter type for chat completion input.
|
|
589
260
|
*/
|
|
590
261
|
export interface ChatCompletionInputType {
|
|
591
|
-
|
|
592
|
-
* Discriminator type. Always "chat_completion_input"
|
|
593
|
-
*/
|
|
594
|
-
type: 'chat_completion_input';
|
|
262
|
+
type?: 'chat_completion_input';
|
|
595
263
|
}
|
|
596
264
|
|
|
597
265
|
/**
|
|
598
266
|
* Parameter type for completion input.
|
|
599
267
|
*/
|
|
600
268
|
export interface CompletionInputType {
|
|
601
|
-
|
|
602
|
-
* Discriminator type. Always "completion_input"
|
|
603
|
-
*/
|
|
604
|
-
type: 'completion_input';
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Parameter type for agent turn input.
|
|
609
|
-
*/
|
|
610
|
-
export interface AgentTurnInputType {
|
|
611
|
-
/**
|
|
612
|
-
* Discriminator type. Always "agent_turn_input"
|
|
613
|
-
*/
|
|
614
|
-
type: 'agent_turn_input';
|
|
269
|
+
type?: 'completion_input';
|
|
615
270
|
}
|
|
616
271
|
}
|
|
617
272
|
|
|
618
273
|
/**
|
|
619
|
-
*
|
|
274
|
+
* Information about a registered provider including its configuration and health
|
|
275
|
+
* status.
|
|
620
276
|
*/
|
|
621
|
-
export interface
|
|
622
|
-
/**
|
|
623
|
-
* Template for formatting each retrieved chunk in the context. Available
|
|
624
|
-
* placeholders: {index} (1-based chunk ordinal), {chunk.content} (chunk content
|
|
625
|
-
* string), {metadata} (chunk metadata dict). Default: "Result {index}\nContent:
|
|
626
|
-
* {chunk.content}\nMetadata: {metadata}\n"
|
|
627
|
-
*/
|
|
628
|
-
chunk_template: string;
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Maximum number of chunks to retrieve.
|
|
632
|
-
*/
|
|
633
|
-
max_chunks: number;
|
|
634
|
-
|
|
635
|
-
/**
|
|
636
|
-
* Maximum number of tokens in the context.
|
|
637
|
-
*/
|
|
638
|
-
max_tokens_in_context: number;
|
|
639
|
-
|
|
277
|
+
export interface ProviderInfo {
|
|
640
278
|
/**
|
|
641
|
-
*
|
|
279
|
+
* The API name this provider implements
|
|
642
280
|
*/
|
|
643
|
-
|
|
281
|
+
api: string;
|
|
644
282
|
|
|
645
283
|
/**
|
|
646
|
-
*
|
|
647
|
-
* "vector".
|
|
284
|
+
* Configuration parameters for the provider
|
|
648
285
|
*/
|
|
649
|
-
|
|
286
|
+
config: { [key: string]: unknown };
|
|
650
287
|
|
|
651
288
|
/**
|
|
652
|
-
*
|
|
289
|
+
* Current health status of the provider
|
|
653
290
|
*/
|
|
654
|
-
|
|
655
|
-
}
|
|
291
|
+
health: { [key: string]: unknown };
|
|
656
292
|
|
|
657
|
-
export namespace QueryConfig {
|
|
658
293
|
/**
|
|
659
|
-
*
|
|
294
|
+
* Unique identifier for the provider
|
|
660
295
|
*/
|
|
661
|
-
|
|
662
|
-
/**
|
|
663
|
-
* The impact factor for RRF scoring. Higher values give more weight to
|
|
664
|
-
* higher-ranked results. Must be greater than 0
|
|
665
|
-
*/
|
|
666
|
-
impact_factor: number;
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* The type of ranker, always "rrf"
|
|
670
|
-
*/
|
|
671
|
-
type: 'rrf';
|
|
672
|
-
}
|
|
296
|
+
provider_id: string;
|
|
673
297
|
|
|
674
298
|
/**
|
|
675
|
-
*
|
|
299
|
+
* The type of provider implementation
|
|
676
300
|
*/
|
|
677
|
-
|
|
678
|
-
/**
|
|
679
|
-
* Weight factor between 0 and 1. 0 means only use keyword scores, 1 means only use
|
|
680
|
-
* vector scores, values in between blend both scores.
|
|
681
|
-
*/
|
|
682
|
-
alpha: number;
|
|
683
|
-
|
|
684
|
-
/**
|
|
685
|
-
* The type of ranker, always "weighted"
|
|
686
|
-
*/
|
|
687
|
-
type: 'weighted';
|
|
688
|
-
}
|
|
301
|
+
provider_type: string;
|
|
689
302
|
}
|
|
690
303
|
|
|
691
304
|
/**
|
|
692
|
-
*
|
|
305
|
+
* Information about an API route including its path, method, and implementing
|
|
306
|
+
* providers.
|
|
693
307
|
*/
|
|
694
|
-
export
|
|
695
|
-
| QueryGeneratorConfig.DefaultRagQueryGeneratorConfig
|
|
696
|
-
| QueryGeneratorConfig.LlmragQueryGeneratorConfig;
|
|
697
|
-
|
|
698
|
-
export namespace QueryGeneratorConfig {
|
|
308
|
+
export interface RouteInfo {
|
|
699
309
|
/**
|
|
700
|
-
*
|
|
310
|
+
* The HTTP method for the route
|
|
701
311
|
*/
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* String separator used to join query terms
|
|
705
|
-
*/
|
|
706
|
-
separator: string;
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Type of query generator, always 'default'
|
|
710
|
-
*/
|
|
711
|
-
type: 'default';
|
|
712
|
-
}
|
|
312
|
+
method: string;
|
|
713
313
|
|
|
714
314
|
/**
|
|
715
|
-
*
|
|
315
|
+
* List of provider types implementing this route
|
|
716
316
|
*/
|
|
717
|
-
|
|
718
|
-
/**
|
|
719
|
-
* Name of the language model to use for query generation
|
|
720
|
-
*/
|
|
721
|
-
model: string;
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
* Template string for formatting the query generation prompt
|
|
725
|
-
*/
|
|
726
|
-
template: string;
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* Type of query generator, always 'llm'
|
|
730
|
-
*/
|
|
731
|
-
type: 'llm';
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
/**
|
|
736
|
-
* Result of a RAG query containing retrieved content and metadata.
|
|
737
|
-
*/
|
|
738
|
-
export interface QueryResult {
|
|
739
|
-
/**
|
|
740
|
-
* Additional metadata about the query result
|
|
741
|
-
*/
|
|
742
|
-
metadata: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
317
|
+
provider_types: Array<string>;
|
|
743
318
|
|
|
744
319
|
/**
|
|
745
|
-
*
|
|
320
|
+
* The API route path
|
|
746
321
|
*/
|
|
747
|
-
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
/**
|
|
751
|
-
* Configuration for JSON schema-guided response generation.
|
|
752
|
-
*/
|
|
753
|
-
export type ResponseFormat = ResponseFormat.JsonSchemaResponseFormat | ResponseFormat.GrammarResponseFormat;
|
|
754
|
-
|
|
755
|
-
export namespace ResponseFormat {
|
|
756
|
-
/**
|
|
757
|
-
* Configuration for JSON schema-guided response generation.
|
|
758
|
-
*/
|
|
759
|
-
export interface JsonSchemaResponseFormat {
|
|
760
|
-
/**
|
|
761
|
-
* The JSON schema the response should conform to. In a Python SDK, this is often a
|
|
762
|
-
* `pydantic` model.
|
|
763
|
-
*/
|
|
764
|
-
json_schema: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
* Must be "json_schema" to identify this format type
|
|
768
|
-
*/
|
|
769
|
-
type: 'json_schema';
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
/**
|
|
773
|
-
* Configuration for grammar-guided response generation.
|
|
774
|
-
*/
|
|
775
|
-
export interface GrammarResponseFormat {
|
|
776
|
-
/**
|
|
777
|
-
* The BNF grammar specification the response should conform to
|
|
778
|
-
*/
|
|
779
|
-
bnf: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* Must be "grammar" to identify this format type
|
|
783
|
-
*/
|
|
784
|
-
type: 'grammar';
|
|
785
|
-
}
|
|
322
|
+
route: string;
|
|
786
323
|
}
|
|
787
324
|
|
|
788
325
|
/**
|
|
@@ -790,52 +327,33 @@ export namespace ResponseFormat {
|
|
|
790
327
|
*/
|
|
791
328
|
export interface SafetyViolation {
|
|
792
329
|
/**
|
|
793
|
-
*
|
|
794
|
-
* telemetry
|
|
795
|
-
*/
|
|
796
|
-
metadata: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
797
|
-
|
|
798
|
-
/**
|
|
799
|
-
* Severity level of the violation
|
|
330
|
+
* Severity level of a safety violation.
|
|
800
331
|
*/
|
|
801
332
|
violation_level: 'info' | 'warn' | 'error';
|
|
802
333
|
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
user_message?: string;
|
|
334
|
+
metadata?: { [key: string]: unknown };
|
|
335
|
+
|
|
336
|
+
user_message?: string | null;
|
|
807
337
|
}
|
|
808
338
|
|
|
809
339
|
/**
|
|
810
340
|
* Sampling parameters.
|
|
811
341
|
*/
|
|
812
342
|
export interface SamplingParams {
|
|
813
|
-
|
|
814
|
-
* The sampling strategy.
|
|
815
|
-
*/
|
|
816
|
-
strategy:
|
|
817
|
-
| SamplingParams.GreedySamplingStrategy
|
|
818
|
-
| SamplingParams.TopPSamplingStrategy
|
|
819
|
-
| SamplingParams.TopKSamplingStrategy;
|
|
343
|
+
max_tokens?: number | null;
|
|
820
344
|
|
|
821
|
-
|
|
822
|
-
* The maximum number of tokens that can be generated in the completion. The token
|
|
823
|
-
* count of your prompt plus max_tokens cannot exceed the model's context length.
|
|
824
|
-
*/
|
|
825
|
-
max_tokens?: number;
|
|
345
|
+
repetition_penalty?: number | null;
|
|
826
346
|
|
|
827
|
-
|
|
828
|
-
* Number between -2.0 and 2.0. Positive values penalize new tokens based on
|
|
829
|
-
* whether they appear in the text so far, increasing the model's likelihood to
|
|
830
|
-
* talk about new topics.
|
|
831
|
-
*/
|
|
832
|
-
repetition_penalty?: number;
|
|
347
|
+
stop?: Array<string> | null;
|
|
833
348
|
|
|
834
349
|
/**
|
|
835
|
-
*
|
|
836
|
-
*
|
|
350
|
+
* Greedy sampling strategy that selects the highest probability token at each
|
|
351
|
+
* step.
|
|
837
352
|
*/
|
|
838
|
-
|
|
353
|
+
strategy?:
|
|
354
|
+
| SamplingParams.GreedySamplingStrategy
|
|
355
|
+
| SamplingParams.TopPSamplingStrategy
|
|
356
|
+
| SamplingParams.TopKSamplingStrategy;
|
|
839
357
|
}
|
|
840
358
|
|
|
841
359
|
export namespace SamplingParams {
|
|
@@ -844,10 +362,7 @@ export namespace SamplingParams {
|
|
|
844
362
|
* step.
|
|
845
363
|
*/
|
|
846
364
|
export interface GreedySamplingStrategy {
|
|
847
|
-
|
|
848
|
-
* Must be "greedy" to identify this sampling strategy
|
|
849
|
-
*/
|
|
850
|
-
type: 'greedy';
|
|
365
|
+
type?: 'greedy';
|
|
851
366
|
}
|
|
852
367
|
|
|
853
368
|
/**
|
|
@@ -855,35 +370,20 @@ export namespace SamplingParams {
|
|
|
855
370
|
* with cumulative probability >= p.
|
|
856
371
|
*/
|
|
857
372
|
export interface TopPSamplingStrategy {
|
|
858
|
-
|
|
859
|
-
* Must be "top_p" to identify this sampling strategy
|
|
860
|
-
*/
|
|
861
|
-
type: 'top_p';
|
|
373
|
+
temperature: number | null;
|
|
862
374
|
|
|
863
|
-
|
|
864
|
-
* Controls randomness in sampling. Higher values increase randomness
|
|
865
|
-
*/
|
|
866
|
-
temperature?: number;
|
|
375
|
+
top_p?: number | null;
|
|
867
376
|
|
|
868
|
-
|
|
869
|
-
* Cumulative probability threshold for nucleus sampling. Defaults to 0.95
|
|
870
|
-
*/
|
|
871
|
-
top_p?: number;
|
|
377
|
+
type?: 'top_p';
|
|
872
378
|
}
|
|
873
379
|
|
|
874
380
|
/**
|
|
875
381
|
* Top-k sampling strategy that restricts sampling to the k most likely tokens.
|
|
876
382
|
*/
|
|
877
383
|
export interface TopKSamplingStrategy {
|
|
878
|
-
/**
|
|
879
|
-
* Number of top tokens to consider for sampling. Must be at least 1
|
|
880
|
-
*/
|
|
881
384
|
top_k: number;
|
|
882
385
|
|
|
883
|
-
|
|
884
|
-
* Must be "top_k" to identify this sampling strategy
|
|
885
|
-
*/
|
|
886
|
-
type: 'top_k';
|
|
386
|
+
type?: 'top_k';
|
|
887
387
|
}
|
|
888
388
|
}
|
|
889
389
|
|
|
@@ -891,15 +391,9 @@ export namespace SamplingParams {
|
|
|
891
391
|
* A scoring result for a single row.
|
|
892
392
|
*/
|
|
893
393
|
export interface ScoringResult {
|
|
894
|
-
|
|
895
|
-
* Map of metric name to aggregated value
|
|
896
|
-
*/
|
|
897
|
-
aggregated_results: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
394
|
+
aggregated_results: { [key: string]: unknown };
|
|
898
395
|
|
|
899
|
-
|
|
900
|
-
* The scoring result for each row. Each row is a map of column name to value.
|
|
901
|
-
*/
|
|
902
|
-
score_rows: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
396
|
+
score_rows: Array<{ [key: string]: unknown }>;
|
|
903
397
|
}
|
|
904
398
|
|
|
905
399
|
/**
|
|
@@ -907,85 +401,113 @@ export interface ScoringResult {
|
|
|
907
401
|
*/
|
|
908
402
|
export interface SystemMessage {
|
|
909
403
|
/**
|
|
910
|
-
*
|
|
911
|
-
* they are concatenated. The underlying Llama Stack code may also add other system
|
|
912
|
-
* messages (for example, for formatting tool definitions).
|
|
913
|
-
*/
|
|
914
|
-
content: InterleavedContent;
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* Must be "system" to identify this as a system message
|
|
404
|
+
* A image content item
|
|
918
405
|
*/
|
|
919
|
-
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
export interface ToolCall {
|
|
923
|
-
arguments:
|
|
406
|
+
content:
|
|
924
407
|
| string
|
|
925
|
-
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
| number
|
|
929
|
-
| boolean
|
|
930
|
-
| Array<string | number | boolean | null>
|
|
931
|
-
| { [key: string]: string | number | boolean | null }
|
|
932
|
-
| null;
|
|
933
|
-
};
|
|
934
|
-
|
|
935
|
-
call_id: string;
|
|
936
|
-
|
|
937
|
-
tool_name: 'brave_search' | 'wolfram_alpha' | 'photogen' | 'code_interpreter' | (string & {});
|
|
408
|
+
| SystemMessage.ImageContentItemInput
|
|
409
|
+
| SystemMessage.TextContentItem
|
|
410
|
+
| Array<SystemMessage.ImageContentItemInput | SystemMessage.TextContentItem>;
|
|
938
411
|
|
|
939
|
-
|
|
412
|
+
role?: 'system';
|
|
940
413
|
}
|
|
941
414
|
|
|
942
|
-
export
|
|
943
|
-
|
|
415
|
+
export namespace SystemMessage {
|
|
416
|
+
/**
|
|
417
|
+
* A image content item
|
|
418
|
+
*/
|
|
419
|
+
export interface ImageContentItemInput {
|
|
420
|
+
/**
|
|
421
|
+
* A URL or a base64 encoded string
|
|
422
|
+
*/
|
|
423
|
+
image: ImageContentItemInput.Image;
|
|
944
424
|
|
|
945
|
-
|
|
425
|
+
type?: 'image';
|
|
426
|
+
}
|
|
946
427
|
|
|
947
|
-
|
|
428
|
+
export namespace ImageContentItemInput {
|
|
429
|
+
/**
|
|
430
|
+
* A URL or a base64 encoded string
|
|
431
|
+
*/
|
|
432
|
+
export interface Image {
|
|
433
|
+
data?: string | null;
|
|
948
434
|
|
|
949
|
-
|
|
950
|
-
|
|
435
|
+
/**
|
|
436
|
+
* A URL reference to external content.
|
|
437
|
+
*/
|
|
438
|
+
url?: Image.URL | null;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export namespace Image {
|
|
442
|
+
/**
|
|
443
|
+
* A URL reference to external content.
|
|
444
|
+
*/
|
|
445
|
+
export interface URL {
|
|
446
|
+
uri: string;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
951
450
|
|
|
952
|
-
/**
|
|
953
|
-
* A message representing the result of a tool invocation.
|
|
954
|
-
*/
|
|
955
|
-
export interface ToolResponseMessage {
|
|
956
451
|
/**
|
|
957
|
-
*
|
|
452
|
+
* A text content item
|
|
958
453
|
*/
|
|
959
|
-
|
|
454
|
+
export interface TextContentItem {
|
|
455
|
+
text: string;
|
|
456
|
+
|
|
457
|
+
type?: 'text';
|
|
458
|
+
}
|
|
960
459
|
|
|
961
460
|
/**
|
|
962
|
-
*
|
|
461
|
+
* A image content item
|
|
963
462
|
*/
|
|
964
|
-
|
|
463
|
+
export interface ImageContentItemInput {
|
|
464
|
+
/**
|
|
465
|
+
* A URL or a base64 encoded string
|
|
466
|
+
*/
|
|
467
|
+
image: ImageContentItemInput.Image;
|
|
468
|
+
|
|
469
|
+
type?: 'image';
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
export namespace ImageContentItemInput {
|
|
473
|
+
/**
|
|
474
|
+
* A URL or a base64 encoded string
|
|
475
|
+
*/
|
|
476
|
+
export interface Image {
|
|
477
|
+
data?: string | null;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* A URL reference to external content.
|
|
481
|
+
*/
|
|
482
|
+
url?: Image.URL | null;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
export namespace Image {
|
|
486
|
+
/**
|
|
487
|
+
* A URL reference to external content.
|
|
488
|
+
*/
|
|
489
|
+
export interface URL {
|
|
490
|
+
uri: string;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
965
494
|
|
|
966
495
|
/**
|
|
967
|
-
*
|
|
496
|
+
* A text content item
|
|
968
497
|
*/
|
|
969
|
-
|
|
498
|
+
export interface TextContentItem {
|
|
499
|
+
text: string;
|
|
500
|
+
|
|
501
|
+
type?: 'text';
|
|
502
|
+
}
|
|
970
503
|
}
|
|
971
504
|
|
|
972
505
|
/**
|
|
973
|
-
*
|
|
506
|
+
* Version information for the service.
|
|
974
507
|
*/
|
|
975
|
-
export interface
|
|
976
|
-
/**
|
|
977
|
-
* The content of the message, which can include text and other media
|
|
978
|
-
*/
|
|
979
|
-
content: InterleavedContent;
|
|
980
|
-
|
|
981
|
-
/**
|
|
982
|
-
* Must be "user" to identify this as a user message
|
|
983
|
-
*/
|
|
984
|
-
role: 'user';
|
|
985
|
-
|
|
508
|
+
export interface VersionInfo {
|
|
986
509
|
/**
|
|
987
|
-
*
|
|
988
|
-
* This field may be removed in the API in the future.
|
|
510
|
+
* The version string of the service
|
|
989
511
|
*/
|
|
990
|
-
|
|
512
|
+
version: string;
|
|
991
513
|
}
|