llama-stack-client 0.0.1-alpha.0 → 0.1.0
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/LICENSE +22 -201
- package/README.md +60 -26
- package/core.d.ts +7 -7
- package/core.d.ts.map +1 -1
- package/core.js +35 -16
- package/core.js.map +1 -1
- package/core.mjs +32 -14
- package/core.mjs.map +1 -1
- package/error.d.ts +18 -24
- package/error.d.ts.map +1 -1
- package/error.js +1 -31
- package/error.js.map +1 -1
- package/error.mjs +1 -31
- package/error.mjs.map +1 -1
- package/index.d.mts +100 -121
- package/index.d.ts +100 -121
- package/index.d.ts.map +1 -1
- package/index.js +90 -44
- package/index.js.map +1 -1
- package/index.mjs +74 -43
- package/index.mjs.map +1 -1
- package/internal/decoders/jsonl.d.ts +12 -0
- package/internal/decoders/jsonl.d.ts.map +1 -0
- package/internal/decoders/jsonl.js +35 -0
- package/internal/decoders/jsonl.js.map +1 -0
- package/internal/decoders/jsonl.mjs +31 -0
- package/internal/decoders/jsonl.mjs.map +1 -0
- package/internal/decoders/line.d.ts +20 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +88 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +84 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +11 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +8 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +280 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +276 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +229 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/stream-utils.d.ts +8 -0
- package/internal/stream-utils.d.ts.map +1 -0
- package/internal/stream-utils.js +39 -0
- package/internal/stream-utils.js.map +1 -0
- package/internal/stream-utils.mjs +35 -0
- package/internal/stream-utils.mjs.map +1 -0
- package/package.json +8 -6
- package/resources/agents/agents.d.ts +22 -187
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +15 -32
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +15 -32
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/index.d.ts +4 -4
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js +7 -7
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs +3 -3
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/session.d.ts +28 -0
- package/resources/agents/session.d.ts.map +1 -0
- package/resources/agents/session.js +25 -0
- package/resources/agents/session.js.map +1 -0
- package/resources/agents/session.mjs +21 -0
- package/resources/agents/session.mjs.map +1 -0
- package/resources/agents/steps.d.ts +3 -24
- package/resources/agents/steps.d.ts.map +1 -1
- package/resources/agents/steps.js +2 -14
- package/resources/agents/steps.js.map +1 -1
- package/resources/agents/steps.mjs +2 -14
- package/resources/agents/steps.mjs.map +1 -1
- package/resources/agents/turn.d.ts +169 -0
- package/resources/agents/turn.d.ts.map +1 -0
- package/resources/agents/turn.js +19 -0
- package/resources/agents/turn.js.map +1 -0
- package/resources/agents/turn.mjs +15 -0
- package/resources/agents/turn.mjs.map +1 -0
- package/resources/batch-inference.d.ts +17 -64
- package/resources/batch-inference.d.ts.map +1 -1
- package/resources/batch-inference.js +4 -26
- package/resources/batch-inference.js.map +1 -1
- package/resources/batch-inference.mjs +4 -26
- package/resources/batch-inference.mjs.map +1 -1
- package/resources/datasetio.d.ts +25 -0
- package/resources/datasetio.d.ts.map +1 -0
- package/resources/datasetio.js +19 -0
- package/resources/datasetio.js.map +1 -0
- package/resources/datasetio.mjs +15 -0
- package/resources/datasetio.mjs.map +1 -0
- package/resources/datasets.d.ts +45 -46
- package/resources/datasets.d.ts.map +1 -1
- package/resources/datasets.js +11 -35
- package/resources/datasets.js.map +1 -1
- package/resources/datasets.mjs +11 -35
- package/resources/datasets.mjs.map +1 -1
- package/resources/eval/eval.d.ts +59 -0
- package/resources/eval/eval.d.ts.map +1 -0
- package/resources/{inference/embeddings.js → eval/eval.js} +16 -20
- package/resources/eval/eval.js.map +1 -0
- package/resources/eval/eval.mjs +18 -0
- package/resources/eval/eval.mjs.map +1 -0
- package/resources/eval/index.d.ts +3 -0
- package/resources/eval/index.d.ts.map +1 -0
- package/resources/eval/index.js +9 -0
- package/resources/eval/index.js.map +1 -0
- package/resources/eval/index.mjs +4 -0
- package/resources/eval/index.mjs.map +1 -0
- package/resources/eval/jobs.d.ts +13 -0
- package/resources/eval/jobs.d.ts.map +1 -0
- package/resources/eval/jobs.js +21 -0
- package/resources/eval/jobs.js.map +1 -0
- package/resources/eval/jobs.mjs +17 -0
- package/resources/eval/jobs.mjs.map +1 -0
- package/resources/eval-tasks.d.ts +32 -0
- package/resources/eval-tasks.d.ts.map +1 -0
- package/resources/eval-tasks.js +22 -0
- package/resources/eval-tasks.js.map +1 -0
- package/resources/eval-tasks.mjs +18 -0
- package/resources/eval-tasks.mjs.map +1 -0
- package/resources/index.d.ts +23 -15
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +33 -17
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +19 -11
- package/resources/index.mjs.map +1 -1
- package/resources/inference.d.ts +241 -0
- package/resources/inference.d.ts.map +1 -0
- package/resources/inference.js +29 -0
- package/resources/inference.js.map +1 -0
- package/resources/inference.mjs +25 -0
- package/resources/inference.mjs.map +1 -0
- package/resources/inspect.d.ts +26 -0
- package/resources/inspect.d.ts.map +1 -0
- package/resources/inspect.js +15 -0
- package/resources/inspect.js.map +1 -0
- package/resources/inspect.mjs +11 -0
- package/resources/inspect.mjs.map +1 -0
- package/resources/models.d.ts +21 -36
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +11 -27
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +11 -27
- package/resources/models.mjs.map +1 -1
- package/resources/post-training/index.d.ts +2 -2
- package/resources/post-training/index.d.ts.map +1 -1
- package/resources/post-training/index.js +3 -3
- package/resources/post-training/index.js.map +1 -1
- package/resources/post-training/index.mjs +1 -1
- package/resources/post-training/index.mjs.map +1 -1
- package/resources/post-training/job.d.ts +40 -0
- package/resources/post-training/job.d.ts.map +1 -0
- package/resources/post-training/job.js +25 -0
- package/resources/post-training/job.js.map +1 -0
- package/resources/post-training/job.mjs +21 -0
- package/resources/post-training/job.mjs.map +1 -0
- package/resources/post-training/post-training.d.ts +95 -142
- package/resources/post-training/post-training.d.ts.map +1 -1
- package/resources/post-training/post-training.js +8 -29
- package/resources/post-training/post-training.js.map +1 -1
- package/resources/post-training/post-training.mjs +8 -29
- package/resources/post-training/post-training.mjs.map +1 -1
- package/resources/providers.d.ts +14 -0
- package/resources/providers.d.ts.map +1 -0
- package/resources/providers.js +12 -0
- package/resources/providers.js.map +1 -0
- package/resources/providers.mjs +8 -0
- package/resources/providers.mjs.map +1 -0
- package/resources/routes.d.ts +14 -0
- package/resources/routes.d.ts.map +1 -0
- package/resources/routes.js +12 -0
- package/resources/routes.js.map +1 -0
- package/resources/routes.mjs +8 -0
- package/resources/routes.mjs.map +1 -0
- package/resources/safety.d.ts +6 -29
- package/resources/safety.d.ts.map +1 -1
- package/resources/safety.js +2 -14
- package/resources/safety.js.map +1 -1
- package/resources/safety.mjs +2 -14
- package/resources/safety.mjs.map +1 -1
- package/resources/scoring-functions.d.ts +53 -0
- package/resources/scoring-functions.d.ts.map +1 -0
- package/resources/scoring-functions.js +22 -0
- package/resources/scoring-functions.js.map +1 -0
- package/resources/scoring-functions.mjs +18 -0
- package/resources/scoring-functions.mjs.map +1 -0
- package/resources/scoring.d.ts +28 -0
- package/resources/scoring.d.ts.map +1 -0
- package/resources/scoring.js +15 -0
- package/resources/scoring.js.map +1 -0
- package/resources/scoring.mjs +11 -0
- package/resources/scoring.mjs.map +1 -0
- package/resources/shared.d.ts +338 -14
- package/resources/shared.d.ts.map +1 -1
- package/resources/shields.d.ts +18 -32
- package/resources/shields.d.ts.map +1 -1
- package/resources/shields.js +7 -29
- package/resources/shields.js.map +1 -1
- package/resources/shields.mjs +7 -29
- package/resources/shields.mjs.map +1 -1
- package/resources/synthetic-data-generation.d.ts +7 -24
- package/resources/synthetic-data-generation.d.ts.map +1 -1
- package/resources/synthetic-data-generation.js +5 -17
- package/resources/synthetic-data-generation.js.map +1 -1
- package/resources/synthetic-data-generation.mjs +3 -15
- package/resources/synthetic-data-generation.mjs.map +1 -1
- package/resources/telemetry.d.ts +95 -35
- package/resources/telemetry.d.ts.map +1 -1
- package/resources/telemetry.js +29 -22
- package/resources/telemetry.js.map +1 -1
- package/resources/telemetry.mjs +29 -22
- package/resources/telemetry.mjs.map +1 -1
- package/resources/tool-runtime/index.d.ts +3 -0
- package/resources/tool-runtime/index.d.ts.map +1 -0
- package/resources/tool-runtime/index.js +9 -0
- package/resources/tool-runtime/index.js.map +1 -0
- package/resources/tool-runtime/index.mjs +4 -0
- package/resources/tool-runtime/index.mjs.map +1 -0
- package/resources/tool-runtime/rag-tool.d.ts +27 -0
- package/resources/tool-runtime/rag-tool.d.ts.map +1 -0
- package/resources/tool-runtime/rag-tool.js +25 -0
- package/resources/tool-runtime/rag-tool.js.map +1 -0
- package/resources/tool-runtime/rag-tool.mjs +21 -0
- package/resources/tool-runtime/rag-tool.mjs.map +1 -0
- package/resources/tool-runtime/tool-runtime.d.ts +48 -0
- package/resources/tool-runtime/tool-runtime.d.ts.map +1 -0
- package/resources/{evaluate/evaluate.js → tool-runtime/tool-runtime.js} +29 -18
- package/resources/tool-runtime/tool-runtime.js.map +1 -0
- package/resources/tool-runtime/tool-runtime.mjs +33 -0
- package/resources/tool-runtime/tool-runtime.mjs.map +1 -0
- package/resources/toolgroups.d.ts +40 -0
- package/resources/toolgroups.d.ts.map +1 -0
- package/resources/toolgroups.js +37 -0
- package/resources/toolgroups.js.map +1 -0
- package/resources/toolgroups.mjs +33 -0
- package/resources/toolgroups.mjs.map +1 -0
- package/resources/tools.d.ts +41 -0
- package/resources/tools.d.ts.map +1 -0
- package/resources/tools.js +19 -0
- package/resources/tools.js.map +1 -0
- package/resources/tools.mjs +15 -0
- package/resources/tools.mjs.map +1 -0
- package/resources/vector-dbs.d.ts +59 -0
- package/resources/vector-dbs.d.ts.map +1 -0
- package/resources/vector-dbs.js +24 -0
- package/resources/vector-dbs.js.map +1 -0
- package/resources/vector-dbs.mjs +20 -0
- package/resources/vector-dbs.mjs.map +1 -0
- package/resources/vector-io.d.ts +37 -0
- package/resources/vector-io.d.ts.map +1 -0
- package/resources/vector-io.js +19 -0
- package/resources/vector-io.js.map +1 -0
- package/resources/vector-io.mjs +15 -0
- package/resources/vector-io.mjs.map +1 -0
- package/src/core.ts +46 -24
- package/src/error.ts +25 -41
- package/src/index.ts +437 -155
- package/src/internal/decoders/jsonl.ts +41 -0
- package/src/internal/decoders/line.ts +114 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +9 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +388 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/stream-utils.ts +32 -0
- package/src/resources/agents/agents.ts +72 -299
- package/src/resources/agents/index.ts +24 -27
- package/src/resources/agents/session.ts +73 -0
- package/src/resources/agents/steps.ts +14 -40
- package/src/resources/agents/turn.ts +292 -0
- package/src/resources/batch-inference.ts +30 -95
- package/src/resources/datasetio.ts +53 -0
- package/src/resources/datasets.ts +87 -81
- package/src/resources/eval/eval.ts +104 -0
- package/src/resources/eval/index.ts +12 -0
- package/src/resources/eval/jobs.ts +36 -0
- package/src/resources/eval-tasks.ts +69 -0
- package/src/resources/index.ts +141 -65
- package/src/resources/inference.ts +346 -0
- package/src/resources/inspect.ts +47 -0
- package/src/resources/models.ts +46 -66
- package/src/resources/post-training/index.ts +14 -14
- package/src/resources/post-training/job.ts +84 -0
- package/src/resources/post-training/post-training.ts +151 -182
- package/src/resources/providers.ts +26 -0
- package/src/resources/routes.ts +23 -0
- package/src/resources/safety.ts +8 -47
- package/src/resources/scoring-functions.ts +108 -0
- package/src/resources/scoring.ts +52 -0
- package/src/resources/shared.ts +462 -14
- package/src/resources/shields.ts +37 -64
- package/src/resources/synthetic-data-generation.ts +13 -40
- package/src/resources/telemetry.ts +229 -65
- package/src/resources/tool-runtime/index.ts +10 -0
- package/src/resources/tool-runtime/rag-tool.ts +45 -0
- package/src/resources/tool-runtime/tool-runtime.ts +106 -0
- package/src/resources/toolgroups.ts +80 -0
- package/src/resources/tools.ts +81 -0
- package/src/resources/vector-dbs.ts +121 -0
- package/src/resources/vector-io.ts +65 -0
- package/src/streaming.ts +6 -148
- package/src/version.ts +1 -1
- package/streaming.d.ts +0 -7
- package/streaming.d.ts.map +1 -1
- package/streaming.js +8 -123
- package/streaming.js.map +1 -1
- package/streaming.mjs +4 -118
- package/streaming.mjs.map +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/sessions.d.ts +0 -76
- package/resources/agents/sessions.d.ts.map +0 -1
- package/resources/agents/sessions.js +0 -52
- package/resources/agents/sessions.js.map +0 -1
- package/resources/agents/sessions.mjs +0 -48
- package/resources/agents/sessions.mjs.map +0 -1
- package/resources/agents/turns.d.ts +0 -133
- package/resources/agents/turns.d.ts.map +0 -1
- package/resources/agents/turns.js +0 -38
- package/resources/agents/turns.js.map +0 -1
- package/resources/agents/turns.mjs +0 -34
- package/resources/agents/turns.mjs.map +0 -1
- package/resources/evaluate/evaluate.d.ts +0 -29
- package/resources/evaluate/evaluate.d.ts.map +0 -1
- package/resources/evaluate/evaluate.js.map +0 -1
- package/resources/evaluate/evaluate.mjs +0 -22
- package/resources/evaluate/evaluate.mjs.map +0 -1
- package/resources/evaluate/index.d.ts +0 -6
- package/resources/evaluate/index.d.ts.map +0 -1
- package/resources/evaluate/index.js +0 -15
- package/resources/evaluate/index.js.map +0 -1
- package/resources/evaluate/index.mjs +0 -7
- package/resources/evaluate/index.mjs.map +0 -1
- package/resources/evaluate/jobs/artifacts.d.ts +0 -22
- package/resources/evaluate/jobs/artifacts.d.ts.map +0 -1
- package/resources/evaluate/jobs/artifacts.js +0 -24
- package/resources/evaluate/jobs/artifacts.js.map +0 -1
- package/resources/evaluate/jobs/artifacts.mjs +0 -20
- package/resources/evaluate/jobs/artifacts.mjs.map +0 -1
- package/resources/evaluate/jobs/index.d.ts +0 -5
- package/resources/evaluate/jobs/index.d.ts.map +0 -1
- package/resources/evaluate/jobs/index.js +0 -13
- package/resources/evaluate/jobs/index.js.map +0 -1
- package/resources/evaluate/jobs/index.mjs +0 -6
- package/resources/evaluate/jobs/index.mjs.map +0 -1
- package/resources/evaluate/jobs/jobs.d.ts +0 -56
- package/resources/evaluate/jobs/jobs.d.ts.map +0 -1
- package/resources/evaluate/jobs/jobs.js +0 -76
- package/resources/evaluate/jobs/jobs.js.map +0 -1
- package/resources/evaluate/jobs/jobs.mjs +0 -49
- package/resources/evaluate/jobs/jobs.mjs.map +0 -1
- package/resources/evaluate/jobs/logs.d.ts +0 -22
- package/resources/evaluate/jobs/logs.d.ts.map +0 -1
- package/resources/evaluate/jobs/logs.js +0 -24
- package/resources/evaluate/jobs/logs.js.map +0 -1
- package/resources/evaluate/jobs/logs.mjs +0 -20
- package/resources/evaluate/jobs/logs.mjs.map +0 -1
- package/resources/evaluate/jobs/status.d.ts +0 -22
- package/resources/evaluate/jobs/status.d.ts.map +0 -1
- package/resources/evaluate/jobs/status.js +0 -24
- package/resources/evaluate/jobs/status.js.map +0 -1
- package/resources/evaluate/jobs/status.mjs +0 -20
- package/resources/evaluate/jobs/status.mjs.map +0 -1
- package/resources/evaluate/question-answering.d.ts +0 -22
- package/resources/evaluate/question-answering.d.ts.map +0 -1
- package/resources/evaluate/question-answering.js +0 -24
- package/resources/evaluate/question-answering.js.map +0 -1
- package/resources/evaluate/question-answering.mjs +0 -20
- package/resources/evaluate/question-answering.mjs.map +0 -1
- package/resources/evaluate/summarization.d.ts +0 -4
- package/resources/evaluate/summarization.d.ts.map +0 -1
- package/resources/evaluate/summarization.js +0 -9
- package/resources/evaluate/summarization.js.map +0 -1
- package/resources/evaluate/summarization.mjs +0 -5
- package/resources/evaluate/summarization.mjs.map +0 -1
- package/resources/evaluate/text-generation.d.ts +0 -4
- package/resources/evaluate/text-generation.d.ts.map +0 -1
- package/resources/evaluate/text-generation.js +0 -9
- package/resources/evaluate/text-generation.js.map +0 -1
- package/resources/evaluate/text-generation.mjs +0 -5
- package/resources/evaluate/text-generation.mjs.map +0 -1
- package/resources/evaluations.d.ts +0 -35
- package/resources/evaluations.d.ts.map +0 -1
- package/resources/evaluations.js +0 -37
- package/resources/evaluations.js.map +0 -1
- package/resources/evaluations.mjs +0 -33
- package/resources/evaluations.mjs.map +0 -1
- package/resources/inference/embeddings.d.ts +0 -29
- package/resources/inference/embeddings.d.ts.map +0 -1
- package/resources/inference/embeddings.js.map +0 -1
- package/resources/inference/embeddings.mjs +0 -22
- package/resources/inference/embeddings.mjs.map +0 -1
- package/resources/inference/index.d.ts +0 -3
- package/resources/inference/index.d.ts.map +0 -1
- package/resources/inference/index.js +0 -9
- package/resources/inference/index.js.map +0 -1
- package/resources/inference/index.mjs +0 -4
- package/resources/inference/index.mjs.map +0 -1
- package/resources/inference/inference.d.ts +0 -172
- package/resources/inference/inference.d.ts.map +0 -1
- package/resources/inference/inference.js +0 -67
- package/resources/inference/inference.js.map +0 -1
- package/resources/inference/inference.mjs +0 -40
- package/resources/inference/inference.mjs.map +0 -1
- package/resources/memory/documents.d.ts +0 -49
- package/resources/memory/documents.d.ts.map +0 -1
- package/resources/memory/documents.js +0 -39
- package/resources/memory/documents.js.map +0 -1
- package/resources/memory/documents.mjs +0 -35
- package/resources/memory/documents.mjs.map +0 -1
- package/resources/memory/index.d.ts +0 -3
- package/resources/memory/index.d.ts.map +0 -1
- package/resources/memory/index.js +0 -9
- package/resources/memory/index.js.map +0 -1
- package/resources/memory/index.mjs +0 -4
- package/resources/memory/index.mjs.map +0 -1
- package/resources/memory/memory.d.ts +0 -158
- package/resources/memory/memory.d.ts.map +0 -1
- package/resources/memory/memory.js +0 -137
- package/resources/memory/memory.js.map +0 -1
- package/resources/memory/memory.mjs +0 -110
- package/resources/memory/memory.mjs.map +0 -1
- package/resources/memory-banks.d.ts +0 -42
- package/resources/memory-banks.d.ts.map +0 -1
- package/resources/memory-banks.js +0 -40
- package/resources/memory-banks.js.map +0 -1
- package/resources/memory-banks.mjs +0 -36
- package/resources/memory-banks.mjs.map +0 -1
- package/resources/post-training/jobs.d.ts +0 -91
- package/resources/post-training/jobs.d.ts.map +0 -1
- package/resources/post-training/jobs.js +0 -80
- package/resources/post-training/jobs.js.map +0 -1
- package/resources/post-training/jobs.mjs +0 -76
- package/resources/post-training/jobs.mjs.map +0 -1
- package/resources/reward-scoring.d.ts +0 -47
- package/resources/reward-scoring.d.ts.map +0 -1
- package/resources/reward-scoring.js +0 -24
- package/resources/reward-scoring.js.map +0 -1
- package/resources/reward-scoring.mjs +0 -20
- package/resources/reward-scoring.mjs.map +0 -1
- package/src/resources/agents/sessions.ts +0 -135
- package/src/resources/agents/turns.ts +0 -231
- package/src/resources/evaluate/evaluate.ts +0 -35
- package/src/resources/evaluate/index.ts +0 -14
- package/src/resources/evaluate/jobs/artifacts.ts +0 -42
- package/src/resources/evaluate/jobs/index.ts +0 -13
- package/src/resources/evaluate/jobs/jobs.ts +0 -99
- package/src/resources/evaluate/jobs/logs.ts +0 -42
- package/src/resources/evaluate/jobs/status.ts +0 -42
- package/src/resources/evaluate/question-answering.ts +0 -42
- package/src/resources/evaluate/summarization.ts +0 -5
- package/src/resources/evaluate/text-generation.ts +0 -5
- package/src/resources/evaluations.ts +0 -73
- package/src/resources/inference/embeddings.ts +0 -48
- package/src/resources/inference/index.ts +0 -15
- package/src/resources/inference/inference.ts +0 -268
- package/src/resources/memory/documents.ts +0 -92
- package/src/resources/memory/index.ts +0 -23
- package/src/resources/memory/memory.ts +0 -297
- package/src/resources/memory-banks.ts +0 -84
- package/src/resources/post-training/jobs.ts +0 -192
- package/src/resources/reward-scoring.ts +0 -82
package/resources/shared.d.ts
CHANGED
|
@@ -1,26 +1,319 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as Shared from "./shared.js";
|
|
2
|
+
import * as InferenceAPI from "./inference.js";
|
|
3
|
+
import * as ToolRuntimeAPI from "./tool-runtime/tool-runtime.js";
|
|
4
|
+
export interface AgentConfig {
|
|
5
|
+
enable_session_persistence: boolean;
|
|
6
|
+
instructions: string;
|
|
7
|
+
max_infer_iters: number;
|
|
8
|
+
model: string;
|
|
9
|
+
client_tools?: Array<ToolRuntimeAPI.ToolDef>;
|
|
10
|
+
input_shields?: Array<string>;
|
|
11
|
+
output_shields?: Array<string>;
|
|
12
|
+
response_format?: ResponseFormat;
|
|
13
|
+
sampling_params?: SamplingParams;
|
|
14
|
+
tool_choice?: 'auto' | 'required';
|
|
15
|
+
tool_prompt_format?: 'json' | 'function_tag' | 'python_list';
|
|
16
|
+
toolgroups?: Array<string | AgentConfig.UnionMember1>;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace AgentConfig {
|
|
19
|
+
interface UnionMember1 {
|
|
20
|
+
args: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
4
23
|
}
|
|
5
24
|
export interface BatchCompletion {
|
|
6
|
-
|
|
25
|
+
batch: Array<InferenceAPI.CompletionResponse>;
|
|
26
|
+
}
|
|
27
|
+
export interface ChatCompletionResponse {
|
|
28
|
+
/**
|
|
29
|
+
* The complete response message
|
|
30
|
+
*/
|
|
31
|
+
completion_message: CompletionMessage;
|
|
32
|
+
/**
|
|
33
|
+
* Optional log probabilities for generated tokens
|
|
34
|
+
*/
|
|
35
|
+
logprobs?: Array<InferenceAPI.TokenLogProbs>;
|
|
7
36
|
}
|
|
8
37
|
export interface CompletionMessage {
|
|
9
|
-
|
|
38
|
+
/**
|
|
39
|
+
* The content of the model's response
|
|
40
|
+
*/
|
|
41
|
+
content: InterleavedContent;
|
|
42
|
+
/**
|
|
43
|
+
* Must be "assistant" to identify this as the model's response
|
|
44
|
+
*/
|
|
10
45
|
role: 'assistant';
|
|
46
|
+
/**
|
|
47
|
+
* Reason why the model stopped generating. Options are: -
|
|
48
|
+
* `StopReason.end_of_turn`: The model finished generating the entire response. -
|
|
49
|
+
* `StopReason.end_of_message`: The model finished generating but generated a
|
|
50
|
+
* partial response -- usually, a tool call. The user may call the tool and
|
|
51
|
+
* continue the conversation with the tool's response. -
|
|
52
|
+
* `StopReason.out_of_tokens`: The model ran out of token budget.
|
|
53
|
+
*/
|
|
11
54
|
stop_reason: 'end_of_turn' | 'end_of_message' | 'out_of_tokens';
|
|
55
|
+
/**
|
|
56
|
+
* List of tool calls. Each tool call is a ToolCall object.
|
|
57
|
+
*/
|
|
12
58
|
tool_calls: Array<ToolCall>;
|
|
13
59
|
}
|
|
60
|
+
export type ContentDelta = ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.ToolCallDelta;
|
|
61
|
+
export declare namespace ContentDelta {
|
|
62
|
+
interface TextDelta {
|
|
63
|
+
text: string;
|
|
64
|
+
type: 'text';
|
|
65
|
+
}
|
|
66
|
+
interface ImageDelta {
|
|
67
|
+
image: string;
|
|
68
|
+
type: 'image';
|
|
69
|
+
}
|
|
70
|
+
interface ToolCallDelta {
|
|
71
|
+
parse_status: 'started' | 'in_progress' | 'failed' | 'succeeded';
|
|
72
|
+
tool_call: string | Shared.ToolCall;
|
|
73
|
+
type: 'tool_call';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export interface Document {
|
|
77
|
+
content: string | Document.ImageContentItem | Document.TextContentItem | Array<InterleavedContentItem> | URL;
|
|
78
|
+
document_id: string;
|
|
79
|
+
metadata: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
80
|
+
mime_type?: string;
|
|
81
|
+
}
|
|
82
|
+
export declare namespace Document {
|
|
83
|
+
interface ImageContentItem {
|
|
84
|
+
/**
|
|
85
|
+
* Image as a base64 encoded string or an URL
|
|
86
|
+
*/
|
|
87
|
+
image: ImageContentItem.Image;
|
|
88
|
+
/**
|
|
89
|
+
* Discriminator type of the content item. Always "image"
|
|
90
|
+
*/
|
|
91
|
+
type: 'image';
|
|
92
|
+
}
|
|
93
|
+
namespace ImageContentItem {
|
|
94
|
+
/**
|
|
95
|
+
* Image as a base64 encoded string or an URL
|
|
96
|
+
*/
|
|
97
|
+
interface Image {
|
|
98
|
+
/**
|
|
99
|
+
* base64 encoded image data as string
|
|
100
|
+
*/
|
|
101
|
+
data?: string;
|
|
102
|
+
/**
|
|
103
|
+
* A URL of the image or data URL in the format of data:image/{type};base64,{data}.
|
|
104
|
+
* Note that URL could have length limits.
|
|
105
|
+
*/
|
|
106
|
+
url?: Shared.URL;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
interface TextContentItem {
|
|
110
|
+
/**
|
|
111
|
+
* Text content
|
|
112
|
+
*/
|
|
113
|
+
text: string;
|
|
114
|
+
/**
|
|
115
|
+
* Discriminator type of the content item. Always "text"
|
|
116
|
+
*/
|
|
117
|
+
type: 'text';
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export type InterleavedContent = string | InterleavedContent.ImageContentItem | InterleavedContent.TextContentItem | Array<InterleavedContentItem>;
|
|
121
|
+
export declare namespace InterleavedContent {
|
|
122
|
+
interface ImageContentItem {
|
|
123
|
+
/**
|
|
124
|
+
* Image as a base64 encoded string or an URL
|
|
125
|
+
*/
|
|
126
|
+
image: ImageContentItem.Image;
|
|
127
|
+
/**
|
|
128
|
+
* Discriminator type of the content item. Always "image"
|
|
129
|
+
*/
|
|
130
|
+
type: 'image';
|
|
131
|
+
}
|
|
132
|
+
namespace ImageContentItem {
|
|
133
|
+
/**
|
|
134
|
+
* Image as a base64 encoded string or an URL
|
|
135
|
+
*/
|
|
136
|
+
interface Image {
|
|
137
|
+
/**
|
|
138
|
+
* base64 encoded image data as string
|
|
139
|
+
*/
|
|
140
|
+
data?: string;
|
|
141
|
+
/**
|
|
142
|
+
* A URL of the image or data URL in the format of data:image/{type};base64,{data}.
|
|
143
|
+
* Note that URL could have length limits.
|
|
144
|
+
*/
|
|
145
|
+
url?: Shared.URL;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
interface TextContentItem {
|
|
149
|
+
/**
|
|
150
|
+
* Text content
|
|
151
|
+
*/
|
|
152
|
+
text: string;
|
|
153
|
+
/**
|
|
154
|
+
* Discriminator type of the content item. Always "text"
|
|
155
|
+
*/
|
|
156
|
+
type: 'text';
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
export type InterleavedContentItem = InterleavedContentItem.ImageContentItem | InterleavedContentItem.TextContentItem;
|
|
160
|
+
export declare namespace InterleavedContentItem {
|
|
161
|
+
interface ImageContentItem {
|
|
162
|
+
/**
|
|
163
|
+
* Image as a base64 encoded string or an URL
|
|
164
|
+
*/
|
|
165
|
+
image: ImageContentItem.Image;
|
|
166
|
+
/**
|
|
167
|
+
* Discriminator type of the content item. Always "image"
|
|
168
|
+
*/
|
|
169
|
+
type: 'image';
|
|
170
|
+
}
|
|
171
|
+
namespace ImageContentItem {
|
|
172
|
+
/**
|
|
173
|
+
* Image as a base64 encoded string or an URL
|
|
174
|
+
*/
|
|
175
|
+
interface Image {
|
|
176
|
+
/**
|
|
177
|
+
* base64 encoded image data as string
|
|
178
|
+
*/
|
|
179
|
+
data?: string;
|
|
180
|
+
/**
|
|
181
|
+
* A URL of the image or data URL in the format of data:image/{type};base64,{data}.
|
|
182
|
+
* Note that URL could have length limits.
|
|
183
|
+
*/
|
|
184
|
+
url?: Shared.URL;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
interface TextContentItem {
|
|
188
|
+
/**
|
|
189
|
+
* Text content
|
|
190
|
+
*/
|
|
191
|
+
text: string;
|
|
192
|
+
/**
|
|
193
|
+
* Discriminator type of the content item. Always "text"
|
|
194
|
+
*/
|
|
195
|
+
type: 'text';
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
export type Message = UserMessage | SystemMessage | ToolResponseMessage | CompletionMessage;
|
|
199
|
+
export type ParamType = ParamType.StringType | ParamType.NumberType | ParamType.BooleanType | ParamType.ArrayType | ParamType.ObjectType | ParamType.JsonType | ParamType.UnionType | ParamType.ChatCompletionInputType | ParamType.CompletionInputType | ParamType.AgentTurnInputType;
|
|
200
|
+
export declare namespace ParamType {
|
|
201
|
+
interface StringType {
|
|
202
|
+
type: 'string';
|
|
203
|
+
}
|
|
204
|
+
interface NumberType {
|
|
205
|
+
type: 'number';
|
|
206
|
+
}
|
|
207
|
+
interface BooleanType {
|
|
208
|
+
type: 'boolean';
|
|
209
|
+
}
|
|
210
|
+
interface ArrayType {
|
|
211
|
+
type: 'array';
|
|
212
|
+
}
|
|
213
|
+
interface ObjectType {
|
|
214
|
+
type: 'object';
|
|
215
|
+
}
|
|
216
|
+
interface JsonType {
|
|
217
|
+
type: 'json';
|
|
218
|
+
}
|
|
219
|
+
interface UnionType {
|
|
220
|
+
type: 'union';
|
|
221
|
+
}
|
|
222
|
+
interface ChatCompletionInputType {
|
|
223
|
+
type: 'chat_completion_input';
|
|
224
|
+
}
|
|
225
|
+
interface CompletionInputType {
|
|
226
|
+
type: 'completion_input';
|
|
227
|
+
}
|
|
228
|
+
interface AgentTurnInputType {
|
|
229
|
+
type: 'agent_turn_input';
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
export interface QueryConfig {
|
|
233
|
+
max_chunks: number;
|
|
234
|
+
max_tokens_in_context: number;
|
|
235
|
+
query_generator_config: QueryGeneratorConfig;
|
|
236
|
+
}
|
|
237
|
+
export type QueryGeneratorConfig = QueryGeneratorConfig.DefaultRagQueryGeneratorConfig | QueryGeneratorConfig.LlmragQueryGeneratorConfig;
|
|
238
|
+
export declare namespace QueryGeneratorConfig {
|
|
239
|
+
interface DefaultRagQueryGeneratorConfig {
|
|
240
|
+
separator: string;
|
|
241
|
+
type: 'default';
|
|
242
|
+
}
|
|
243
|
+
interface LlmragQueryGeneratorConfig {
|
|
244
|
+
model: string;
|
|
245
|
+
template: string;
|
|
246
|
+
type: 'llm';
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
export interface QueryResult {
|
|
250
|
+
content?: InterleavedContent;
|
|
251
|
+
}
|
|
252
|
+
export type ResponseFormat = ResponseFormat.JsonSchemaResponseFormat | ResponseFormat.GrammarResponseFormat;
|
|
253
|
+
export declare namespace ResponseFormat {
|
|
254
|
+
interface JsonSchemaResponseFormat {
|
|
255
|
+
/**
|
|
256
|
+
* The JSON schema the response should conform to. In a Python SDK, this is often a
|
|
257
|
+
* `pydantic` model.
|
|
258
|
+
*/
|
|
259
|
+
json_schema: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
260
|
+
/**
|
|
261
|
+
* Must be "json_schema" to identify this format type
|
|
262
|
+
*/
|
|
263
|
+
type: 'json_schema';
|
|
264
|
+
}
|
|
265
|
+
interface GrammarResponseFormat {
|
|
266
|
+
/**
|
|
267
|
+
* The BNF grammar specification the response should conform to
|
|
268
|
+
*/
|
|
269
|
+
bnf: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
270
|
+
/**
|
|
271
|
+
* Must be "grammar" to identify this format type
|
|
272
|
+
*/
|
|
273
|
+
type: 'grammar';
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
export interface ReturnType {
|
|
277
|
+
type: 'string' | 'number' | 'boolean' | 'array' | 'object' | 'json' | 'union' | 'chat_completion_input' | 'completion_input' | 'agent_turn_input';
|
|
278
|
+
}
|
|
279
|
+
export interface SafetyViolation {
|
|
280
|
+
metadata: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
281
|
+
violation_level: 'info' | 'warn' | 'error';
|
|
282
|
+
user_message?: string;
|
|
283
|
+
}
|
|
14
284
|
export interface SamplingParams {
|
|
15
|
-
strategy:
|
|
285
|
+
strategy: SamplingParams.GreedySamplingStrategy | SamplingParams.TopPSamplingStrategy | SamplingParams.TopKSamplingStrategy;
|
|
16
286
|
max_tokens?: number;
|
|
17
287
|
repetition_penalty?: number;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
288
|
+
}
|
|
289
|
+
export declare namespace SamplingParams {
|
|
290
|
+
interface GreedySamplingStrategy {
|
|
291
|
+
type: 'greedy';
|
|
292
|
+
}
|
|
293
|
+
interface TopPSamplingStrategy {
|
|
294
|
+
type: 'top_p';
|
|
295
|
+
temperature?: number;
|
|
296
|
+
top_p?: number;
|
|
297
|
+
}
|
|
298
|
+
interface TopKSamplingStrategy {
|
|
299
|
+
top_k: number;
|
|
300
|
+
type: 'top_k';
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
export interface ScoringResult {
|
|
304
|
+
aggregated_results: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
305
|
+
score_rows: Array<Record<string, boolean | number | string | Array<unknown> | unknown | null>>;
|
|
21
306
|
}
|
|
22
307
|
export interface SystemMessage {
|
|
23
|
-
|
|
308
|
+
/**
|
|
309
|
+
* The content of the "system prompt". If multiple system messages are provided,
|
|
310
|
+
* they are concatenated. The underlying Llama Stack code may also add other system
|
|
311
|
+
* messages (for example, for formatting tool definitions).
|
|
312
|
+
*/
|
|
313
|
+
content: InterleavedContent;
|
|
314
|
+
/**
|
|
315
|
+
* Must be "system" to identify this as a system message
|
|
316
|
+
*/
|
|
24
317
|
role: 'system';
|
|
25
318
|
}
|
|
26
319
|
export interface ToolCall {
|
|
@@ -28,15 +321,46 @@ export interface ToolCall {
|
|
|
28
321
|
call_id: string;
|
|
29
322
|
tool_name: 'brave_search' | 'wolfram_alpha' | 'photogen' | 'code_interpreter' | (string & {});
|
|
30
323
|
}
|
|
324
|
+
export interface ToolParamDefinition {
|
|
325
|
+
param_type: string;
|
|
326
|
+
default?: boolean | number | string | Array<unknown> | unknown | null;
|
|
327
|
+
description?: string;
|
|
328
|
+
required?: boolean;
|
|
329
|
+
}
|
|
31
330
|
export interface ToolResponseMessage {
|
|
331
|
+
/**
|
|
332
|
+
* Unique identifier for the tool call this response is for
|
|
333
|
+
*/
|
|
32
334
|
call_id: string;
|
|
33
|
-
|
|
34
|
-
|
|
335
|
+
/**
|
|
336
|
+
* The response content from the tool
|
|
337
|
+
*/
|
|
338
|
+
content: InterleavedContent;
|
|
339
|
+
/**
|
|
340
|
+
* Must be "tool" to identify this as a tool response
|
|
341
|
+
*/
|
|
342
|
+
role: 'tool';
|
|
343
|
+
/**
|
|
344
|
+
* Name of the tool that was called
|
|
345
|
+
*/
|
|
35
346
|
tool_name: 'brave_search' | 'wolfram_alpha' | 'photogen' | 'code_interpreter' | (string & {});
|
|
36
347
|
}
|
|
348
|
+
export interface URL {
|
|
349
|
+
uri: string;
|
|
350
|
+
}
|
|
37
351
|
export interface UserMessage {
|
|
38
|
-
|
|
352
|
+
/**
|
|
353
|
+
* The content of the message, which can include text and other media
|
|
354
|
+
*/
|
|
355
|
+
content: InterleavedContent;
|
|
356
|
+
/**
|
|
357
|
+
* Must be "user" to identify this as a user message
|
|
358
|
+
*/
|
|
39
359
|
role: 'user';
|
|
40
|
-
|
|
360
|
+
/**
|
|
361
|
+
* (Optional) This field is used internally by Llama Stack to pass RAG context.
|
|
362
|
+
* This field may be removed in the API in the future.
|
|
363
|
+
*/
|
|
364
|
+
context?: InterleavedContent;
|
|
41
365
|
}
|
|
42
366
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,YAAY,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,0BAA0B,EAAE,OAAO,CAAC;IAEpC,YAAY,EAAE,MAAM,CAAC;IAErB,eAAe,EAAE,MAAM,CAAC;IAExB,KAAK,EAAE,MAAM,CAAC;IAEd,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAE7C,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE/B,eAAe,CAAC,EAAE,cAAc,CAAC;IAEjC,eAAe,CAAC,EAAE,cAAc,CAAC;IAEjC,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAElC,kBAAkB,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,aAAa,CAAC;IAE7D,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;CACvD;AAED,yBAAiB,WAAW,CAAC;IAC3B,UAAiB,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AG,eAAe,GAAG,UAAU,GAAG,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CAC/F;AAED,MAAM,WAAW,GAAG;IAClB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC;IAE5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B"}
|
package/resources/shields.d.ts
CHANGED
|
@@ -1,42 +1,28 @@
|
|
|
1
1
|
import { APIResource } from "../resource.js";
|
|
2
2
|
import * as Core from "../core.js";
|
|
3
|
-
import * as ShieldsAPI from "./shields.js";
|
|
4
3
|
export declare class Shields extends APIResource {
|
|
5
|
-
|
|
6
|
-
list(options?: Core.RequestOptions): Core.APIPromise<
|
|
7
|
-
|
|
4
|
+
retrieve(identifier: string, options?: Core.RequestOptions): Core.APIPromise<Shield | null>;
|
|
5
|
+
list(options?: Core.RequestOptions): Core.APIPromise<ShieldListResponse>;
|
|
6
|
+
register(body: ShieldRegisterParams, options?: Core.RequestOptions): Core.APIPromise<Shield>;
|
|
8
7
|
}
|
|
9
|
-
export interface
|
|
10
|
-
|
|
11
|
-
shield_type: string;
|
|
8
|
+
export interface ListShieldsResponse {
|
|
9
|
+
data: Array<Shield>;
|
|
12
10
|
}
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
export interface Shield {
|
|
12
|
+
identifier: string;
|
|
13
|
+
provider_id: string;
|
|
14
|
+
provider_resource_id: string;
|
|
15
|
+
type: 'shield';
|
|
16
|
+
params?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
18
17
|
}
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
export interface ShieldGetParams {
|
|
27
|
-
/**
|
|
28
|
-
* Query param:
|
|
29
|
-
*/
|
|
30
|
-
shield_type: string;
|
|
31
|
-
/**
|
|
32
|
-
* Header param: JSON-encoded provider data which will be made available to the
|
|
33
|
-
* adapter servicing the API
|
|
34
|
-
*/
|
|
35
|
-
'X-LlamaStack-ProviderData'?: string;
|
|
18
|
+
export type ShieldListResponse = Array<Shield>;
|
|
19
|
+
export interface ShieldRegisterParams {
|
|
20
|
+
shield_id: string;
|
|
21
|
+
params?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
22
|
+
provider_id?: string;
|
|
23
|
+
provider_shield_id?: string;
|
|
36
24
|
}
|
|
37
25
|
export declare namespace Shields {
|
|
38
|
-
export
|
|
39
|
-
export import ShieldListParams = ShieldsAPI.ShieldListParams;
|
|
40
|
-
export import ShieldGetParams = ShieldsAPI.ShieldGetParams;
|
|
26
|
+
export { type ListShieldsResponse as ListShieldsResponse, type Shield as Shield, type ShieldListResponse as ShieldListResponse, type ShieldRegisterParams as ShieldRegisterParams, };
|
|
41
27
|
}
|
|
42
28
|
//# sourceMappingURL=shields.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shields.d.ts","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"shields.d.ts","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,OAAQ,SAAQ,WAAW;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC;IAI3F,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,G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
|
const resource_1 = require("../resource.js");
|
|
6
|
-
const core_1 = require("../core.js");
|
|
7
6
|
class Shields extends resource_1.APIResource {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return this.list({}, params);
|
|
11
|
-
}
|
|
12
|
-
const { 'X-LlamaStack-ProviderData': xLlamaStackProviderData } = params;
|
|
13
|
-
return this._client.get('/shields/list', {
|
|
14
|
-
...options,
|
|
15
|
-
headers: {
|
|
16
|
-
...(xLlamaStackProviderData != null ?
|
|
17
|
-
{ 'X-LlamaStack-ProviderData': xLlamaStackProviderData }
|
|
18
|
-
: undefined),
|
|
19
|
-
...options?.headers,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
7
|
+
retrieve(identifier, options) {
|
|
8
|
+
return this._client.get(`/v1/shields/${identifier}`, options);
|
|
22
9
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
headers: {
|
|
29
|
-
...(xLlamaStackProviderData != null ?
|
|
30
|
-
{ 'X-LlamaStack-ProviderData': xLlamaStackProviderData }
|
|
31
|
-
: undefined),
|
|
32
|
-
...options?.headers,
|
|
33
|
-
},
|
|
34
|
-
});
|
|
10
|
+
list(options) {
|
|
11
|
+
return this._client.get('/v1/shields', options)._thenUnwrap((obj) => obj.data);
|
|
12
|
+
}
|
|
13
|
+
register(body, options) {
|
|
14
|
+
return this._client.post('/v1/shields', { body, ...options });
|
|
35
15
|
}
|
|
36
16
|
}
|
|
37
17
|
exports.Shields = Shields;
|
|
38
|
-
(function (Shields) {
|
|
39
|
-
})(Shields = exports.Shields || (exports.Shields = {}));
|
|
40
18
|
//# sourceMappingURL=shields.js.map
|
package/resources/shields.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shields.js","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;
|
|
1
|
+
{"version":3,"file":"shields.js","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,OAAQ,SAAQ,sBAAW;IACtC,QAAQ,CAAC,UAAkB,EAAE,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,CAAC,OAA6B;QAChC,OACE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CACxC,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AAdD,0BAcC"}
|
package/resources/shields.mjs
CHANGED
|
@@ -1,36 +1,14 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../resource.mjs";
|
|
3
|
-
import { isRequestOptions } from "../core.mjs";
|
|
4
3
|
export class Shields extends APIResource {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return this.list({}, params);
|
|
8
|
-
}
|
|
9
|
-
const { 'X-LlamaStack-ProviderData': xLlamaStackProviderData } = params;
|
|
10
|
-
return this._client.get('/shields/list', {
|
|
11
|
-
...options,
|
|
12
|
-
headers: {
|
|
13
|
-
...(xLlamaStackProviderData != null ?
|
|
14
|
-
{ 'X-LlamaStack-ProviderData': xLlamaStackProviderData }
|
|
15
|
-
: undefined),
|
|
16
|
-
...options?.headers,
|
|
17
|
-
},
|
|
18
|
-
});
|
|
4
|
+
retrieve(identifier, options) {
|
|
5
|
+
return this._client.get(`/v1/shields/${identifier}`, options);
|
|
19
6
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
headers: {
|
|
26
|
-
...(xLlamaStackProviderData != null ?
|
|
27
|
-
{ 'X-LlamaStack-ProviderData': xLlamaStackProviderData }
|
|
28
|
-
: undefined),
|
|
29
|
-
...options?.headers,
|
|
30
|
-
},
|
|
31
|
-
});
|
|
7
|
+
list(options) {
|
|
8
|
+
return this._client.get('/v1/shields', options)._thenUnwrap((obj) => obj.data);
|
|
9
|
+
}
|
|
10
|
+
register(body, options) {
|
|
11
|
+
return this._client.post('/v1/shields', { body, ...options });
|
|
32
12
|
}
|
|
33
13
|
}
|
|
34
|
-
(function (Shields) {
|
|
35
|
-
})(Shields || (Shields = {}));
|
|
36
14
|
//# sourceMappingURL=shields.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shields.mjs","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"shields.mjs","sourceRoot":"","sources":["../src/resources/shields.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC,QAAQ,CAAC,UAAkB,EAAE,OAA6B;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED,IAAI,CAAC,OAA6B;QAChC,OACE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CACxC,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChE,CAAC;CACF"}
|
|
@@ -1,36 +1,19 @@
|
|
|
1
1
|
import { APIResource } from "../resource.js";
|
|
2
2
|
import * as Core from "../core.js";
|
|
3
|
-
import * as SyntheticDataGenerationAPI from "./synthetic-data-generation.js";
|
|
4
|
-
import * as RewardScoringAPI from "./reward-scoring.js";
|
|
5
3
|
import * as Shared from "./shared.js";
|
|
6
|
-
export declare class
|
|
7
|
-
generate(
|
|
4
|
+
export declare class SyntheticDataGeneration extends APIResource {
|
|
5
|
+
generate(body: SyntheticDataGenerationGenerateParams, options?: Core.RequestOptions): Core.APIPromise<SyntheticDataGenerationResponse>;
|
|
8
6
|
}
|
|
9
|
-
export interface
|
|
10
|
-
synthetic_data: Array<
|
|
7
|
+
export interface SyntheticDataGenerationResponse {
|
|
8
|
+
synthetic_data: Array<Record<string, boolean | number | string | Array<unknown> | unknown | null>>;
|
|
11
9
|
statistics?: Record<string, boolean | number | string | Array<unknown> | unknown | null>;
|
|
12
10
|
}
|
|
13
11
|
export interface SyntheticDataGenerationGenerateParams {
|
|
14
|
-
|
|
15
|
-
* Body param:
|
|
16
|
-
*/
|
|
17
|
-
dialogs: Array<Shared.UserMessage | Shared.SystemMessage | Shared.ToolResponseMessage | Shared.CompletionMessage>;
|
|
18
|
-
/**
|
|
19
|
-
* Body param:
|
|
20
|
-
*/
|
|
12
|
+
dialogs: Array<Shared.Message>;
|
|
21
13
|
filtering_function: 'none' | 'random' | 'top_k' | 'top_p' | 'top_k_top_p' | 'sigmoid';
|
|
22
|
-
/**
|
|
23
|
-
* Body param:
|
|
24
|
-
*/
|
|
25
14
|
model?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Header param: JSON-encoded provider data which will be made available to the
|
|
28
|
-
* adapter servicing the API
|
|
29
|
-
*/
|
|
30
|
-
'X-LlamaStack-ProviderData'?: string;
|
|
31
15
|
}
|
|
32
|
-
export declare namespace
|
|
33
|
-
export
|
|
34
|
-
export import SyntheticDataGenerationGenerateParams = SyntheticDataGenerationAPI.SyntheticDataGenerationGenerateParams;
|
|
16
|
+
export declare namespace SyntheticDataGeneration {
|
|
17
|
+
export { type SyntheticDataGenerationResponse as SyntheticDataGenerationResponse, type SyntheticDataGenerationGenerateParams as SyntheticDataGenerationGenerateParams, };
|
|
35
18
|
}
|
|
36
19
|
//# sourceMappingURL=synthetic-data-generation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synthetic-data-generation.d.ts","sourceRoot":"","sources":["../src/resources/synthetic-data-generation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"synthetic-data-generation.d.ts","sourceRoot":"","sources":["../src/resources/synthetic-data-generation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,QAAQ,CACN,IAAI,EAAE,qCAAqC,EAC3C,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,+BAA+B,CAAC;CAGpD;AAED,MAAM,WAAW,+BAA+B;IAC9C,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC;IAEnG,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC;CAC1F;AAED,MAAM,WAAW,qCAAqC;IACpD,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE/B,kBAAkB,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;IAEtF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,uBAAuB,CAAC;IAC/C,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,qCAAqC,IAAI,qCAAqC,GACpF,CAAC;CACH"}
|