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
|
@@ -1,638 +0,0 @@
|
|
|
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 { APIPromise } from '../../core';
|
|
11
|
-
import * as Core from '../../core';
|
|
12
|
-
import * as TurnAPI from './turn';
|
|
13
|
-
import * as Shared from '../shared';
|
|
14
|
-
import * as AgentsAPI from './agents';
|
|
15
|
-
import { Stream } from '../../streaming';
|
|
16
|
-
|
|
17
|
-
export class TurnResource extends APIResource {
|
|
18
|
-
/**
|
|
19
|
-
* Create a new turn for an agent.
|
|
20
|
-
*/
|
|
21
|
-
create(
|
|
22
|
-
agentId: string,
|
|
23
|
-
sessionId: string,
|
|
24
|
-
body: TurnCreateParamsNonStreaming,
|
|
25
|
-
options?: Core.RequestOptions,
|
|
26
|
-
): APIPromise<Turn>;
|
|
27
|
-
create(
|
|
28
|
-
agentId: string,
|
|
29
|
-
sessionId: string,
|
|
30
|
-
body: TurnCreateParamsStreaming,
|
|
31
|
-
options?: Core.RequestOptions,
|
|
32
|
-
): APIPromise<Stream<AgentTurnResponseStreamChunk>>;
|
|
33
|
-
create(
|
|
34
|
-
agentId: string,
|
|
35
|
-
sessionId: string,
|
|
36
|
-
body: TurnCreateParamsBase,
|
|
37
|
-
options?: Core.RequestOptions,
|
|
38
|
-
): APIPromise<Stream<AgentTurnResponseStreamChunk> | Turn>;
|
|
39
|
-
create(
|
|
40
|
-
agentId: string,
|
|
41
|
-
sessionId: string,
|
|
42
|
-
body: TurnCreateParams,
|
|
43
|
-
options?: Core.RequestOptions,
|
|
44
|
-
): APIPromise<Turn> | APIPromise<Stream<AgentTurnResponseStreamChunk>> {
|
|
45
|
-
return this._client.post(`/v1/agents/${agentId}/session/${sessionId}/turn`, {
|
|
46
|
-
body,
|
|
47
|
-
...options,
|
|
48
|
-
stream: body.stream ?? false,
|
|
49
|
-
}) as APIPromise<Turn> | APIPromise<Stream<AgentTurnResponseStreamChunk>>;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Retrieve an agent turn by its ID.
|
|
54
|
-
*/
|
|
55
|
-
retrieve(
|
|
56
|
-
agentId: string,
|
|
57
|
-
sessionId: string,
|
|
58
|
-
turnId: string,
|
|
59
|
-
options?: Core.RequestOptions,
|
|
60
|
-
): Core.APIPromise<Turn> {
|
|
61
|
-
return this._client.get(`/v1/agents/${agentId}/session/${sessionId}/turn/${turnId}`, options);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Resume an agent turn with executed tool call responses. When a Turn has the
|
|
66
|
-
* status `awaiting_input` due to pending input from client side tool calls, this
|
|
67
|
-
* endpoint can be used to submit the outputs from the tool calls once they are
|
|
68
|
-
* ready.
|
|
69
|
-
*/
|
|
70
|
-
resume(
|
|
71
|
-
agentId: string,
|
|
72
|
-
sessionId: string,
|
|
73
|
-
turnId: string,
|
|
74
|
-
body: TurnResumeParamsNonStreaming,
|
|
75
|
-
options?: Core.RequestOptions,
|
|
76
|
-
): APIPromise<Turn>;
|
|
77
|
-
resume(
|
|
78
|
-
agentId: string,
|
|
79
|
-
sessionId: string,
|
|
80
|
-
turnId: string,
|
|
81
|
-
body: TurnResumeParamsStreaming,
|
|
82
|
-
options?: Core.RequestOptions,
|
|
83
|
-
): APIPromise<Stream<AgentTurnResponseStreamChunk>>;
|
|
84
|
-
resume(
|
|
85
|
-
agentId: string,
|
|
86
|
-
sessionId: string,
|
|
87
|
-
turnId: string,
|
|
88
|
-
body: TurnResumeParamsBase,
|
|
89
|
-
options?: Core.RequestOptions,
|
|
90
|
-
): APIPromise<Stream<AgentTurnResponseStreamChunk> | Turn>;
|
|
91
|
-
resume(
|
|
92
|
-
agentId: string,
|
|
93
|
-
sessionId: string,
|
|
94
|
-
turnId: string,
|
|
95
|
-
body: TurnResumeParams,
|
|
96
|
-
options?: Core.RequestOptions,
|
|
97
|
-
): APIPromise<Turn> | APIPromise<Stream<AgentTurnResponseStreamChunk>> {
|
|
98
|
-
return this._client.post(`/v1/agents/${agentId}/session/${sessionId}/turn/${turnId}/resume`, {
|
|
99
|
-
body,
|
|
100
|
-
...options,
|
|
101
|
-
stream: body.stream ?? false,
|
|
102
|
-
}) as APIPromise<Turn> | APIPromise<Stream<AgentTurnResponseStreamChunk>>;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Streamed agent turn completion response.
|
|
108
|
-
*/
|
|
109
|
-
export interface AgentTurnResponseStreamChunk {
|
|
110
|
-
/**
|
|
111
|
-
* Individual event in the agent turn response stream
|
|
112
|
-
*/
|
|
113
|
-
event: TurnResponseEvent;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* A single turn in an interaction with an Agentic System.
|
|
118
|
-
*/
|
|
119
|
-
export interface Turn {
|
|
120
|
-
/**
|
|
121
|
-
* List of messages that initiated this turn
|
|
122
|
-
*/
|
|
123
|
-
input_messages: Array<Shared.UserMessage | Shared.ToolResponseMessage>;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* The model's generated response containing content and metadata
|
|
127
|
-
*/
|
|
128
|
-
output_message: Shared.CompletionMessage;
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Unique identifier for the conversation session
|
|
132
|
-
*/
|
|
133
|
-
session_id: string;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Timestamp when the turn began
|
|
137
|
-
*/
|
|
138
|
-
started_at: string;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Ordered list of processing steps executed during this turn
|
|
142
|
-
*/
|
|
143
|
-
steps: Array<
|
|
144
|
-
| AgentsAPI.InferenceStep
|
|
145
|
-
| AgentsAPI.ToolExecutionStep
|
|
146
|
-
| AgentsAPI.ShieldCallStep
|
|
147
|
-
| AgentsAPI.MemoryRetrievalStep
|
|
148
|
-
>;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Unique identifier for the turn within a session
|
|
152
|
-
*/
|
|
153
|
-
turn_id: string;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* (Optional) Timestamp when the turn finished, if completed
|
|
157
|
-
*/
|
|
158
|
-
completed_at?: string;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* (Optional) Files or media attached to the agent's response
|
|
162
|
-
*/
|
|
163
|
-
output_attachments?: Array<Turn.OutputAttachment>;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export namespace Turn {
|
|
167
|
-
/**
|
|
168
|
-
* An attachment to an agent turn.
|
|
169
|
-
*/
|
|
170
|
-
export interface OutputAttachment {
|
|
171
|
-
/**
|
|
172
|
-
* The content of the attachment.
|
|
173
|
-
*/
|
|
174
|
-
content:
|
|
175
|
-
| string
|
|
176
|
-
| OutputAttachment.ImageContentItem
|
|
177
|
-
| OutputAttachment.TextContentItem
|
|
178
|
-
| Array<Shared.InterleavedContentItem>
|
|
179
|
-
| OutputAttachment.URL;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* The MIME type of the attachment.
|
|
183
|
-
*/
|
|
184
|
-
mime_type: string;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
export namespace OutputAttachment {
|
|
188
|
-
/**
|
|
189
|
-
* A image content item
|
|
190
|
-
*/
|
|
191
|
-
export interface ImageContentItem {
|
|
192
|
-
/**
|
|
193
|
-
* Image as a base64 encoded string or an URL
|
|
194
|
-
*/
|
|
195
|
-
image: ImageContentItem.Image;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Discriminator type of the content item. Always "image"
|
|
199
|
-
*/
|
|
200
|
-
type: 'image';
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export namespace ImageContentItem {
|
|
204
|
-
/**
|
|
205
|
-
* Image as a base64 encoded string or an URL
|
|
206
|
-
*/
|
|
207
|
-
export interface Image {
|
|
208
|
-
/**
|
|
209
|
-
* base64 encoded image data as string
|
|
210
|
-
*/
|
|
211
|
-
data?: string;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* A URL of the image or data URL in the format of data:image/{type};base64,{data}.
|
|
215
|
-
* Note that URL could have length limits.
|
|
216
|
-
*/
|
|
217
|
-
url?: Image.URL;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export namespace Image {
|
|
221
|
-
/**
|
|
222
|
-
* A URL of the image or data URL in the format of data:image/{type};base64,{data}.
|
|
223
|
-
* Note that URL could have length limits.
|
|
224
|
-
*/
|
|
225
|
-
export interface URL {
|
|
226
|
-
/**
|
|
227
|
-
* The URL string pointing to the resource
|
|
228
|
-
*/
|
|
229
|
-
uri: string;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* A text content item
|
|
236
|
-
*/
|
|
237
|
-
export interface TextContentItem {
|
|
238
|
-
/**
|
|
239
|
-
* Text content
|
|
240
|
-
*/
|
|
241
|
-
text: string;
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Discriminator type of the content item. Always "text"
|
|
245
|
-
*/
|
|
246
|
-
type: 'text';
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* A URL reference to external content.
|
|
251
|
-
*/
|
|
252
|
-
export interface URL {
|
|
253
|
-
/**
|
|
254
|
-
* The URL string pointing to the resource
|
|
255
|
-
*/
|
|
256
|
-
uri: string;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* An event in an agent turn response stream.
|
|
263
|
-
*/
|
|
264
|
-
export interface TurnResponseEvent {
|
|
265
|
-
/**
|
|
266
|
-
* Event-specific payload containing event data
|
|
267
|
-
*/
|
|
268
|
-
payload: TurnResponseEventPayload;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Payload for step start events in agent turn responses.
|
|
273
|
-
*/
|
|
274
|
-
export type TurnResponseEventPayload =
|
|
275
|
-
| TurnResponseEventPayload.AgentTurnResponseStepStartPayload
|
|
276
|
-
| TurnResponseEventPayload.AgentTurnResponseStepProgressPayload
|
|
277
|
-
| TurnResponseEventPayload.AgentTurnResponseStepCompletePayload
|
|
278
|
-
| TurnResponseEventPayload.AgentTurnResponseTurnStartPayload
|
|
279
|
-
| TurnResponseEventPayload.AgentTurnResponseTurnCompletePayload
|
|
280
|
-
| TurnResponseEventPayload.AgentTurnResponseTurnAwaitingInputPayload;
|
|
281
|
-
|
|
282
|
-
export namespace TurnResponseEventPayload {
|
|
283
|
-
/**
|
|
284
|
-
* Payload for step start events in agent turn responses.
|
|
285
|
-
*/
|
|
286
|
-
export interface AgentTurnResponseStepStartPayload {
|
|
287
|
-
/**
|
|
288
|
-
* Type of event being reported
|
|
289
|
-
*/
|
|
290
|
-
event_type: 'step_start';
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Unique identifier for the step within a turn
|
|
294
|
-
*/
|
|
295
|
-
step_id: string;
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Type of step being executed
|
|
299
|
-
*/
|
|
300
|
-
step_type: 'inference' | 'tool_execution' | 'shield_call' | 'memory_retrieval';
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* (Optional) Additional metadata for the step
|
|
304
|
-
*/
|
|
305
|
-
metadata?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Payload for step progress events in agent turn responses.
|
|
310
|
-
*/
|
|
311
|
-
export interface AgentTurnResponseStepProgressPayload {
|
|
312
|
-
/**
|
|
313
|
-
* Incremental content changes during step execution
|
|
314
|
-
*/
|
|
315
|
-
delta: Shared.ContentDelta;
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Type of event being reported
|
|
319
|
-
*/
|
|
320
|
-
event_type: 'step_progress';
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Unique identifier for the step within a turn
|
|
324
|
-
*/
|
|
325
|
-
step_id: string;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Type of step being executed
|
|
329
|
-
*/
|
|
330
|
-
step_type: 'inference' | 'tool_execution' | 'shield_call' | 'memory_retrieval';
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Payload for step completion events in agent turn responses.
|
|
335
|
-
*/
|
|
336
|
-
export interface AgentTurnResponseStepCompletePayload {
|
|
337
|
-
/**
|
|
338
|
-
* Type of event being reported
|
|
339
|
-
*/
|
|
340
|
-
event_type: 'step_complete';
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Complete details of the executed step
|
|
344
|
-
*/
|
|
345
|
-
step_details:
|
|
346
|
-
| AgentsAPI.InferenceStep
|
|
347
|
-
| AgentsAPI.ToolExecutionStep
|
|
348
|
-
| AgentsAPI.ShieldCallStep
|
|
349
|
-
| AgentsAPI.MemoryRetrievalStep;
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
* Unique identifier for the step within a turn
|
|
353
|
-
*/
|
|
354
|
-
step_id: string;
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Type of step being executed
|
|
358
|
-
*/
|
|
359
|
-
step_type: 'inference' | 'tool_execution' | 'shield_call' | 'memory_retrieval';
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Payload for turn start events in agent turn responses.
|
|
364
|
-
*/
|
|
365
|
-
export interface AgentTurnResponseTurnStartPayload {
|
|
366
|
-
/**
|
|
367
|
-
* Type of event being reported
|
|
368
|
-
*/
|
|
369
|
-
event_type: 'turn_start';
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Unique identifier for the turn within a session
|
|
373
|
-
*/
|
|
374
|
-
turn_id: string;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Payload for turn completion events in agent turn responses.
|
|
379
|
-
*/
|
|
380
|
-
export interface AgentTurnResponseTurnCompletePayload {
|
|
381
|
-
/**
|
|
382
|
-
* Type of event being reported
|
|
383
|
-
*/
|
|
384
|
-
event_type: 'turn_complete';
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Complete turn data including all steps and results
|
|
388
|
-
*/
|
|
389
|
-
turn: TurnAPI.Turn;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* Payload for turn awaiting input events in agent turn responses.
|
|
394
|
-
*/
|
|
395
|
-
export interface AgentTurnResponseTurnAwaitingInputPayload {
|
|
396
|
-
/**
|
|
397
|
-
* Type of event being reported
|
|
398
|
-
*/
|
|
399
|
-
event_type: 'turn_awaiting_input';
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Turn data when waiting for external tool responses
|
|
403
|
-
*/
|
|
404
|
-
turn: TurnAPI.Turn;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
export type TurnCreateParams = TurnCreateParamsNonStreaming | TurnCreateParamsStreaming;
|
|
409
|
-
|
|
410
|
-
export interface TurnCreateParamsBase {
|
|
411
|
-
/**
|
|
412
|
-
* List of messages to start the turn with.
|
|
413
|
-
*/
|
|
414
|
-
messages: Array<Shared.UserMessage | Shared.ToolResponseMessage>;
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* (Optional) List of documents to create the turn with.
|
|
418
|
-
*/
|
|
419
|
-
documents?: Array<TurnCreateParams.Document>;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* (Optional) If True, generate an SSE event stream of the response. Defaults to
|
|
423
|
-
* False.
|
|
424
|
-
*/
|
|
425
|
-
stream?: boolean;
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* (Optional) The tool configuration to create the turn with, will be used to
|
|
429
|
-
* override the agent's tool_config.
|
|
430
|
-
*/
|
|
431
|
-
tool_config?: TurnCreateParams.ToolConfig;
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* (Optional) List of toolgroups to create the turn with, will be used in addition
|
|
435
|
-
* to the agent's config toolgroups for the request.
|
|
436
|
-
*/
|
|
437
|
-
toolgroups?: Array<string | TurnCreateParams.AgentToolGroupWithArgs>;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
export namespace TurnCreateParams {
|
|
441
|
-
/**
|
|
442
|
-
* A document to be used by an agent.
|
|
443
|
-
*/
|
|
444
|
-
export interface Document {
|
|
445
|
-
/**
|
|
446
|
-
* The content of the document.
|
|
447
|
-
*/
|
|
448
|
-
content:
|
|
449
|
-
| string
|
|
450
|
-
| Document.ImageContentItem
|
|
451
|
-
| Document.TextContentItem
|
|
452
|
-
| Array<Shared.InterleavedContentItem>
|
|
453
|
-
| Document.URL;
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* The MIME type of the document.
|
|
457
|
-
*/
|
|
458
|
-
mime_type: string;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export namespace Document {
|
|
462
|
-
/**
|
|
463
|
-
* A image content item
|
|
464
|
-
*/
|
|
465
|
-
export interface ImageContentItem {
|
|
466
|
-
/**
|
|
467
|
-
* Image as a base64 encoded string or an URL
|
|
468
|
-
*/
|
|
469
|
-
image: ImageContentItem.Image;
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Discriminator type of the content item. Always "image"
|
|
473
|
-
*/
|
|
474
|
-
type: 'image';
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
export namespace ImageContentItem {
|
|
478
|
-
/**
|
|
479
|
-
* Image as a base64 encoded string or an URL
|
|
480
|
-
*/
|
|
481
|
-
export interface Image {
|
|
482
|
-
/**
|
|
483
|
-
* base64 encoded image data as string
|
|
484
|
-
*/
|
|
485
|
-
data?: string;
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* A URL of the image or data URL in the format of data:image/{type};base64,{data}.
|
|
489
|
-
* Note that URL could have length limits.
|
|
490
|
-
*/
|
|
491
|
-
url?: Image.URL;
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
export namespace Image {
|
|
495
|
-
/**
|
|
496
|
-
* A URL of the image or data URL in the format of data:image/{type};base64,{data}.
|
|
497
|
-
* Note that URL could have length limits.
|
|
498
|
-
*/
|
|
499
|
-
export interface URL {
|
|
500
|
-
/**
|
|
501
|
-
* The URL string pointing to the resource
|
|
502
|
-
*/
|
|
503
|
-
uri: string;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* A text content item
|
|
510
|
-
*/
|
|
511
|
-
export interface TextContentItem {
|
|
512
|
-
/**
|
|
513
|
-
* Text content
|
|
514
|
-
*/
|
|
515
|
-
text: string;
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* Discriminator type of the content item. Always "text"
|
|
519
|
-
*/
|
|
520
|
-
type: 'text';
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* A URL reference to external content.
|
|
525
|
-
*/
|
|
526
|
-
export interface URL {
|
|
527
|
-
/**
|
|
528
|
-
* The URL string pointing to the resource
|
|
529
|
-
*/
|
|
530
|
-
uri: string;
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
* (Optional) The tool configuration to create the turn with, will be used to
|
|
536
|
-
* override the agent's tool_config.
|
|
537
|
-
*/
|
|
538
|
-
export interface ToolConfig {
|
|
539
|
-
/**
|
|
540
|
-
* (Optional) Config for how to override the default system prompt. -
|
|
541
|
-
* `SystemMessageBehavior.append`: Appends the provided system message to the
|
|
542
|
-
* default system prompt. - `SystemMessageBehavior.replace`: Replaces the default
|
|
543
|
-
* system prompt with the provided system message. The system message can include
|
|
544
|
-
* the string '{{function_definitions}}' to indicate where the function definitions
|
|
545
|
-
* should be inserted.
|
|
546
|
-
*/
|
|
547
|
-
system_message_behavior?: 'append' | 'replace';
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* (Optional) Whether tool use is automatic, required, or none. Can also specify a
|
|
551
|
-
* tool name to use a specific tool. Defaults to ToolChoice.auto.
|
|
552
|
-
*/
|
|
553
|
-
tool_choice?: 'auto' | 'required' | 'none' | (string & {});
|
|
554
|
-
|
|
555
|
-
/**
|
|
556
|
-
* (Optional) Instructs the model how to format tool calls. By default, Llama Stack
|
|
557
|
-
* will attempt to use a format that is best adapted to the model. -
|
|
558
|
-
* `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. -
|
|
559
|
-
* `ToolPromptFormat.function_tag`: The tool calls are enclosed in a
|
|
560
|
-
* <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls
|
|
561
|
-
* are output as Python syntax -- a list of function calls.
|
|
562
|
-
*/
|
|
563
|
-
tool_prompt_format?: 'json' | 'function_tag' | 'python_list';
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
export interface AgentToolGroupWithArgs {
|
|
567
|
-
args: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
568
|
-
|
|
569
|
-
name: string;
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
export type TurnCreateParamsNonStreaming = TurnAPI.TurnCreateParamsNonStreaming;
|
|
573
|
-
export type TurnCreateParamsStreaming = TurnAPI.TurnCreateParamsStreaming;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
export interface TurnCreateParamsNonStreaming extends TurnCreateParamsBase {
|
|
577
|
-
/**
|
|
578
|
-
* (Optional) If True, generate an SSE event stream of the response. Defaults to
|
|
579
|
-
* False.
|
|
580
|
-
*/
|
|
581
|
-
stream?: false;
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
export interface TurnCreateParamsStreaming extends TurnCreateParamsBase {
|
|
585
|
-
/**
|
|
586
|
-
* (Optional) If True, generate an SSE event stream of the response. Defaults to
|
|
587
|
-
* False.
|
|
588
|
-
*/
|
|
589
|
-
stream: true;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
export type TurnResumeParams = TurnResumeParamsNonStreaming | TurnResumeParamsStreaming;
|
|
593
|
-
|
|
594
|
-
export interface TurnResumeParamsBase {
|
|
595
|
-
/**
|
|
596
|
-
* The tool call responses to resume the turn with.
|
|
597
|
-
*/
|
|
598
|
-
tool_responses: Array<AgentsAPI.ToolResponse>;
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* Whether to stream the response.
|
|
602
|
-
*/
|
|
603
|
-
stream?: boolean;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
export namespace TurnResumeParams {
|
|
607
|
-
export type TurnResumeParamsNonStreaming = TurnAPI.TurnResumeParamsNonStreaming;
|
|
608
|
-
export type TurnResumeParamsStreaming = TurnAPI.TurnResumeParamsStreaming;
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
export interface TurnResumeParamsNonStreaming extends TurnResumeParamsBase {
|
|
612
|
-
/**
|
|
613
|
-
* Whether to stream the response.
|
|
614
|
-
*/
|
|
615
|
-
stream?: false;
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
export interface TurnResumeParamsStreaming extends TurnResumeParamsBase {
|
|
619
|
-
/**
|
|
620
|
-
* Whether to stream the response.
|
|
621
|
-
*/
|
|
622
|
-
stream: true;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
export declare namespace TurnResource {
|
|
626
|
-
export {
|
|
627
|
-
type AgentTurnResponseStreamChunk as AgentTurnResponseStreamChunk,
|
|
628
|
-
type Turn as Turn,
|
|
629
|
-
type TurnResponseEvent as TurnResponseEvent,
|
|
630
|
-
type TurnResponseEventPayload as TurnResponseEventPayload,
|
|
631
|
-
type TurnCreateParams as TurnCreateParams,
|
|
632
|
-
type TurnCreateParamsNonStreaming as TurnCreateParamsNonStreaming,
|
|
633
|
-
type TurnCreateParamsStreaming as TurnCreateParamsStreaming,
|
|
634
|
-
type TurnResumeParams as TurnResumeParams,
|
|
635
|
-
type TurnResumeParamsNonStreaming as TurnResumeParamsNonStreaming,
|
|
636
|
-
type TurnResumeParamsStreaming as TurnResumeParamsStreaming,
|
|
637
|
-
};
|
|
638
|
-
}
|