llama-stack-client 0.3.4 → 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.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 +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
package/resources/inference.d.ts
DELETED
|
@@ -1,580 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../resource.js";
|
|
2
|
-
import { APIPromise } from "../core.js";
|
|
3
|
-
import * as Core from "../core.js";
|
|
4
|
-
import * as InferenceAPI from "./inference.js";
|
|
5
|
-
import * as Shared from "./shared.js";
|
|
6
|
-
import { Stream } from "../streaming.js";
|
|
7
|
-
export declare class Inference extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Generate chat completions for a batch of messages using the specified model.
|
|
10
|
-
*/
|
|
11
|
-
batchChatCompletion(body: InferenceBatchChatCompletionParams, options?: Core.RequestOptions): Core.APIPromise<InferenceBatchChatCompletionResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* Generate completions for a batch of content using the specified model.
|
|
14
|
-
*/
|
|
15
|
-
batchCompletion(body: InferenceBatchCompletionParams, options?: Core.RequestOptions): Core.APIPromise<Shared.BatchCompletion>;
|
|
16
|
-
/**
|
|
17
|
-
* Generate a chat completion for the given messages using the specified model.
|
|
18
|
-
*
|
|
19
|
-
* @deprecated /v1/inference/chat-completion is deprecated. Please use /v1/openai/v1/chat/completions.
|
|
20
|
-
*/
|
|
21
|
-
chatCompletion(body: InferenceChatCompletionParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Shared.ChatCompletionResponse>;
|
|
22
|
-
chatCompletion(body: InferenceChatCompletionParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<ChatCompletionResponseStreamChunk>>;
|
|
23
|
-
chatCompletion(body: InferenceChatCompletionParamsBase, options?: Core.RequestOptions): APIPromise<Stream<ChatCompletionResponseStreamChunk> | Shared.ChatCompletionResponse>;
|
|
24
|
-
/**
|
|
25
|
-
* Generate a completion for the given content using the specified model.
|
|
26
|
-
*
|
|
27
|
-
* @deprecated /v1/inference/completion is deprecated. Please use /v1/openai/v1/completions.
|
|
28
|
-
*/
|
|
29
|
-
completion(body: InferenceCompletionParamsNonStreaming, options?: Core.RequestOptions): APIPromise<CompletionResponse>;
|
|
30
|
-
completion(body: InferenceCompletionParamsStreaming, options?: Core.RequestOptions): APIPromise<Stream<CompletionResponse>>;
|
|
31
|
-
completion(body: InferenceCompletionParamsBase, options?: Core.RequestOptions): APIPromise<Stream<CompletionResponse> | CompletionResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Generate embeddings for content pieces using the specified model.
|
|
34
|
-
*
|
|
35
|
-
* @deprecated /v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings.
|
|
36
|
-
*/
|
|
37
|
-
embeddings(body: InferenceEmbeddingsParams, options?: Core.RequestOptions): Core.APIPromise<EmbeddingsResponse>;
|
|
38
|
-
/**
|
|
39
|
-
* Rerank a list of documents based on their relevance to a query.
|
|
40
|
-
*/
|
|
41
|
-
rerank(body: InferenceRerankParams, options?: Core.RequestOptions): Core.APIPromise<InferenceRerankResponse>;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* A chunk of a streamed chat completion response.
|
|
45
|
-
*/
|
|
46
|
-
export interface ChatCompletionResponseStreamChunk {
|
|
47
|
-
/**
|
|
48
|
-
* The event containing the new content
|
|
49
|
-
*/
|
|
50
|
-
event: ChatCompletionResponseStreamChunk.Event;
|
|
51
|
-
/**
|
|
52
|
-
* (Optional) List of metrics associated with the API response
|
|
53
|
-
*/
|
|
54
|
-
metrics?: Array<Shared.Metric>;
|
|
55
|
-
}
|
|
56
|
-
export declare namespace ChatCompletionResponseStreamChunk {
|
|
57
|
-
/**
|
|
58
|
-
* The event containing the new content
|
|
59
|
-
*/
|
|
60
|
-
interface Event {
|
|
61
|
-
/**
|
|
62
|
-
* Content generated since last event. This can be one or more tokens, or a tool
|
|
63
|
-
* call.
|
|
64
|
-
*/
|
|
65
|
-
delta: Shared.ContentDelta;
|
|
66
|
-
/**
|
|
67
|
-
* Type of the event
|
|
68
|
-
*/
|
|
69
|
-
event_type: 'start' | 'complete' | 'progress';
|
|
70
|
-
/**
|
|
71
|
-
* Optional log probabilities for generated tokens
|
|
72
|
-
*/
|
|
73
|
-
logprobs?: Array<InferenceAPI.TokenLogProbs>;
|
|
74
|
-
/**
|
|
75
|
-
* Optional reason why generation stopped, if complete
|
|
76
|
-
*/
|
|
77
|
-
stop_reason?: 'end_of_turn' | 'end_of_message' | 'out_of_tokens';
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Response from a completion request.
|
|
82
|
-
*/
|
|
83
|
-
export interface CompletionResponse {
|
|
84
|
-
/**
|
|
85
|
-
* The generated completion text
|
|
86
|
-
*/
|
|
87
|
-
content: string;
|
|
88
|
-
/**
|
|
89
|
-
* Reason why generation stopped
|
|
90
|
-
*/
|
|
91
|
-
stop_reason: 'end_of_turn' | 'end_of_message' | 'out_of_tokens';
|
|
92
|
-
/**
|
|
93
|
-
* Optional log probabilities for generated tokens
|
|
94
|
-
*/
|
|
95
|
-
logprobs?: Array<TokenLogProbs>;
|
|
96
|
-
/**
|
|
97
|
-
* (Optional) List of metrics associated with the API response
|
|
98
|
-
*/
|
|
99
|
-
metrics?: Array<Shared.Metric>;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Response containing generated embeddings.
|
|
103
|
-
*/
|
|
104
|
-
export interface EmbeddingsResponse {
|
|
105
|
-
/**
|
|
106
|
-
* List of embedding vectors, one per input content. Each embedding is a list of
|
|
107
|
-
* floats. The dimensionality of the embedding is model-specific; you can check
|
|
108
|
-
* model metadata using /models/{model_id}
|
|
109
|
-
*/
|
|
110
|
-
embeddings: Array<Array<number>>;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Log probabilities for generated tokens.
|
|
114
|
-
*/
|
|
115
|
-
export interface TokenLogProbs {
|
|
116
|
-
/**
|
|
117
|
-
* Dictionary mapping tokens to their log probabilities
|
|
118
|
-
*/
|
|
119
|
-
logprobs_by_token: {
|
|
120
|
-
[key: string]: number;
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Response from a batch chat completion request.
|
|
125
|
-
*/
|
|
126
|
-
export interface InferenceBatchChatCompletionResponse {
|
|
127
|
-
/**
|
|
128
|
-
* List of chat completion responses, one for each conversation in the batch
|
|
129
|
-
*/
|
|
130
|
-
batch: Array<Shared.ChatCompletionResponse>;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* List of rerank result objects, sorted by relevance score (descending)
|
|
134
|
-
*/
|
|
135
|
-
export type InferenceRerankResponse = Array<InferenceRerankResponse.InferenceRerankResponseItem>;
|
|
136
|
-
export declare namespace InferenceRerankResponse {
|
|
137
|
-
/**
|
|
138
|
-
* A single rerank result from a reranking response.
|
|
139
|
-
*/
|
|
140
|
-
interface InferenceRerankResponseItem {
|
|
141
|
-
/**
|
|
142
|
-
* The original index of the document in the input list
|
|
143
|
-
*/
|
|
144
|
-
index: number;
|
|
145
|
-
/**
|
|
146
|
-
* The relevance score from the model output. Values are inverted when applicable
|
|
147
|
-
* so that higher scores indicate greater relevance.
|
|
148
|
-
*/
|
|
149
|
-
relevance_score: number;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
export interface InferenceBatchChatCompletionParams {
|
|
153
|
-
/**
|
|
154
|
-
* The messages to generate completions for.
|
|
155
|
-
*/
|
|
156
|
-
messages_batch: Array<Array<Shared.Message>>;
|
|
157
|
-
/**
|
|
158
|
-
* The identifier of the model to use. The model must be registered with Llama
|
|
159
|
-
* Stack and available via the /models endpoint.
|
|
160
|
-
*/
|
|
161
|
-
model_id: string;
|
|
162
|
-
/**
|
|
163
|
-
* (Optional) If specified, log probabilities for each token position will be
|
|
164
|
-
* returned.
|
|
165
|
-
*/
|
|
166
|
-
logprobs?: InferenceBatchChatCompletionParams.Logprobs;
|
|
167
|
-
/**
|
|
168
|
-
* (Optional) Grammar specification for guided (structured) decoding.
|
|
169
|
-
*/
|
|
170
|
-
response_format?: Shared.ResponseFormat;
|
|
171
|
-
/**
|
|
172
|
-
* (Optional) Parameters to control the sampling strategy.
|
|
173
|
-
*/
|
|
174
|
-
sampling_params?: Shared.SamplingParams;
|
|
175
|
-
/**
|
|
176
|
-
* (Optional) Configuration for tool use.
|
|
177
|
-
*/
|
|
178
|
-
tool_config?: InferenceBatchChatCompletionParams.ToolConfig;
|
|
179
|
-
/**
|
|
180
|
-
* (Optional) List of tool definitions available to the model.
|
|
181
|
-
*/
|
|
182
|
-
tools?: Array<InferenceBatchChatCompletionParams.Tool>;
|
|
183
|
-
}
|
|
184
|
-
export declare namespace InferenceBatchChatCompletionParams {
|
|
185
|
-
/**
|
|
186
|
-
* (Optional) If specified, log probabilities for each token position will be
|
|
187
|
-
* returned.
|
|
188
|
-
*/
|
|
189
|
-
interface Logprobs {
|
|
190
|
-
/**
|
|
191
|
-
* How many tokens (for each position) to return log probabilities for.
|
|
192
|
-
*/
|
|
193
|
-
top_k?: number;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* (Optional) Configuration for tool use.
|
|
197
|
-
*/
|
|
198
|
-
interface ToolConfig {
|
|
199
|
-
/**
|
|
200
|
-
* (Optional) Config for how to override the default system prompt. -
|
|
201
|
-
* `SystemMessageBehavior.append`: Appends the provided system message to the
|
|
202
|
-
* default system prompt. - `SystemMessageBehavior.replace`: Replaces the default
|
|
203
|
-
* system prompt with the provided system message. The system message can include
|
|
204
|
-
* the string '{{function_definitions}}' to indicate where the function definitions
|
|
205
|
-
* should be inserted.
|
|
206
|
-
*/
|
|
207
|
-
system_message_behavior?: 'append' | 'replace';
|
|
208
|
-
/**
|
|
209
|
-
* (Optional) Whether tool use is automatic, required, or none. Can also specify a
|
|
210
|
-
* tool name to use a specific tool. Defaults to ToolChoice.auto.
|
|
211
|
-
*/
|
|
212
|
-
tool_choice?: 'auto' | 'required' | 'none' | (string & {});
|
|
213
|
-
/**
|
|
214
|
-
* (Optional) Instructs the model how to format tool calls. By default, Llama Stack
|
|
215
|
-
* will attempt to use a format that is best adapted to the model. -
|
|
216
|
-
* `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. -
|
|
217
|
-
* `ToolPromptFormat.function_tag`: The tool calls are enclosed in a
|
|
218
|
-
* <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls
|
|
219
|
-
* are output as Python syntax -- a list of function calls.
|
|
220
|
-
*/
|
|
221
|
-
tool_prompt_format?: 'json' | 'function_tag' | 'python_list';
|
|
222
|
-
}
|
|
223
|
-
interface Tool {
|
|
224
|
-
tool_name: 'brave_search' | 'wolfram_alpha' | 'photogen' | 'code_interpreter' | (string & {});
|
|
225
|
-
description?: string;
|
|
226
|
-
parameters?: {
|
|
227
|
-
[key: string]: Shared.ToolParamDefinition;
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
export interface InferenceBatchCompletionParams {
|
|
232
|
-
/**
|
|
233
|
-
* The content to generate completions for.
|
|
234
|
-
*/
|
|
235
|
-
content_batch: Array<Shared.InterleavedContent>;
|
|
236
|
-
/**
|
|
237
|
-
* The identifier of the model to use. The model must be registered with Llama
|
|
238
|
-
* Stack and available via the /models endpoint.
|
|
239
|
-
*/
|
|
240
|
-
model_id: string;
|
|
241
|
-
/**
|
|
242
|
-
* (Optional) If specified, log probabilities for each token position will be
|
|
243
|
-
* returned.
|
|
244
|
-
*/
|
|
245
|
-
logprobs?: InferenceBatchCompletionParams.Logprobs;
|
|
246
|
-
/**
|
|
247
|
-
* (Optional) Grammar specification for guided (structured) decoding.
|
|
248
|
-
*/
|
|
249
|
-
response_format?: Shared.ResponseFormat;
|
|
250
|
-
/**
|
|
251
|
-
* (Optional) Parameters to control the sampling strategy.
|
|
252
|
-
*/
|
|
253
|
-
sampling_params?: Shared.SamplingParams;
|
|
254
|
-
}
|
|
255
|
-
export declare namespace InferenceBatchCompletionParams {
|
|
256
|
-
/**
|
|
257
|
-
* (Optional) If specified, log probabilities for each token position will be
|
|
258
|
-
* returned.
|
|
259
|
-
*/
|
|
260
|
-
interface Logprobs {
|
|
261
|
-
/**
|
|
262
|
-
* How many tokens (for each position) to return log probabilities for.
|
|
263
|
-
*/
|
|
264
|
-
top_k?: number;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
export type InferenceChatCompletionParams = InferenceChatCompletionParamsNonStreaming | InferenceChatCompletionParamsStreaming;
|
|
268
|
-
export interface InferenceChatCompletionParamsBase {
|
|
269
|
-
/**
|
|
270
|
-
* List of messages in the conversation.
|
|
271
|
-
*/
|
|
272
|
-
messages: Array<Shared.Message>;
|
|
273
|
-
/**
|
|
274
|
-
* The identifier of the model to use. The model must be registered with Llama
|
|
275
|
-
* Stack and available via the /models endpoint.
|
|
276
|
-
*/
|
|
277
|
-
model_id: string;
|
|
278
|
-
/**
|
|
279
|
-
* (Optional) If specified, log probabilities for each token position will be
|
|
280
|
-
* returned.
|
|
281
|
-
*/
|
|
282
|
-
logprobs?: InferenceChatCompletionParams.Logprobs;
|
|
283
|
-
/**
|
|
284
|
-
* (Optional) Grammar specification for guided (structured) decoding. There are two
|
|
285
|
-
* options: - `ResponseFormat.json_schema`: The grammar is a JSON schema. Most
|
|
286
|
-
* providers support this format. - `ResponseFormat.grammar`: The grammar is a BNF
|
|
287
|
-
* grammar. This format is more flexible, but not all providers support it.
|
|
288
|
-
*/
|
|
289
|
-
response_format?: Shared.ResponseFormat;
|
|
290
|
-
/**
|
|
291
|
-
* Parameters to control the sampling strategy.
|
|
292
|
-
*/
|
|
293
|
-
sampling_params?: Shared.SamplingParams;
|
|
294
|
-
/**
|
|
295
|
-
* (Optional) If True, generate an SSE event stream of the response. Defaults to
|
|
296
|
-
* False.
|
|
297
|
-
*/
|
|
298
|
-
stream?: boolean;
|
|
299
|
-
/**
|
|
300
|
-
* (Optional) Whether tool use is required or automatic. Defaults to
|
|
301
|
-
* ToolChoice.auto. .. deprecated:: Use tool_config instead.
|
|
302
|
-
*/
|
|
303
|
-
tool_choice?: 'auto' | 'required' | 'none';
|
|
304
|
-
/**
|
|
305
|
-
* (Optional) Configuration for tool use.
|
|
306
|
-
*/
|
|
307
|
-
tool_config?: InferenceChatCompletionParams.ToolConfig;
|
|
308
|
-
/**
|
|
309
|
-
* (Optional) Instructs the model how to format tool calls. By default, Llama Stack
|
|
310
|
-
* will attempt to use a format that is best adapted to the model. -
|
|
311
|
-
* `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. -
|
|
312
|
-
* `ToolPromptFormat.function_tag`: The tool calls are enclosed in a
|
|
313
|
-
* <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls
|
|
314
|
-
* are output as Python syntax -- a list of function calls. .. deprecated:: Use
|
|
315
|
-
* tool_config instead.
|
|
316
|
-
*/
|
|
317
|
-
tool_prompt_format?: 'json' | 'function_tag' | 'python_list';
|
|
318
|
-
/**
|
|
319
|
-
* (Optional) List of tool definitions available to the model.
|
|
320
|
-
*/
|
|
321
|
-
tools?: Array<InferenceChatCompletionParams.Tool>;
|
|
322
|
-
}
|
|
323
|
-
export declare namespace InferenceChatCompletionParams {
|
|
324
|
-
/**
|
|
325
|
-
* (Optional) If specified, log probabilities for each token position will be
|
|
326
|
-
* returned.
|
|
327
|
-
*/
|
|
328
|
-
interface Logprobs {
|
|
329
|
-
/**
|
|
330
|
-
* How many tokens (for each position) to return log probabilities for.
|
|
331
|
-
*/
|
|
332
|
-
top_k?: number;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* (Optional) Configuration for tool use.
|
|
336
|
-
*/
|
|
337
|
-
interface ToolConfig {
|
|
338
|
-
/**
|
|
339
|
-
* (Optional) Config for how to override the default system prompt. -
|
|
340
|
-
* `SystemMessageBehavior.append`: Appends the provided system message to the
|
|
341
|
-
* default system prompt. - `SystemMessageBehavior.replace`: Replaces the default
|
|
342
|
-
* system prompt with the provided system message. The system message can include
|
|
343
|
-
* the string '{{function_definitions}}' to indicate where the function definitions
|
|
344
|
-
* should be inserted.
|
|
345
|
-
*/
|
|
346
|
-
system_message_behavior?: 'append' | 'replace';
|
|
347
|
-
/**
|
|
348
|
-
* (Optional) Whether tool use is automatic, required, or none. Can also specify a
|
|
349
|
-
* tool name to use a specific tool. Defaults to ToolChoice.auto.
|
|
350
|
-
*/
|
|
351
|
-
tool_choice?: 'auto' | 'required' | 'none' | (string & {});
|
|
352
|
-
/**
|
|
353
|
-
* (Optional) Instructs the model how to format tool calls. By default, Llama Stack
|
|
354
|
-
* will attempt to use a format that is best adapted to the model. -
|
|
355
|
-
* `ToolPromptFormat.json`: The tool calls are formatted as a JSON object. -
|
|
356
|
-
* `ToolPromptFormat.function_tag`: The tool calls are enclosed in a
|
|
357
|
-
* <function=function_name> tag. - `ToolPromptFormat.python_list`: The tool calls
|
|
358
|
-
* are output as Python syntax -- a list of function calls.
|
|
359
|
-
*/
|
|
360
|
-
tool_prompt_format?: 'json' | 'function_tag' | 'python_list';
|
|
361
|
-
}
|
|
362
|
-
interface Tool {
|
|
363
|
-
tool_name: 'brave_search' | 'wolfram_alpha' | 'photogen' | 'code_interpreter' | (string & {});
|
|
364
|
-
description?: string;
|
|
365
|
-
parameters?: {
|
|
366
|
-
[key: string]: Shared.ToolParamDefinition;
|
|
367
|
-
};
|
|
368
|
-
}
|
|
369
|
-
type InferenceChatCompletionParamsNonStreaming = InferenceAPI.InferenceChatCompletionParamsNonStreaming;
|
|
370
|
-
type InferenceChatCompletionParamsStreaming = InferenceAPI.InferenceChatCompletionParamsStreaming;
|
|
371
|
-
}
|
|
372
|
-
export interface InferenceChatCompletionParamsNonStreaming extends InferenceChatCompletionParamsBase {
|
|
373
|
-
/**
|
|
374
|
-
* (Optional) If True, generate an SSE event stream of the response. Defaults to
|
|
375
|
-
* False.
|
|
376
|
-
*/
|
|
377
|
-
stream?: false;
|
|
378
|
-
}
|
|
379
|
-
export interface InferenceChatCompletionParamsStreaming extends InferenceChatCompletionParamsBase {
|
|
380
|
-
/**
|
|
381
|
-
* (Optional) If True, generate an SSE event stream of the response. Defaults to
|
|
382
|
-
* False.
|
|
383
|
-
*/
|
|
384
|
-
stream: true;
|
|
385
|
-
}
|
|
386
|
-
export type InferenceCompletionParams = InferenceCompletionParamsNonStreaming | InferenceCompletionParamsStreaming;
|
|
387
|
-
export interface InferenceCompletionParamsBase {
|
|
388
|
-
/**
|
|
389
|
-
* The content to generate a completion for.
|
|
390
|
-
*/
|
|
391
|
-
content: Shared.InterleavedContent;
|
|
392
|
-
/**
|
|
393
|
-
* The identifier of the model to use. The model must be registered with Llama
|
|
394
|
-
* Stack and available via the /models endpoint.
|
|
395
|
-
*/
|
|
396
|
-
model_id: string;
|
|
397
|
-
/**
|
|
398
|
-
* (Optional) If specified, log probabilities for each token position will be
|
|
399
|
-
* returned.
|
|
400
|
-
*/
|
|
401
|
-
logprobs?: InferenceCompletionParams.Logprobs;
|
|
402
|
-
/**
|
|
403
|
-
* (Optional) Grammar specification for guided (structured) decoding.
|
|
404
|
-
*/
|
|
405
|
-
response_format?: Shared.ResponseFormat;
|
|
406
|
-
/**
|
|
407
|
-
* (Optional) Parameters to control the sampling strategy.
|
|
408
|
-
*/
|
|
409
|
-
sampling_params?: Shared.SamplingParams;
|
|
410
|
-
/**
|
|
411
|
-
* (Optional) If True, generate an SSE event stream of the response. Defaults to
|
|
412
|
-
* False.
|
|
413
|
-
*/
|
|
414
|
-
stream?: boolean;
|
|
415
|
-
}
|
|
416
|
-
export declare namespace InferenceCompletionParams {
|
|
417
|
-
/**
|
|
418
|
-
* (Optional) If specified, log probabilities for each token position will be
|
|
419
|
-
* returned.
|
|
420
|
-
*/
|
|
421
|
-
interface Logprobs {
|
|
422
|
-
/**
|
|
423
|
-
* How many tokens (for each position) to return log probabilities for.
|
|
424
|
-
*/
|
|
425
|
-
top_k?: number;
|
|
426
|
-
}
|
|
427
|
-
type InferenceCompletionParamsNonStreaming = InferenceAPI.InferenceCompletionParamsNonStreaming;
|
|
428
|
-
type InferenceCompletionParamsStreaming = InferenceAPI.InferenceCompletionParamsStreaming;
|
|
429
|
-
}
|
|
430
|
-
export interface InferenceCompletionParamsNonStreaming extends InferenceCompletionParamsBase {
|
|
431
|
-
/**
|
|
432
|
-
* (Optional) If True, generate an SSE event stream of the response. Defaults to
|
|
433
|
-
* False.
|
|
434
|
-
*/
|
|
435
|
-
stream?: false;
|
|
436
|
-
}
|
|
437
|
-
export interface InferenceCompletionParamsStreaming extends InferenceCompletionParamsBase {
|
|
438
|
-
/**
|
|
439
|
-
* (Optional) If True, generate an SSE event stream of the response. Defaults to
|
|
440
|
-
* False.
|
|
441
|
-
*/
|
|
442
|
-
stream: true;
|
|
443
|
-
}
|
|
444
|
-
export interface InferenceEmbeddingsParams {
|
|
445
|
-
/**
|
|
446
|
-
* List of contents to generate embeddings for. Each content can be a string or an
|
|
447
|
-
* InterleavedContentItem (and hence can be multimodal). The behavior depends on
|
|
448
|
-
* the model and provider. Some models may only support text.
|
|
449
|
-
*/
|
|
450
|
-
contents: Array<string> | Array<Shared.InterleavedContentItem>;
|
|
451
|
-
/**
|
|
452
|
-
* The identifier of the model to use. The model must be an embedding model
|
|
453
|
-
* registered with Llama Stack and available via the /models endpoint.
|
|
454
|
-
*/
|
|
455
|
-
model_id: string;
|
|
456
|
-
/**
|
|
457
|
-
* (Optional) Output dimensionality for the embeddings. Only supported by
|
|
458
|
-
* Matryoshka models.
|
|
459
|
-
*/
|
|
460
|
-
output_dimension?: number;
|
|
461
|
-
/**
|
|
462
|
-
* (Optional) How is the embedding being used? This is only supported by asymmetric
|
|
463
|
-
* embedding models.
|
|
464
|
-
*/
|
|
465
|
-
task_type?: 'query' | 'document';
|
|
466
|
-
/**
|
|
467
|
-
* (Optional) Config for how to truncate text for embedding when text is longer
|
|
468
|
-
* than the model's max sequence length.
|
|
469
|
-
*/
|
|
470
|
-
text_truncation?: 'none' | 'start' | 'end';
|
|
471
|
-
}
|
|
472
|
-
export interface InferenceRerankParams {
|
|
473
|
-
/**
|
|
474
|
-
* List of items to rerank. Each item can be a string, text content part, or image
|
|
475
|
-
* content part. Each input must not exceed the model's max input token length.
|
|
476
|
-
*/
|
|
477
|
-
items: Array<string | InferenceRerankParams.OpenAIChatCompletionContentPartTextParam | InferenceRerankParams.OpenAIChatCompletionContentPartImageParam>;
|
|
478
|
-
/**
|
|
479
|
-
* The identifier of the reranking model to use.
|
|
480
|
-
*/
|
|
481
|
-
model: string;
|
|
482
|
-
/**
|
|
483
|
-
* The search query to rank items against. Can be a string, text content part, or
|
|
484
|
-
* image content part. The input must not exceed the model's max input token
|
|
485
|
-
* length.
|
|
486
|
-
*/
|
|
487
|
-
query: string | InferenceRerankParams.OpenAIChatCompletionContentPartTextParam | InferenceRerankParams.OpenAIChatCompletionContentPartImageParam;
|
|
488
|
-
/**
|
|
489
|
-
* (Optional) Maximum number of results to return. Default: returns all.
|
|
490
|
-
*/
|
|
491
|
-
max_num_results?: number;
|
|
492
|
-
}
|
|
493
|
-
export declare namespace InferenceRerankParams {
|
|
494
|
-
/**
|
|
495
|
-
* Text content part for OpenAI-compatible chat completion messages.
|
|
496
|
-
*/
|
|
497
|
-
interface OpenAIChatCompletionContentPartTextParam {
|
|
498
|
-
/**
|
|
499
|
-
* The text content of the message
|
|
500
|
-
*/
|
|
501
|
-
text: string;
|
|
502
|
-
/**
|
|
503
|
-
* Must be "text" to identify this as text content
|
|
504
|
-
*/
|
|
505
|
-
type: 'text';
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
* Image content part for OpenAI-compatible chat completion messages.
|
|
509
|
-
*/
|
|
510
|
-
interface OpenAIChatCompletionContentPartImageParam {
|
|
511
|
-
/**
|
|
512
|
-
* Image URL specification and processing details
|
|
513
|
-
*/
|
|
514
|
-
image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
|
|
515
|
-
/**
|
|
516
|
-
* Must be "image_url" to identify this as image content
|
|
517
|
-
*/
|
|
518
|
-
type: 'image_url';
|
|
519
|
-
}
|
|
520
|
-
namespace OpenAIChatCompletionContentPartImageParam {
|
|
521
|
-
/**
|
|
522
|
-
* Image URL specification and processing details
|
|
523
|
-
*/
|
|
524
|
-
interface ImageURL {
|
|
525
|
-
/**
|
|
526
|
-
* URL of the image to include in the message
|
|
527
|
-
*/
|
|
528
|
-
url: string;
|
|
529
|
-
/**
|
|
530
|
-
* (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
|
|
531
|
-
*/
|
|
532
|
-
detail?: string;
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* Text content part for OpenAI-compatible chat completion messages.
|
|
537
|
-
*/
|
|
538
|
-
interface OpenAIChatCompletionContentPartTextParam {
|
|
539
|
-
/**
|
|
540
|
-
* The text content of the message
|
|
541
|
-
*/
|
|
542
|
-
text: string;
|
|
543
|
-
/**
|
|
544
|
-
* Must be "text" to identify this as text content
|
|
545
|
-
*/
|
|
546
|
-
type: 'text';
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* Image content part for OpenAI-compatible chat completion messages.
|
|
550
|
-
*/
|
|
551
|
-
interface OpenAIChatCompletionContentPartImageParam {
|
|
552
|
-
/**
|
|
553
|
-
* Image URL specification and processing details
|
|
554
|
-
*/
|
|
555
|
-
image_url: OpenAIChatCompletionContentPartImageParam.ImageURL;
|
|
556
|
-
/**
|
|
557
|
-
* Must be "image_url" to identify this as image content
|
|
558
|
-
*/
|
|
559
|
-
type: 'image_url';
|
|
560
|
-
}
|
|
561
|
-
namespace OpenAIChatCompletionContentPartImageParam {
|
|
562
|
-
/**
|
|
563
|
-
* Image URL specification and processing details
|
|
564
|
-
*/
|
|
565
|
-
interface ImageURL {
|
|
566
|
-
/**
|
|
567
|
-
* URL of the image to include in the message
|
|
568
|
-
*/
|
|
569
|
-
url: string;
|
|
570
|
-
/**
|
|
571
|
-
* (Optional) Level of detail for image processing. Can be "low", "high", or "auto"
|
|
572
|
-
*/
|
|
573
|
-
detail?: string;
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
export declare namespace Inference {
|
|
578
|
-
export { type ChatCompletionResponseStreamChunk as ChatCompletionResponseStreamChunk, type CompletionResponse as CompletionResponse, type EmbeddingsResponse as EmbeddingsResponse, type TokenLogProbs as TokenLogProbs, type InferenceBatchChatCompletionResponse as InferenceBatchChatCompletionResponse, type InferenceRerankResponse as InferenceRerankResponse, type InferenceBatchChatCompletionParams as InferenceBatchChatCompletionParams, type InferenceBatchCompletionParams as InferenceBatchCompletionParams, type InferenceChatCompletionParams as InferenceChatCompletionParams, type InferenceChatCompletionParamsNonStreaming as InferenceChatCompletionParamsNonStreaming, type InferenceChatCompletionParamsStreaming as InferenceChatCompletionParamsStreaming, type InferenceCompletionParams as InferenceCompletionParams, type InferenceCompletionParamsNonStreaming as InferenceCompletionParamsNonStreaming, type InferenceCompletionParamsStreaming as InferenceCompletionParamsStreaming, type InferenceEmbeddingsParams as InferenceEmbeddingsParams, type InferenceRerankParams as InferenceRerankParams, };
|
|
579
|
-
}
|
|
580
|
-
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../src/resources/inference.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;A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b;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED;;OAEG;IACH,UAAiB,yCAAyC;QACxD;;WAEG;QACH,SAAS,EAAE,yCAAyC,CAAC,QAAQ,CAAC;QAE9D;;WAEG;QACH,IAAI,EAAE,WAAW,CAAC;KACnB;IAED,UAAiB,yCAAyC,CAAC;QACzD;;WAEG;QACH,UAAiB,QAAQ;YACvB;;eAEG;YACH,GAAG,EAAE,MAAM,CAAC;YAEZ;;eAEG;YACH,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
package/resources/inference.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
// All rights reserved.
|
|
4
|
-
//
|
|
5
|
-
// This source code is licensed under the terms described in the LICENSE file in
|
|
6
|
-
// the root directory of this source tree.
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Inference = void 0;
|
|
9
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
10
|
-
const resource_1 = require("../resource.js");
|
|
11
|
-
class Inference extends resource_1.APIResource {
|
|
12
|
-
/**
|
|
13
|
-
* Generate chat completions for a batch of messages using the specified model.
|
|
14
|
-
*/
|
|
15
|
-
batchChatCompletion(body, options) {
|
|
16
|
-
return this._client.post('/v1/inference/batch-chat-completion', { body, ...options });
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Generate completions for a batch of content using the specified model.
|
|
20
|
-
*/
|
|
21
|
-
batchCompletion(body, options) {
|
|
22
|
-
return this._client.post('/v1/inference/batch-completion', { body, ...options });
|
|
23
|
-
}
|
|
24
|
-
chatCompletion(body, options) {
|
|
25
|
-
return this._client.post('/v1/inference/chat-completion', {
|
|
26
|
-
body,
|
|
27
|
-
...options,
|
|
28
|
-
stream: body.stream ?? false,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
completion(body, options) {
|
|
32
|
-
return this._client.post('/v1/inference/completion', {
|
|
33
|
-
body,
|
|
34
|
-
...options,
|
|
35
|
-
stream: body.stream ?? false,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Generate embeddings for content pieces using the specified model.
|
|
40
|
-
*
|
|
41
|
-
* @deprecated /v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings.
|
|
42
|
-
*/
|
|
43
|
-
embeddings(body, options) {
|
|
44
|
-
return this._client.post('/v1/inference/embeddings', { body, ...options });
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Rerank a list of documents based on their relevance to a query.
|
|
48
|
-
*/
|
|
49
|
-
rerank(body, options) {
|
|
50
|
-
return this._client.post('/v1/inference/rerank', { body, ...options })._thenUnwrap((obj) => obj.data);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.Inference = Inference;
|
|
54
|
-
//# sourceMappingURL=inference.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inference.js","sourceRoot":"","sources":["../src/resources/inference.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;;;AAE1C,sFAAsF;AAEtF,6CAA0C;AAO1C,MAAa,SAAU,SAAQ,sBAAW;IACxC;;OAEG;IACH,mBAAmB,CACjB,IAAwC,EACxC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qCAAqC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACH,eAAe,CACb,IAAoC,EACpC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAmBD,cAAc,CACZ,IAAmC,EACnC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE;YACxD,IAAI;YACJ,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAAsG,CAAC;IAC1G,CAAC;IAmBD,UAAU,CACR,IAA+B,EAC/B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE;YACnD,IAAI;YACJ,GAAG,OAAO;YACV,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,KAAK;SAC7B,CAA4E,CAAC;IAChF,CAAC;IAED;;;;OAIG;IACH,UAAU,CACR,IAA+B,EAC/B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,IAA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