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
package/resources/inference.mjs
DELETED
|
@@ -1,49 +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
|
-
import { APIResource } from "../resource.mjs";
|
|
7
|
-
export class Inference extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Generate chat completions for a batch of messages using the specified model.
|
|
10
|
-
*/
|
|
11
|
-
batchChatCompletion(body, options) {
|
|
12
|
-
return this._client.post('/v1/inference/batch-chat-completion', { body, ...options });
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Generate completions for a batch of content using the specified model.
|
|
16
|
-
*/
|
|
17
|
-
batchCompletion(body, options) {
|
|
18
|
-
return this._client.post('/v1/inference/batch-completion', { body, ...options });
|
|
19
|
-
}
|
|
20
|
-
chatCompletion(body, options) {
|
|
21
|
-
return this._client.post('/v1/inference/chat-completion', {
|
|
22
|
-
body,
|
|
23
|
-
...options,
|
|
24
|
-
stream: body.stream ?? false,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
completion(body, options) {
|
|
28
|
-
return this._client.post('/v1/inference/completion', {
|
|
29
|
-
body,
|
|
30
|
-
...options,
|
|
31
|
-
stream: body.stream ?? false,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Generate embeddings for content pieces using the specified model.
|
|
36
|
-
*
|
|
37
|
-
* @deprecated /v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings.
|
|
38
|
-
*/
|
|
39
|
-
embeddings(body, options) {
|
|
40
|
-
return this._client.post('/v1/inference/embeddings', { body, ...options });
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Rerank a list of documents based on their relevance to a query.
|
|
44
|
-
*/
|
|
45
|
-
rerank(body, options) {
|
|
46
|
-
return this._client.post('/v1/inference/rerank', { body, ...options })._thenUnwrap((obj) => obj.data);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=inference.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inference.mjs","sourceRoot":"","sources":["../src/resources/inference.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;OAInC,EAAE,WAAW,EAAE;AAOtB,MAAM,OAAO,SAAU,SAAQ,WAAW;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,IAA2B,EAC3B,OAA6B;QAE7B,OACE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAG/D,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;CACF"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Job, type JobListResponse, type JobArtifactsResponse, type JobStatusResponse, type JobArtifactsParams, type JobCancelParams, type JobStatusParams, } from "./job.js";
|
|
2
|
-
export { PostTraining, type AlgorithmConfig, type ListPostTrainingJobsResponse, type PostTrainingJob, type PostTrainingPreferenceOptimizeParams, type PostTrainingSupervisedFineTuneParams, } from "./post-training.js";
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/post-training/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,GAAG,EACH,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,OAAO,CAAC;AACf,OAAO,EACL,YAAY,EACZ,KAAK,eAAe,EACpB,KAAK,4BAA4B,EACjC,KAAK,eAAe,EACpB,KAAK,oCAAoC,EACzC,KAAK,oCAAoC,GAC1C,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/post-training/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;;;AAE1C,sFAAsF;AAEtF,gCAQe;AAPb,0FAAA,GAAG,OAAA;AAQL,oDAOyB;AANvB,6GAAA,YAAY,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/post-training/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,uBAAuB;AACvB,EAAE;AACF,gFAAgF;AAChF,0CAA0C;OAInC,EACL,GAAG,GAOJ;OACM,EACL,YAAY,GAMb"}
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../resource.js";
|
|
2
|
-
import * as Core from "../../core.js";
|
|
3
|
-
import * as PostTrainingAPI from "./post-training.js";
|
|
4
|
-
export declare class Job extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Get all training jobs.
|
|
7
|
-
*/
|
|
8
|
-
list(options?: Core.RequestOptions): Core.APIPromise<Array<PostTrainingAPI.ListPostTrainingJobsResponse.Data>>;
|
|
9
|
-
/**
|
|
10
|
-
* Get the artifacts of a training job.
|
|
11
|
-
*/
|
|
12
|
-
artifacts(query: JobArtifactsParams, options?: Core.RequestOptions): Core.APIPromise<JobArtifactsResponse>;
|
|
13
|
-
/**
|
|
14
|
-
* Cancel a training job.
|
|
15
|
-
*/
|
|
16
|
-
cancel(body: JobCancelParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Get the status of a training job.
|
|
19
|
-
*/
|
|
20
|
-
status(query: JobStatusParams, options?: Core.RequestOptions): Core.APIPromise<JobStatusResponse>;
|
|
21
|
-
}
|
|
22
|
-
export type JobListResponse = Array<JobListResponse.JobListResponseItem>;
|
|
23
|
-
export declare namespace JobListResponse {
|
|
24
|
-
interface JobListResponseItem {
|
|
25
|
-
job_uuid: string;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Artifacts of a finetuning job.
|
|
30
|
-
*/
|
|
31
|
-
export interface JobArtifactsResponse {
|
|
32
|
-
/**
|
|
33
|
-
* List of model checkpoints created during training
|
|
34
|
-
*/
|
|
35
|
-
checkpoints: Array<JobArtifactsResponse.Checkpoint>;
|
|
36
|
-
/**
|
|
37
|
-
* Unique identifier for the training job
|
|
38
|
-
*/
|
|
39
|
-
job_uuid: string;
|
|
40
|
-
}
|
|
41
|
-
export declare namespace JobArtifactsResponse {
|
|
42
|
-
/**
|
|
43
|
-
* Checkpoint created during training runs.
|
|
44
|
-
*/
|
|
45
|
-
interface Checkpoint {
|
|
46
|
-
/**
|
|
47
|
-
* Timestamp when the checkpoint was created
|
|
48
|
-
*/
|
|
49
|
-
created_at: string;
|
|
50
|
-
/**
|
|
51
|
-
* Training epoch when the checkpoint was saved
|
|
52
|
-
*/
|
|
53
|
-
epoch: number;
|
|
54
|
-
/**
|
|
55
|
-
* Unique identifier for the checkpoint
|
|
56
|
-
*/
|
|
57
|
-
identifier: string;
|
|
58
|
-
/**
|
|
59
|
-
* File system path where the checkpoint is stored
|
|
60
|
-
*/
|
|
61
|
-
path: string;
|
|
62
|
-
/**
|
|
63
|
-
* Identifier of the training job that created this checkpoint
|
|
64
|
-
*/
|
|
65
|
-
post_training_job_id: string;
|
|
66
|
-
/**
|
|
67
|
-
* (Optional) Training metrics associated with this checkpoint
|
|
68
|
-
*/
|
|
69
|
-
training_metrics?: Checkpoint.TrainingMetrics;
|
|
70
|
-
}
|
|
71
|
-
namespace Checkpoint {
|
|
72
|
-
/**
|
|
73
|
-
* (Optional) Training metrics associated with this checkpoint
|
|
74
|
-
*/
|
|
75
|
-
interface TrainingMetrics {
|
|
76
|
-
/**
|
|
77
|
-
* Training epoch number
|
|
78
|
-
*/
|
|
79
|
-
epoch: number;
|
|
80
|
-
/**
|
|
81
|
-
* Perplexity metric indicating model confidence
|
|
82
|
-
*/
|
|
83
|
-
perplexity: number;
|
|
84
|
-
/**
|
|
85
|
-
* Loss value on the training dataset
|
|
86
|
-
*/
|
|
87
|
-
train_loss: number;
|
|
88
|
-
/**
|
|
89
|
-
* Loss value on the validation dataset
|
|
90
|
-
*/
|
|
91
|
-
validation_loss: number;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Status of a finetuning job.
|
|
97
|
-
*/
|
|
98
|
-
export interface JobStatusResponse {
|
|
99
|
-
/**
|
|
100
|
-
* List of model checkpoints created during training
|
|
101
|
-
*/
|
|
102
|
-
checkpoints: Array<JobStatusResponse.Checkpoint>;
|
|
103
|
-
/**
|
|
104
|
-
* Unique identifier for the training job
|
|
105
|
-
*/
|
|
106
|
-
job_uuid: string;
|
|
107
|
-
/**
|
|
108
|
-
* Current status of the training job
|
|
109
|
-
*/
|
|
110
|
-
status: 'completed' | 'in_progress' | 'failed' | 'scheduled' | 'cancelled';
|
|
111
|
-
/**
|
|
112
|
-
* (Optional) Timestamp when the job finished, if completed
|
|
113
|
-
*/
|
|
114
|
-
completed_at?: string;
|
|
115
|
-
/**
|
|
116
|
-
* (Optional) Information about computational resources allocated to the job
|
|
117
|
-
*/
|
|
118
|
-
resources_allocated?: {
|
|
119
|
-
[key: string]: boolean | number | string | Array<unknown> | unknown | null;
|
|
120
|
-
};
|
|
121
|
-
/**
|
|
122
|
-
* (Optional) Timestamp when the job was scheduled
|
|
123
|
-
*/
|
|
124
|
-
scheduled_at?: string;
|
|
125
|
-
/**
|
|
126
|
-
* (Optional) Timestamp when the job execution began
|
|
127
|
-
*/
|
|
128
|
-
started_at?: string;
|
|
129
|
-
}
|
|
130
|
-
export declare namespace JobStatusResponse {
|
|
131
|
-
/**
|
|
132
|
-
* Checkpoint created during training runs.
|
|
133
|
-
*/
|
|
134
|
-
interface Checkpoint {
|
|
135
|
-
/**
|
|
136
|
-
* Timestamp when the checkpoint was created
|
|
137
|
-
*/
|
|
138
|
-
created_at: string;
|
|
139
|
-
/**
|
|
140
|
-
* Training epoch when the checkpoint was saved
|
|
141
|
-
*/
|
|
142
|
-
epoch: number;
|
|
143
|
-
/**
|
|
144
|
-
* Unique identifier for the checkpoint
|
|
145
|
-
*/
|
|
146
|
-
identifier: string;
|
|
147
|
-
/**
|
|
148
|
-
* File system path where the checkpoint is stored
|
|
149
|
-
*/
|
|
150
|
-
path: string;
|
|
151
|
-
/**
|
|
152
|
-
* Identifier of the training job that created this checkpoint
|
|
153
|
-
*/
|
|
154
|
-
post_training_job_id: string;
|
|
155
|
-
/**
|
|
156
|
-
* (Optional) Training metrics associated with this checkpoint
|
|
157
|
-
*/
|
|
158
|
-
training_metrics?: Checkpoint.TrainingMetrics;
|
|
159
|
-
}
|
|
160
|
-
namespace Checkpoint {
|
|
161
|
-
/**
|
|
162
|
-
* (Optional) Training metrics associated with this checkpoint
|
|
163
|
-
*/
|
|
164
|
-
interface TrainingMetrics {
|
|
165
|
-
/**
|
|
166
|
-
* Training epoch number
|
|
167
|
-
*/
|
|
168
|
-
epoch: number;
|
|
169
|
-
/**
|
|
170
|
-
* Perplexity metric indicating model confidence
|
|
171
|
-
*/
|
|
172
|
-
perplexity: number;
|
|
173
|
-
/**
|
|
174
|
-
* Loss value on the training dataset
|
|
175
|
-
*/
|
|
176
|
-
train_loss: number;
|
|
177
|
-
/**
|
|
178
|
-
* Loss value on the validation dataset
|
|
179
|
-
*/
|
|
180
|
-
validation_loss: number;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
export interface JobArtifactsParams {
|
|
185
|
-
/**
|
|
186
|
-
* The UUID of the job to get the artifacts of.
|
|
187
|
-
*/
|
|
188
|
-
job_uuid: string;
|
|
189
|
-
}
|
|
190
|
-
export interface JobCancelParams {
|
|
191
|
-
/**
|
|
192
|
-
* The UUID of the job to cancel.
|
|
193
|
-
*/
|
|
194
|
-
job_uuid: string;
|
|
195
|
-
}
|
|
196
|
-
export interface JobStatusParams {
|
|
197
|
-
/**
|
|
198
|
-
* The UUID of the job to get the status of.
|
|
199
|
-
*/
|
|
200
|
-
job_uuid: string;
|
|
201
|
-
}
|
|
202
|
-
export declare namespace Job {
|
|
203
|
-
export { type JobListResponse as JobListResponse, type JobArtifactsResponse as JobArtifactsResponse, type JobStatusResponse as JobStatusResponse, type JobArtifactsParams as JobArtifactsParams, type JobCancelParams as JobCancelParams, type JobStatusParams as JobStatusParams, };
|
|
204
|
-
}
|
|
205
|
-
//# sourceMappingURL=job.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"job.d.ts","sourceRoot":"","sources":["../../src/resources/post-training/job.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,eAAe,MAAM,iBAAiB,CAAC;AAEnD,qBAAa,GAAI,SAAQ,WAAW;IAClC;;OAEG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,eAAe,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAQ5E;;OAEG;IACH,SAAS,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC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AAE,CAAC,CAAC;IACjF,CAAC;CACF"}
|
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../resource.js";
|
|
2
|
-
import * as Core from "../../core.js";
|
|
3
|
-
import * as JobAPI from "./job.js";
|
|
4
|
-
import { Job, JobArtifactsParams, JobArtifactsResponse, JobCancelParams, JobListResponse, JobStatusParams, JobStatusResponse } from "./job.js";
|
|
5
|
-
export declare class PostTraining extends APIResource {
|
|
6
|
-
job: JobAPI.Job;
|
|
7
|
-
/**
|
|
8
|
-
* Run preference optimization of a model.
|
|
9
|
-
*/
|
|
10
|
-
preferenceOptimize(body: PostTrainingPreferenceOptimizeParams, options?: Core.RequestOptions): Core.APIPromise<PostTrainingJob>;
|
|
11
|
-
/**
|
|
12
|
-
* Run supervised fine-tuning of a model.
|
|
13
|
-
*/
|
|
14
|
-
supervisedFineTune(body: PostTrainingSupervisedFineTuneParams, options?: Core.RequestOptions): Core.APIPromise<PostTrainingJob>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Configuration for Low-Rank Adaptation (LoRA) fine-tuning.
|
|
18
|
-
*/
|
|
19
|
-
export type AlgorithmConfig = AlgorithmConfig.LoraFinetuningConfig | AlgorithmConfig.QatFinetuningConfig;
|
|
20
|
-
export declare namespace AlgorithmConfig {
|
|
21
|
-
/**
|
|
22
|
-
* Configuration for Low-Rank Adaptation (LoRA) fine-tuning.
|
|
23
|
-
*/
|
|
24
|
-
interface LoraFinetuningConfig {
|
|
25
|
-
/**
|
|
26
|
-
* LoRA scaling parameter that controls adaptation strength
|
|
27
|
-
*/
|
|
28
|
-
alpha: number;
|
|
29
|
-
/**
|
|
30
|
-
* Whether to apply LoRA to MLP layers
|
|
31
|
-
*/
|
|
32
|
-
apply_lora_to_mlp: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Whether to apply LoRA to output projection layers
|
|
35
|
-
*/
|
|
36
|
-
apply_lora_to_output: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* List of attention module names to apply LoRA to
|
|
39
|
-
*/
|
|
40
|
-
lora_attn_modules: Array<string>;
|
|
41
|
-
/**
|
|
42
|
-
* Rank of the LoRA adaptation (lower rank = fewer parameters)
|
|
43
|
-
*/
|
|
44
|
-
rank: number;
|
|
45
|
-
/**
|
|
46
|
-
* Algorithm type identifier, always "LoRA"
|
|
47
|
-
*/
|
|
48
|
-
type: 'LoRA';
|
|
49
|
-
/**
|
|
50
|
-
* (Optional) Whether to quantize the base model weights
|
|
51
|
-
*/
|
|
52
|
-
quantize_base?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* (Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation)
|
|
55
|
-
*/
|
|
56
|
-
use_dora?: boolean;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Configuration for Quantization-Aware Training (QAT) fine-tuning.
|
|
60
|
-
*/
|
|
61
|
-
interface QatFinetuningConfig {
|
|
62
|
-
/**
|
|
63
|
-
* Size of groups for grouped quantization
|
|
64
|
-
*/
|
|
65
|
-
group_size: number;
|
|
66
|
-
/**
|
|
67
|
-
* Name of the quantization algorithm to use
|
|
68
|
-
*/
|
|
69
|
-
quantizer_name: string;
|
|
70
|
-
/**
|
|
71
|
-
* Algorithm type identifier, always "QAT"
|
|
72
|
-
*/
|
|
73
|
-
type: 'QAT';
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
export interface ListPostTrainingJobsResponse {
|
|
77
|
-
data: Array<ListPostTrainingJobsResponse.Data>;
|
|
78
|
-
}
|
|
79
|
-
export declare namespace ListPostTrainingJobsResponse {
|
|
80
|
-
interface Data {
|
|
81
|
-
job_uuid: string;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
export interface PostTrainingJob {
|
|
85
|
-
job_uuid: string;
|
|
86
|
-
}
|
|
87
|
-
export interface PostTrainingPreferenceOptimizeParams {
|
|
88
|
-
/**
|
|
89
|
-
* The algorithm configuration.
|
|
90
|
-
*/
|
|
91
|
-
algorithm_config: PostTrainingPreferenceOptimizeParams.AlgorithmConfig;
|
|
92
|
-
/**
|
|
93
|
-
* The model to fine-tune.
|
|
94
|
-
*/
|
|
95
|
-
finetuned_model: string;
|
|
96
|
-
/**
|
|
97
|
-
* The hyperparam search configuration.
|
|
98
|
-
*/
|
|
99
|
-
hyperparam_search_config: {
|
|
100
|
-
[key: string]: boolean | number | string | Array<unknown> | unknown | null;
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* The UUID of the job to create.
|
|
104
|
-
*/
|
|
105
|
-
job_uuid: string;
|
|
106
|
-
/**
|
|
107
|
-
* The logger configuration.
|
|
108
|
-
*/
|
|
109
|
-
logger_config: {
|
|
110
|
-
[key: string]: boolean | number | string | Array<unknown> | unknown | null;
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* The training configuration.
|
|
114
|
-
*/
|
|
115
|
-
training_config: PostTrainingPreferenceOptimizeParams.TrainingConfig;
|
|
116
|
-
}
|
|
117
|
-
export declare namespace PostTrainingPreferenceOptimizeParams {
|
|
118
|
-
/**
|
|
119
|
-
* The algorithm configuration.
|
|
120
|
-
*/
|
|
121
|
-
interface AlgorithmConfig {
|
|
122
|
-
/**
|
|
123
|
-
* Temperature parameter for the DPO loss
|
|
124
|
-
*/
|
|
125
|
-
beta: number;
|
|
126
|
-
/**
|
|
127
|
-
* The type of loss function to use for DPO
|
|
128
|
-
*/
|
|
129
|
-
loss_type: 'sigmoid' | 'hinge' | 'ipo' | 'kto_pair';
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* The training configuration.
|
|
133
|
-
*/
|
|
134
|
-
interface TrainingConfig {
|
|
135
|
-
/**
|
|
136
|
-
* Number of steps to accumulate gradients before updating
|
|
137
|
-
*/
|
|
138
|
-
gradient_accumulation_steps: number;
|
|
139
|
-
/**
|
|
140
|
-
* Maximum number of steps to run per epoch
|
|
141
|
-
*/
|
|
142
|
-
max_steps_per_epoch: number;
|
|
143
|
-
/**
|
|
144
|
-
* Number of training epochs to run
|
|
145
|
-
*/
|
|
146
|
-
n_epochs: number;
|
|
147
|
-
/**
|
|
148
|
-
* (Optional) Configuration for data loading and formatting
|
|
149
|
-
*/
|
|
150
|
-
data_config?: TrainingConfig.DataConfig;
|
|
151
|
-
/**
|
|
152
|
-
* (Optional) Data type for model parameters (bf16, fp16, fp32)
|
|
153
|
-
*/
|
|
154
|
-
dtype?: string;
|
|
155
|
-
/**
|
|
156
|
-
* (Optional) Configuration for memory and compute optimizations
|
|
157
|
-
*/
|
|
158
|
-
efficiency_config?: TrainingConfig.EfficiencyConfig;
|
|
159
|
-
/**
|
|
160
|
-
* (Optional) Maximum number of validation steps per epoch
|
|
161
|
-
*/
|
|
162
|
-
max_validation_steps?: number;
|
|
163
|
-
/**
|
|
164
|
-
* (Optional) Configuration for the optimization algorithm
|
|
165
|
-
*/
|
|
166
|
-
optimizer_config?: TrainingConfig.OptimizerConfig;
|
|
167
|
-
}
|
|
168
|
-
namespace TrainingConfig {
|
|
169
|
-
/**
|
|
170
|
-
* (Optional) Configuration for data loading and formatting
|
|
171
|
-
*/
|
|
172
|
-
interface DataConfig {
|
|
173
|
-
/**
|
|
174
|
-
* Number of samples per training batch
|
|
175
|
-
*/
|
|
176
|
-
batch_size: number;
|
|
177
|
-
/**
|
|
178
|
-
* Format of the dataset (instruct or dialog)
|
|
179
|
-
*/
|
|
180
|
-
data_format: 'instruct' | 'dialog';
|
|
181
|
-
/**
|
|
182
|
-
* Unique identifier for the training dataset
|
|
183
|
-
*/
|
|
184
|
-
dataset_id: string;
|
|
185
|
-
/**
|
|
186
|
-
* Whether to shuffle the dataset during training
|
|
187
|
-
*/
|
|
188
|
-
shuffle: boolean;
|
|
189
|
-
/**
|
|
190
|
-
* (Optional) Whether to pack multiple samples into a single sequence for
|
|
191
|
-
* efficiency
|
|
192
|
-
*/
|
|
193
|
-
packed?: boolean;
|
|
194
|
-
/**
|
|
195
|
-
* (Optional) Whether to compute loss on input tokens as well as output tokens
|
|
196
|
-
*/
|
|
197
|
-
train_on_input?: boolean;
|
|
198
|
-
/**
|
|
199
|
-
* (Optional) Unique identifier for the validation dataset
|
|
200
|
-
*/
|
|
201
|
-
validation_dataset_id?: string;
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* (Optional) Configuration for memory and compute optimizations
|
|
205
|
-
*/
|
|
206
|
-
interface EfficiencyConfig {
|
|
207
|
-
/**
|
|
208
|
-
* (Optional) Whether to use activation checkpointing to reduce memory usage
|
|
209
|
-
*/
|
|
210
|
-
enable_activation_checkpointing?: boolean;
|
|
211
|
-
/**
|
|
212
|
-
* (Optional) Whether to offload activations to CPU to save GPU memory
|
|
213
|
-
*/
|
|
214
|
-
enable_activation_offloading?: boolean;
|
|
215
|
-
/**
|
|
216
|
-
* (Optional) Whether to offload FSDP parameters to CPU
|
|
217
|
-
*/
|
|
218
|
-
fsdp_cpu_offload?: boolean;
|
|
219
|
-
/**
|
|
220
|
-
* (Optional) Whether to use memory-efficient FSDP wrapping
|
|
221
|
-
*/
|
|
222
|
-
memory_efficient_fsdp_wrap?: boolean;
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* (Optional) Configuration for the optimization algorithm
|
|
226
|
-
*/
|
|
227
|
-
interface OptimizerConfig {
|
|
228
|
-
/**
|
|
229
|
-
* Learning rate for the optimizer
|
|
230
|
-
*/
|
|
231
|
-
lr: number;
|
|
232
|
-
/**
|
|
233
|
-
* Number of steps for learning rate warmup
|
|
234
|
-
*/
|
|
235
|
-
num_warmup_steps: number;
|
|
236
|
-
/**
|
|
237
|
-
* Type of optimizer to use (adam, adamw, or sgd)
|
|
238
|
-
*/
|
|
239
|
-
optimizer_type: 'adam' | 'adamw' | 'sgd';
|
|
240
|
-
/**
|
|
241
|
-
* Weight decay coefficient for regularization
|
|
242
|
-
*/
|
|
243
|
-
weight_decay: number;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
export interface PostTrainingSupervisedFineTuneParams {
|
|
248
|
-
/**
|
|
249
|
-
* The hyperparam search configuration.
|
|
250
|
-
*/
|
|
251
|
-
hyperparam_search_config: {
|
|
252
|
-
[key: string]: boolean | number | string | Array<unknown> | unknown | null;
|
|
253
|
-
};
|
|
254
|
-
/**
|
|
255
|
-
* The UUID of the job to create.
|
|
256
|
-
*/
|
|
257
|
-
job_uuid: string;
|
|
258
|
-
/**
|
|
259
|
-
* The logger configuration.
|
|
260
|
-
*/
|
|
261
|
-
logger_config: {
|
|
262
|
-
[key: string]: boolean | number | string | Array<unknown> | unknown | null;
|
|
263
|
-
};
|
|
264
|
-
/**
|
|
265
|
-
* The training configuration.
|
|
266
|
-
*/
|
|
267
|
-
training_config: PostTrainingSupervisedFineTuneParams.TrainingConfig;
|
|
268
|
-
/**
|
|
269
|
-
* The algorithm configuration.
|
|
270
|
-
*/
|
|
271
|
-
algorithm_config?: AlgorithmConfig;
|
|
272
|
-
/**
|
|
273
|
-
* The directory to save checkpoint(s) to.
|
|
274
|
-
*/
|
|
275
|
-
checkpoint_dir?: string;
|
|
276
|
-
/**
|
|
277
|
-
* The model to fine-tune.
|
|
278
|
-
*/
|
|
279
|
-
model?: string;
|
|
280
|
-
}
|
|
281
|
-
export declare namespace PostTrainingSupervisedFineTuneParams {
|
|
282
|
-
/**
|
|
283
|
-
* The training configuration.
|
|
284
|
-
*/
|
|
285
|
-
interface TrainingConfig {
|
|
286
|
-
/**
|
|
287
|
-
* Number of steps to accumulate gradients before updating
|
|
288
|
-
*/
|
|
289
|
-
gradient_accumulation_steps: number;
|
|
290
|
-
/**
|
|
291
|
-
* Maximum number of steps to run per epoch
|
|
292
|
-
*/
|
|
293
|
-
max_steps_per_epoch: number;
|
|
294
|
-
/**
|
|
295
|
-
* Number of training epochs to run
|
|
296
|
-
*/
|
|
297
|
-
n_epochs: number;
|
|
298
|
-
/**
|
|
299
|
-
* (Optional) Configuration for data loading and formatting
|
|
300
|
-
*/
|
|
301
|
-
data_config?: TrainingConfig.DataConfig;
|
|
302
|
-
/**
|
|
303
|
-
* (Optional) Data type for model parameters (bf16, fp16, fp32)
|
|
304
|
-
*/
|
|
305
|
-
dtype?: string;
|
|
306
|
-
/**
|
|
307
|
-
* (Optional) Configuration for memory and compute optimizations
|
|
308
|
-
*/
|
|
309
|
-
efficiency_config?: TrainingConfig.EfficiencyConfig;
|
|
310
|
-
/**
|
|
311
|
-
* (Optional) Maximum number of validation steps per epoch
|
|
312
|
-
*/
|
|
313
|
-
max_validation_steps?: number;
|
|
314
|
-
/**
|
|
315
|
-
* (Optional) Configuration for the optimization algorithm
|
|
316
|
-
*/
|
|
317
|
-
optimizer_config?: TrainingConfig.OptimizerConfig;
|
|
318
|
-
}
|
|
319
|
-
namespace TrainingConfig {
|
|
320
|
-
/**
|
|
321
|
-
* (Optional) Configuration for data loading and formatting
|
|
322
|
-
*/
|
|
323
|
-
interface DataConfig {
|
|
324
|
-
/**
|
|
325
|
-
* Number of samples per training batch
|
|
326
|
-
*/
|
|
327
|
-
batch_size: number;
|
|
328
|
-
/**
|
|
329
|
-
* Format of the dataset (instruct or dialog)
|
|
330
|
-
*/
|
|
331
|
-
data_format: 'instruct' | 'dialog';
|
|
332
|
-
/**
|
|
333
|
-
* Unique identifier for the training dataset
|
|
334
|
-
*/
|
|
335
|
-
dataset_id: string;
|
|
336
|
-
/**
|
|
337
|
-
* Whether to shuffle the dataset during training
|
|
338
|
-
*/
|
|
339
|
-
shuffle: boolean;
|
|
340
|
-
/**
|
|
341
|
-
* (Optional) Whether to pack multiple samples into a single sequence for
|
|
342
|
-
* efficiency
|
|
343
|
-
*/
|
|
344
|
-
packed?: boolean;
|
|
345
|
-
/**
|
|
346
|
-
* (Optional) Whether to compute loss on input tokens as well as output tokens
|
|
347
|
-
*/
|
|
348
|
-
train_on_input?: boolean;
|
|
349
|
-
/**
|
|
350
|
-
* (Optional) Unique identifier for the validation dataset
|
|
351
|
-
*/
|
|
352
|
-
validation_dataset_id?: string;
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* (Optional) Configuration for memory and compute optimizations
|
|
356
|
-
*/
|
|
357
|
-
interface EfficiencyConfig {
|
|
358
|
-
/**
|
|
359
|
-
* (Optional) Whether to use activation checkpointing to reduce memory usage
|
|
360
|
-
*/
|
|
361
|
-
enable_activation_checkpointing?: boolean;
|
|
362
|
-
/**
|
|
363
|
-
* (Optional) Whether to offload activations to CPU to save GPU memory
|
|
364
|
-
*/
|
|
365
|
-
enable_activation_offloading?: boolean;
|
|
366
|
-
/**
|
|
367
|
-
* (Optional) Whether to offload FSDP parameters to CPU
|
|
368
|
-
*/
|
|
369
|
-
fsdp_cpu_offload?: boolean;
|
|
370
|
-
/**
|
|
371
|
-
* (Optional) Whether to use memory-efficient FSDP wrapping
|
|
372
|
-
*/
|
|
373
|
-
memory_efficient_fsdp_wrap?: boolean;
|
|
374
|
-
}
|
|
375
|
-
/**
|
|
376
|
-
* (Optional) Configuration for the optimization algorithm
|
|
377
|
-
*/
|
|
378
|
-
interface OptimizerConfig {
|
|
379
|
-
/**
|
|
380
|
-
* Learning rate for the optimizer
|
|
381
|
-
*/
|
|
382
|
-
lr: number;
|
|
383
|
-
/**
|
|
384
|
-
* Number of steps for learning rate warmup
|
|
385
|
-
*/
|
|
386
|
-
num_warmup_steps: number;
|
|
387
|
-
/**
|
|
388
|
-
* Type of optimizer to use (adam, adamw, or sgd)
|
|
389
|
-
*/
|
|
390
|
-
optimizer_type: 'adam' | 'adamw' | 'sgd';
|
|
391
|
-
/**
|
|
392
|
-
* Weight decay coefficient for regularization
|
|
393
|
-
*/
|
|
394
|
-
weight_decay: number;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
export declare namespace PostTraining {
|
|
399
|
-
export { type AlgorithmConfig as AlgorithmConfig, type ListPostTrainingJobsResponse as ListPostTrainingJobsResponse, type PostTrainingJob as PostTrainingJob, type PostTrainingPreferenceOptimizeParams as PostTrainingPreferenceOptimizeParams, type PostTrainingSupervisedFineTuneParams as PostTrainingSupervisedFineTuneParams, };
|
|
400
|
-
export { Job as Job, type JobListResponse as JobListResponse, type JobArtifactsResponse as JobArtifactsResponse, type JobStatusResponse as JobStatusResponse, type JobArtifactsParams as JobArtifactsParams, type JobCancelParams as JobCancelParams, type JobStatusParams as JobStatusParams, };
|
|
401
|
-
}
|
|
402
|
-
//# sourceMappingURL=post-training.d.ts.map
|