llama-stack-client 0.6.1 → 0.7.1
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/.github/workflows/ci.yml +16 -10
- package/.gitignore +1 -0
- package/.release-please-manifest.json +1 -1
- package/.stats.yml +4 -4
- package/CHANGELOG.md +80 -0
- package/CONTRIBUTING.md +2 -2
- package/README.md +22 -0
- package/api.md +1 -71
- package/dist/CHANGELOG.md +80 -0
- package/dist/README.md +22 -0
- package/dist/core.d.ts +1 -1
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +8 -17
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +8 -17
- package/dist/core.mjs.map +1 -1
- package/dist/index.d.mts +51 -12
- package/dist/index.d.ts +51 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +50 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -11
- package/dist/index.mjs.map +1 -1
- package/dist/internal/utils/query.d.ts +2 -0
- package/dist/internal/utils/query.d.ts.map +1 -0
- package/dist/{resources/alpha/post-training/post-training.js → internal/utils/query.js} +6 -24
- package/dist/internal/utils/query.js.map +1 -0
- package/dist/{resources/alpha/post-training.mjs → internal/utils/query.mjs} +5 -2
- package/dist/internal/utils/query.mjs.map +1 -0
- package/dist/package.json +1 -1
- package/dist/resources/alpha/alpha.d.ts +0 -4
- package/dist/resources/alpha/alpha.d.ts.map +1 -1
- package/dist/resources/alpha/alpha.js +0 -4
- package/dist/resources/alpha/alpha.js.map +1 -1
- package/dist/resources/alpha/alpha.mjs +0 -4
- package/dist/resources/alpha/alpha.mjs.map +1 -1
- package/dist/resources/alpha/eval/eval.d.ts +3 -0
- package/dist/resources/alpha/eval/eval.d.ts.map +1 -1
- package/dist/resources/alpha/eval/eval.js +3 -0
- package/dist/resources/alpha/eval/eval.js.map +1 -1
- package/dist/resources/alpha/eval/eval.mjs +3 -0
- package/dist/resources/alpha/eval/eval.mjs.map +1 -1
- package/dist/resources/alpha/eval/jobs.d.ts +3 -0
- package/dist/resources/alpha/eval/jobs.d.ts.map +1 -1
- package/dist/resources/alpha/eval/jobs.js +3 -0
- package/dist/resources/alpha/eval/jobs.js.map +1 -1
- package/dist/resources/alpha/eval/jobs.mjs +3 -0
- package/dist/resources/alpha/eval/jobs.mjs.map +1 -1
- package/dist/resources/alpha/index.d.ts +0 -1
- package/dist/resources/alpha/index.d.ts.map +1 -1
- package/dist/resources/alpha/index.js +1 -3
- package/dist/resources/alpha/index.js.map +1 -1
- package/dist/resources/alpha/index.mjs +0 -1
- package/dist/resources/alpha/index.mjs.map +1 -1
- package/dist/resources/alpha/inference.d.ts +8 -0
- package/dist/resources/alpha/inference.d.ts.map +1 -1
- package/dist/resources/alpha/inference.js +8 -0
- package/dist/resources/alpha/inference.js.map +1 -1
- package/dist/resources/alpha/inference.mjs +8 -0
- package/dist/resources/alpha/inference.mjs.map +1 -1
- package/dist/resources/batches.d.ts +8 -0
- package/dist/resources/batches.d.ts.map +1 -1
- package/dist/resources/batches.js +8 -0
- package/dist/resources/batches.js.map +1 -1
- package/dist/resources/batches.mjs +8 -0
- package/dist/resources/batches.mjs.map +1 -1
- package/dist/resources/beta/datasets.d.ts +4 -8
- package/dist/resources/beta/datasets.d.ts.map +1 -1
- package/dist/resources/chat/chat.d.ts +34 -32
- package/dist/resources/chat/chat.d.ts.map +1 -1
- package/dist/resources/chat/chat.js.map +1 -1
- package/dist/resources/chat/chat.mjs.map +1 -1
- package/dist/resources/chat/completions.d.ts +321 -713
- package/dist/resources/chat/completions.d.ts.map +1 -1
- package/dist/resources/chat/completions.js +8 -0
- package/dist/resources/chat/completions.js.map +1 -1
- package/dist/resources/chat/completions.mjs +8 -0
- package/dist/resources/chat/completions.mjs.map +1 -1
- package/dist/resources/completions.d.ts +10 -4
- package/dist/resources/completions.d.ts.map +1 -1
- package/dist/resources/completions.js +8 -0
- package/dist/resources/completions.js.map +1 -1
- package/dist/resources/completions.mjs +8 -0
- package/dist/resources/completions.mjs.map +1 -1
- package/dist/resources/conversations/conversations.d.ts +95 -2
- package/dist/resources/conversations/conversations.d.ts.map +1 -1
- package/dist/resources/conversations/conversations.js +3 -0
- package/dist/resources/conversations/conversations.js.map +1 -1
- package/dist/resources/conversations/conversations.mjs +3 -0
- package/dist/resources/conversations/conversations.mjs.map +1 -1
- package/dist/resources/conversations/items.d.ts +371 -8
- package/dist/resources/conversations/items.d.ts.map +1 -1
- package/dist/resources/conversations/items.js +3 -0
- package/dist/resources/conversations/items.js.map +1 -1
- package/dist/resources/conversations/items.mjs +3 -0
- package/dist/resources/conversations/items.mjs.map +1 -1
- package/dist/resources/embeddings.d.ts +8 -0
- package/dist/resources/embeddings.d.ts.map +1 -1
- package/dist/resources/embeddings.js +8 -0
- package/dist/resources/embeddings.js.map +1 -1
- package/dist/resources/embeddings.mjs +8 -0
- package/dist/resources/embeddings.mjs.map +1 -1
- package/dist/resources/files.d.ts +11 -8
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +3 -0
- package/dist/resources/files.js.map +1 -1
- package/dist/resources/files.mjs +3 -0
- package/dist/resources/files.mjs.map +1 -1
- package/dist/resources/index.d.ts +1 -4
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +1 -7
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/index.mjs +0 -3
- package/dist/resources/index.mjs.map +1 -1
- package/dist/resources/inspect.d.ts +3 -0
- package/dist/resources/inspect.d.ts.map +1 -1
- package/dist/resources/inspect.js +3 -0
- package/dist/resources/inspect.js.map +1 -1
- package/dist/resources/inspect.mjs +3 -0
- package/dist/resources/inspect.mjs.map +1 -1
- package/dist/resources/models/index.d.ts +1 -1
- package/dist/resources/models/index.d.ts.map +1 -1
- package/dist/resources/models/index.js.map +1 -1
- package/dist/resources/models/index.mjs.map +1 -1
- package/dist/resources/models/models.d.ts +7 -65
- package/dist/resources/models/models.d.ts.map +1 -1
- package/dist/resources/models/models.js +0 -19
- package/dist/resources/models/models.js.map +1 -1
- package/dist/resources/models/models.mjs +0 -19
- package/dist/resources/models/models.mjs.map +1 -1
- package/dist/resources/moderations.d.ts +3 -0
- package/dist/resources/moderations.d.ts.map +1 -1
- package/dist/resources/moderations.js +3 -0
- package/dist/resources/moderations.js.map +1 -1
- package/dist/resources/moderations.mjs +3 -0
- package/dist/resources/moderations.mjs.map +1 -1
- package/dist/resources/prompts/prompts.d.ts +3 -0
- package/dist/resources/prompts/prompts.d.ts.map +1 -1
- package/dist/resources/prompts/prompts.js +3 -0
- package/dist/resources/prompts/prompts.js.map +1 -1
- package/dist/resources/prompts/prompts.mjs +3 -0
- package/dist/resources/prompts/prompts.mjs.map +1 -1
- package/dist/resources/prompts/versions.d.ts +3 -0
- package/dist/resources/prompts/versions.d.ts.map +1 -1
- package/dist/resources/prompts/versions.js +3 -0
- package/dist/resources/prompts/versions.js.map +1 -1
- package/dist/resources/prompts/versions.mjs +3 -0
- package/dist/resources/prompts/versions.mjs.map +1 -1
- package/dist/resources/providers.d.ts +3 -0
- package/dist/resources/providers.d.ts.map +1 -1
- package/dist/resources/providers.js +3 -0
- package/dist/resources/providers.js.map +1 -1
- package/dist/resources/providers.mjs +3 -0
- package/dist/resources/providers.mjs.map +1 -1
- package/dist/resources/responses/input-items.d.ts +102 -3
- package/dist/resources/responses/input-items.d.ts.map +1 -1
- package/dist/resources/responses/responses.d.ts +582 -11
- package/dist/resources/responses/responses.d.ts.map +1 -1
- package/dist/resources/responses/responses.js.map +1 -1
- package/dist/resources/responses/responses.mjs.map +1 -1
- package/dist/resources/routes.d.ts +3 -0
- package/dist/resources/routes.d.ts.map +1 -1
- package/dist/resources/routes.js +3 -0
- package/dist/resources/routes.js.map +1 -1
- package/dist/resources/routes.mjs +3 -0
- package/dist/resources/routes.mjs.map +1 -1
- package/dist/resources/safety.d.ts +14 -11
- package/dist/resources/safety.d.ts.map +1 -1
- package/dist/resources/safety.js +3 -0
- package/dist/resources/safety.js.map +1 -1
- package/dist/resources/safety.mjs +3 -0
- package/dist/resources/safety.mjs.map +1 -1
- package/dist/resources/vector-io.d.ts +4 -4
- package/dist/resources/vector-stores/file-batches.d.ts +49 -1
- package/dist/resources/vector-stores/file-batches.d.ts.map +1 -1
- package/dist/resources/vector-stores/file-batches.js.map +1 -1
- package/dist/resources/vector-stores/file-batches.mjs.map +1 -1
- package/dist/resources/vector-stores/files.d.ts +100 -4
- package/dist/resources/vector-stores/files.d.ts.map +1 -1
- package/dist/resources/vector-stores/files.js.map +1 -1
- package/dist/resources/vector-stores/files.mjs.map +1 -1
- package/dist/resources/vector-stores/vector-stores.d.ts +51 -3
- package/dist/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/dist/resources/vector-stores/vector-stores.js.map +1 -1
- package/dist/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/dist/src/core.ts +10 -21
- package/dist/src/index.ts +51 -48
- package/{src/resources/alpha/post-training.ts → dist/src/internal/utils/query.ts} +5 -1
- package/dist/src/resources/alpha/alpha.ts +0 -20
- package/dist/src/resources/alpha/eval/eval.ts +3 -0
- package/dist/src/resources/alpha/eval/jobs.ts +3 -0
- package/dist/src/resources/alpha/index.ts +0 -8
- package/dist/src/resources/alpha/inference.ts +8 -0
- package/dist/src/resources/batches.ts +8 -0
- package/dist/src/resources/beta/datasets.ts +4 -9
- package/dist/src/resources/chat/chat.ts +36 -33
- package/dist/src/resources/chat/completions.ts +307 -811
- package/dist/src/resources/completions.ts +10 -4
- package/dist/src/resources/conversations/conversations.ts +121 -1
- package/dist/src/resources/conversations/items.ts +477 -6
- package/dist/src/resources/embeddings.ts +8 -0
- package/dist/src/resources/files.ts +12 -9
- package/dist/src/resources/index.ts +0 -18
- package/dist/src/resources/inspect.ts +3 -0
- package/dist/src/resources/models/index.ts +0 -2
- package/dist/src/resources/models/models.ts +7 -82
- package/dist/src/resources/moderations.ts +3 -0
- package/dist/src/resources/prompts/prompts.ts +3 -0
- package/dist/src/resources/prompts/versions.ts +3 -0
- package/dist/src/resources/providers.ts +3 -0
- package/dist/src/resources/responses/input-items.ts +128 -2
- package/dist/src/resources/responses/responses.ts +706 -7
- package/dist/src/resources/routes.ts +3 -0
- package/dist/src/resources/safety.ts +15 -12
- package/dist/src/resources/vector-io.ts +4 -4
- package/dist/src/resources/vector-stores/file-batches.ts +57 -0
- package/dist/src/resources/vector-stores/files.ts +117 -3
- package/dist/src/resources/vector-stores/vector-stores.ts +59 -2
- package/dist/src/streaming.ts +24 -6
- package/dist/src/version.ts +1 -1
- package/dist/streaming.d.ts.map +1 -1
- package/dist/streaming.js +21 -6
- package/dist/streaming.js.map +1 -1
- package/dist/streaming.mjs +21 -6
- package/dist/streaming.mjs.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +1 -1
- package/scripts/mock +21 -10
- package/scripts/test +8 -8
- package/src/core.ts +10 -21
- package/src/index.ts +51 -48
- package/{dist/src/resources/alpha/post-training.ts → src/internal/utils/query.ts} +5 -1
- package/src/resources/alpha/alpha.ts +0 -20
- package/src/resources/alpha/eval/eval.ts +3 -0
- package/src/resources/alpha/eval/jobs.ts +3 -0
- package/src/resources/alpha/index.ts +0 -8
- package/src/resources/alpha/inference.ts +8 -0
- package/src/resources/batches.ts +8 -0
- package/src/resources/beta/datasets.ts +4 -9
- package/src/resources/chat/chat.ts +36 -33
- package/src/resources/chat/completions.ts +307 -811
- package/src/resources/completions.ts +10 -4
- package/src/resources/conversations/conversations.ts +121 -1
- package/src/resources/conversations/items.ts +477 -6
- package/src/resources/embeddings.ts +8 -0
- package/src/resources/files.ts +12 -9
- package/src/resources/index.ts +0 -18
- package/src/resources/inspect.ts +3 -0
- package/src/resources/models/index.ts +0 -2
- package/src/resources/models/models.ts +7 -82
- package/src/resources/moderations.ts +3 -0
- package/src/resources/prompts/prompts.ts +3 -0
- package/src/resources/prompts/versions.ts +3 -0
- package/src/resources/providers.ts +3 -0
- package/src/resources/responses/input-items.ts +128 -2
- package/src/resources/responses/responses.ts +706 -7
- package/src/resources/routes.ts +3 -0
- package/src/resources/safety.ts +15 -12
- package/src/resources/vector-io.ts +4 -4
- package/src/resources/vector-stores/file-batches.ts +57 -0
- package/src/resources/vector-stores/files.ts +117 -3
- package/src/resources/vector-stores/vector-stores.ts +59 -2
- package/src/streaming.ts +24 -6
- package/src/version.ts +1 -1
- package/tests/api-resources/beta/datasets.test.ts +4 -10
- package/tests/api-resources/chat/completions.test.ts +2 -0
- package/tests/api-resources/files.test.ts +2 -2
- package/tests/api-resources/models/models.test.ts +0 -39
- package/tests/api-resources/responses/responses.test.ts +10 -1
- package/tests/api-resources/vector-stores/file-batches.test.ts +1 -1
- package/tests/api-resources/vector-stores/files.test.ts +1 -1
- package/tests/api-resources/vector-stores/vector-stores.test.ts +1 -1
- package/tests/stringifyQuery.test.ts +2 -4
- package/dist/resources/alpha/post-training/index.d.ts +0 -3
- package/dist/resources/alpha/post-training/index.d.ts.map +0 -1
- package/dist/resources/alpha/post-training/index.js +0 -15
- package/dist/resources/alpha/post-training/index.js.map +0 -1
- package/dist/resources/alpha/post-training/index.mjs +0 -10
- package/dist/resources/alpha/post-training/index.mjs.map +0 -1
- package/dist/resources/alpha/post-training/job.d.ts +0 -104
- package/dist/resources/alpha/post-training/job.d.ts.map +0 -1
- package/dist/resources/alpha/post-training/job.js +0 -42
- package/dist/resources/alpha/post-training/job.js.map +0 -1
- package/dist/resources/alpha/post-training/job.mjs +0 -38
- package/dist/resources/alpha/post-training/job.mjs.map +0 -1
- package/dist/resources/alpha/post-training/post-training.d.ts +0 -269
- package/dist/resources/alpha/post-training/post-training.d.ts.map +0 -1
- package/dist/resources/alpha/post-training/post-training.js.map +0 -1
- package/dist/resources/alpha/post-training/post-training.mjs +0 -30
- package/dist/resources/alpha/post-training/post-training.mjs.map +0 -1
- package/dist/resources/alpha/post-training.d.ts +0 -2
- package/dist/resources/alpha/post-training.d.ts.map +0 -1
- package/dist/resources/alpha/post-training.js +0 -25
- package/dist/resources/alpha/post-training.js.map +0 -1
- package/dist/resources/alpha/post-training.mjs.map +0 -1
- package/dist/resources/tool-runtime.d.ts +0 -152
- package/dist/resources/tool-runtime.d.ts.map +0 -1
- package/dist/resources/tool-runtime.js +0 -30
- package/dist/resources/tool-runtime.js.map +0 -1
- package/dist/resources/tool-runtime.mjs +0 -26
- package/dist/resources/tool-runtime.mjs.map +0 -1
- package/dist/resources/toolgroups.d.ts +0 -91
- package/dist/resources/toolgroups.d.ts.map +0 -1
- package/dist/resources/toolgroups.js +0 -54
- package/dist/resources/toolgroups.js.map +0 -1
- package/dist/resources/toolgroups.mjs +0 -50
- package/dist/resources/toolgroups.mjs.map +0 -1
- package/dist/resources/tools.d.ts +0 -26
- package/dist/resources/tools.d.ts.map +0 -1
- package/dist/resources/tools.js +0 -30
- package/dist/resources/tools.js.map +0 -1
- package/dist/resources/tools.mjs +0 -26
- package/dist/resources/tools.mjs.map +0 -1
- package/dist/src/resources/alpha/post-training/index.ts +0 -17
- package/dist/src/resources/alpha/post-training/job.ts +0 -161
- package/dist/src/resources/alpha/post-training/post-training.ts +0 -385
- package/dist/src/resources/tool-runtime.ts +0 -217
- package/dist/src/resources/toolgroups.ts +0 -135
- package/dist/src/resources/tools.ts +0 -52
- package/src/resources/alpha/post-training/index.ts +0 -17
- package/src/resources/alpha/post-training/job.ts +0 -161
- package/src/resources/alpha/post-training/post-training.ts +0 -385
- package/src/resources/tool-runtime.ts +0 -217
- package/src/resources/toolgroups.ts +0 -135
- package/src/resources/tools.ts +0 -52
- package/tests/api-resources/alpha/post-training/job.test.ts +0 -86
- package/tests/api-resources/alpha/post-training/post-training.test.ts +0 -134
- package/tests/api-resources/tool-runtime.test.ts +0 -68
- package/tests/api-resources/toolgroups.test.ts +0 -91
- package/tests/api-resources/tools.test.ts +0 -57
package/src/resources/files.ts
CHANGED
|
@@ -11,6 +11,9 @@ import { isRequestOptions } from '../core';
|
|
|
11
11
|
import * as Core from '../core';
|
|
12
12
|
import { OpenAICursorPage, type OpenAICursorPageParams } from '../pagination';
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* This API is used to upload documents that can be used with other Llama Stack APIs.
|
|
16
|
+
*/
|
|
14
17
|
export class Files extends APIResource {
|
|
15
18
|
/**
|
|
16
19
|
* Upload a file.
|
|
@@ -51,7 +54,7 @@ export class Files extends APIResource {
|
|
|
51
54
|
/**
|
|
52
55
|
* Retrieve file content
|
|
53
56
|
*/
|
|
54
|
-
content(fileId: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
57
|
+
content(fileId: string, options?: Core.RequestOptions): Core.APIPromise<string> {
|
|
55
58
|
return this._client.get(`/v1/files/${fileId}/content`, options);
|
|
56
59
|
}
|
|
57
60
|
}
|
|
@@ -97,11 +100,6 @@ export interface File {
|
|
|
97
100
|
*/
|
|
98
101
|
created_at: number;
|
|
99
102
|
|
|
100
|
-
/**
|
|
101
|
-
* The Unix timestamp (in seconds) for when the file expires.
|
|
102
|
-
*/
|
|
103
|
-
expires_at: number;
|
|
104
|
-
|
|
105
103
|
/**
|
|
106
104
|
* The name of the file.
|
|
107
105
|
*/
|
|
@@ -112,6 +110,11 @@ export interface File {
|
|
|
112
110
|
*/
|
|
113
111
|
purpose: 'assistants' | 'batch';
|
|
114
112
|
|
|
113
|
+
/**
|
|
114
|
+
* The Unix timestamp (in seconds) for when the file expires.
|
|
115
|
+
*/
|
|
116
|
+
expires_at?: number | null;
|
|
117
|
+
|
|
115
118
|
/**
|
|
116
119
|
* The object type, which is always 'file'.
|
|
117
120
|
*/
|
|
@@ -148,7 +151,7 @@ export interface ListFilesResponse {
|
|
|
148
151
|
object?: 'list';
|
|
149
152
|
}
|
|
150
153
|
|
|
151
|
-
export type FileContentResponse =
|
|
154
|
+
export type FileContentResponse = string;
|
|
152
155
|
|
|
153
156
|
export interface FileCreateParams {
|
|
154
157
|
/**
|
|
@@ -186,12 +189,12 @@ export namespace FileCreateParams {
|
|
|
186
189
|
|
|
187
190
|
export interface FileListParams extends OpenAICursorPageParams {
|
|
188
191
|
/**
|
|
189
|
-
* Sort order
|
|
192
|
+
* Sort order by created_at timestamp ('asc' or 'desc').
|
|
190
193
|
*/
|
|
191
194
|
order?: 'asc' | 'desc' | null;
|
|
192
195
|
|
|
193
196
|
/**
|
|
194
|
-
*
|
|
197
|
+
* Filter files by purpose.
|
|
195
198
|
*/
|
|
196
199
|
purpose?: 'assistants' | 'batch' | null;
|
|
197
200
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -52,8 +52,6 @@ export {
|
|
|
52
52
|
type Model,
|
|
53
53
|
type ModelRetrieveResponse,
|
|
54
54
|
type ModelListResponse,
|
|
55
|
-
type ModelRegisterResponse,
|
|
56
|
-
type ModelRegisterParams,
|
|
57
55
|
} from './models/models';
|
|
58
56
|
export { Moderations, type CreateResponse, type ModerationCreateParams } from './moderations';
|
|
59
57
|
export {
|
|
@@ -103,22 +101,6 @@ export {
|
|
|
103
101
|
type ShieldListResponse,
|
|
104
102
|
type ShieldRegisterParams,
|
|
105
103
|
} from './shields';
|
|
106
|
-
export {
|
|
107
|
-
ToolRuntime,
|
|
108
|
-
type ToolDef,
|
|
109
|
-
type ToolInvocationResult,
|
|
110
|
-
type ToolRuntimeListToolsResponse,
|
|
111
|
-
type ToolRuntimeInvokeToolParams,
|
|
112
|
-
type ToolRuntimeListToolsParams,
|
|
113
|
-
} from './tool-runtime';
|
|
114
|
-
export {
|
|
115
|
-
Toolgroups,
|
|
116
|
-
type ListToolGroupsResponse,
|
|
117
|
-
type ToolGroup,
|
|
118
|
-
type ToolgroupListResponse,
|
|
119
|
-
type ToolgroupRegisterParams,
|
|
120
|
-
} from './toolgroups';
|
|
121
|
-
export { Tools, type ToolListResponse, type ToolListParams } from './tools';
|
|
122
104
|
export {
|
|
123
105
|
VectorIo,
|
|
124
106
|
type QueryChunksResponse,
|
package/src/resources/inspect.ts
CHANGED
|
@@ -10,6 +10,9 @@ import { APIResource } from '../resource';
|
|
|
10
10
|
import * as Core from '../core';
|
|
11
11
|
import * as Shared from './shared';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* APIs for inspecting the Llama Stack service, including health status, available API routes with methods and implementing providers.
|
|
15
|
+
*/
|
|
13
16
|
export class Inspect extends APIResource {
|
|
14
17
|
/**
|
|
15
18
|
* Get the current health status of the service.
|
|
@@ -29,27 +29,6 @@ export class Models extends APIResource {
|
|
|
29
29
|
this._client.get('/v1/models', options) as Core.APIPromise<{ data: ModelListResponse }>
|
|
30
30
|
)._thenUnwrap((obj) => obj.data);
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Register a model.
|
|
35
|
-
*
|
|
36
|
-
* @deprecated
|
|
37
|
-
*/
|
|
38
|
-
register(body: ModelRegisterParams, options?: Core.RequestOptions): Core.APIPromise<ModelRegisterResponse> {
|
|
39
|
-
return this._client.post('/v1/models', { body, ...options });
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Unregister a model.
|
|
44
|
-
*
|
|
45
|
-
* @deprecated
|
|
46
|
-
*/
|
|
47
|
-
unregister(modelId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
48
|
-
return this._client.delete(`/v1/models/${modelId}`, {
|
|
49
|
-
...options,
|
|
50
|
-
headers: { Accept: '*/*', ...options?.headers },
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
32
|
}
|
|
54
33
|
|
|
55
34
|
/**
|
|
@@ -106,6 +85,13 @@ export interface ModelRetrieveResponse {
|
|
|
106
85
|
*/
|
|
107
86
|
model_type?: 'llm' | 'embedding' | 'rerank';
|
|
108
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Enable model availability check during registration. When false (default),
|
|
90
|
+
* validation is deferred to runtime and model is preserved during provider
|
|
91
|
+
* refresh.
|
|
92
|
+
*/
|
|
93
|
+
model_validation?: boolean | null;
|
|
94
|
+
|
|
109
95
|
/**
|
|
110
96
|
* Unique identifier for this resource in the provider
|
|
111
97
|
*/
|
|
@@ -119,65 +105,6 @@ export interface ModelRetrieveResponse {
|
|
|
119
105
|
*/
|
|
120
106
|
export type ModelListResponse = Array<Model>;
|
|
121
107
|
|
|
122
|
-
/**
|
|
123
|
-
* A model resource representing an AI model registered in Llama Stack.
|
|
124
|
-
*/
|
|
125
|
-
export interface ModelRegisterResponse {
|
|
126
|
-
/**
|
|
127
|
-
* Unique identifier for this resource in llama stack
|
|
128
|
-
*/
|
|
129
|
-
identifier: string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* ID of the provider that owns this resource
|
|
133
|
-
*/
|
|
134
|
-
provider_id: string;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Any additional metadata for this model
|
|
138
|
-
*/
|
|
139
|
-
metadata?: { [key: string]: unknown };
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Enumeration of supported model types in Llama Stack.
|
|
143
|
-
*/
|
|
144
|
-
model_type?: 'llm' | 'embedding' | 'rerank';
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Unique identifier for this resource in the provider
|
|
148
|
-
*/
|
|
149
|
-
provider_resource_id?: string | null;
|
|
150
|
-
|
|
151
|
-
type?: 'model';
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export interface ModelRegisterParams {
|
|
155
|
-
/**
|
|
156
|
-
* The identifier of the model to register.
|
|
157
|
-
*/
|
|
158
|
-
model_id: string;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Any additional metadata for this model.
|
|
162
|
-
*/
|
|
163
|
-
metadata?: { [key: string]: unknown } | null;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Enumeration of supported model types in Llama Stack.
|
|
167
|
-
*/
|
|
168
|
-
model_type?: 'llm' | 'embedding' | 'rerank' | null;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* The identifier of the provider.
|
|
172
|
-
*/
|
|
173
|
-
provider_id?: string | null;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* The identifier of the model in the provider.
|
|
177
|
-
*/
|
|
178
|
-
provider_model_id?: string | null;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
108
|
Models.OpenAI = OpenAI;
|
|
182
109
|
|
|
183
110
|
export declare namespace Models {
|
|
@@ -186,8 +113,6 @@ export declare namespace Models {
|
|
|
186
113
|
type Model as Model,
|
|
187
114
|
type ModelRetrieveResponse as ModelRetrieveResponse,
|
|
188
115
|
type ModelListResponse as ModelListResponse,
|
|
189
|
-
type ModelRegisterResponse as ModelRegisterResponse,
|
|
190
|
-
type ModelRegisterParams as ModelRegisterParams,
|
|
191
116
|
};
|
|
192
117
|
|
|
193
118
|
export { OpenAI as OpenAI };
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
import { APIResource } from '../resource';
|
|
10
10
|
import * as Core from '../core';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* OpenAI-compatible Moderations API.
|
|
14
|
+
*/
|
|
12
15
|
export class Moderations extends APIResource {
|
|
13
16
|
/**
|
|
14
17
|
* Classifies if text inputs are potentially harmful. OpenAI-compatible endpoint.
|
|
@@ -12,6 +12,9 @@ import * as Core from '../../core';
|
|
|
12
12
|
import * as VersionsAPI from './versions';
|
|
13
13
|
import { Versions } from './versions';
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Protocol for prompt management operations.
|
|
17
|
+
*/
|
|
15
18
|
export class Prompts extends APIResource {
|
|
16
19
|
versions: VersionsAPI.Versions = new VersionsAPI.Versions(this._client);
|
|
17
20
|
|
|
@@ -10,6 +10,9 @@ import { APIResource } from '../../resource';
|
|
|
10
10
|
import * as Core from '../../core';
|
|
11
11
|
import * as PromptsAPI from './prompts';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Protocol for prompt management operations.
|
|
15
|
+
*/
|
|
13
16
|
export class Versions extends APIResource {
|
|
14
17
|
/**
|
|
15
18
|
* List all versions of a specific prompt.
|
|
@@ -10,6 +10,9 @@ import { APIResource } from '../resource';
|
|
|
10
10
|
import * as Core from '../core';
|
|
11
11
|
import * as Shared from './shared';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Providers API for inspecting, listing, and modifying providers and their configurations.
|
|
15
|
+
*/
|
|
13
16
|
export class Providers extends APIResource {
|
|
14
17
|
/**
|
|
15
18
|
* Get detailed information about a specific provider.
|
|
@@ -44,6 +44,7 @@ export interface InputItemListResponse {
|
|
|
44
44
|
| InputItemListResponse.OpenAIResponseOutputMessageMcpCall
|
|
45
45
|
| InputItemListResponse.OpenAIResponseOutputMessageMcpListTools
|
|
46
46
|
| InputItemListResponse.OpenAIResponseMcpApprovalRequest
|
|
47
|
+
| InputItemListResponse.OpenAIResponseOutputMessageReasoningItem
|
|
47
48
|
| InputItemListResponse.OpenAIResponseInputFunctionToolCallOutput
|
|
48
49
|
| InputItemListResponse.OpenAIResponseMcpApprovalResponse
|
|
49
50
|
| InputItemListResponse.OpenAIResponseMessageOutput
|
|
@@ -118,6 +119,9 @@ export namespace InputItemListResponse {
|
|
|
118
119
|
type?: 'input_file';
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Text content within an output message of an OpenAI response.
|
|
124
|
+
*/
|
|
121
125
|
export interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
122
126
|
text: string;
|
|
123
127
|
|
|
@@ -162,6 +166,9 @@ export namespace InputItemListResponse {
|
|
|
162
166
|
type?: 'url_citation';
|
|
163
167
|
}
|
|
164
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Container file citation annotation referencing a file within a container.
|
|
171
|
+
*/
|
|
165
172
|
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
166
173
|
container_id: string;
|
|
167
174
|
|
|
@@ -176,6 +183,9 @@ export namespace InputItemListResponse {
|
|
|
176
183
|
type?: 'container_file_citation';
|
|
177
184
|
}
|
|
178
185
|
|
|
186
|
+
/**
|
|
187
|
+
* File path annotation referencing a generated file in response content.
|
|
188
|
+
*/
|
|
179
189
|
export interface OpenAIResponseAnnotationFilePath {
|
|
180
190
|
file_id: string;
|
|
181
191
|
|
|
@@ -364,6 +374,68 @@ export namespace InputItemListResponse {
|
|
|
364
374
|
type?: 'mcp_approval_request';
|
|
365
375
|
}
|
|
366
376
|
|
|
377
|
+
/**
|
|
378
|
+
* Reasoning output from the model, representing the model's thinking process.
|
|
379
|
+
*/
|
|
380
|
+
export interface OpenAIResponseOutputMessageReasoningItem {
|
|
381
|
+
/**
|
|
382
|
+
* Unique identifier for the reasoning output item.
|
|
383
|
+
*/
|
|
384
|
+
id: string;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Summary of the reasoning output.
|
|
388
|
+
*/
|
|
389
|
+
summary: Array<OpenAIResponseOutputMessageReasoningItem.Summary>;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* The reasoning content from the model.
|
|
393
|
+
*/
|
|
394
|
+
content?: Array<OpenAIResponseOutputMessageReasoningItem.Content> | null;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* The status of the reasoning output.
|
|
398
|
+
*/
|
|
399
|
+
status?: 'in_progress' | 'completed' | 'incomplete' | null;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* The type identifier, always 'reasoning'.
|
|
403
|
+
*/
|
|
404
|
+
type?: 'reasoning';
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
export namespace OpenAIResponseOutputMessageReasoningItem {
|
|
408
|
+
/**
|
|
409
|
+
* A summary of reasoning output from the model.
|
|
410
|
+
*/
|
|
411
|
+
export interface Summary {
|
|
412
|
+
/**
|
|
413
|
+
* The summary text of the reasoning output.
|
|
414
|
+
*/
|
|
415
|
+
text: string;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* The type identifier, always 'summary_text'.
|
|
419
|
+
*/
|
|
420
|
+
type?: 'summary_text';
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* Reasoning text from the model.
|
|
425
|
+
*/
|
|
426
|
+
export interface Content {
|
|
427
|
+
/**
|
|
428
|
+
* The reasoning text content from the model.
|
|
429
|
+
*/
|
|
430
|
+
text: string;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* The type identifier, always 'reasoning_text'.
|
|
434
|
+
*/
|
|
435
|
+
type?: 'reasoning_text';
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
367
439
|
/**
|
|
368
440
|
* This represents the output of a function call that gets passed back to the
|
|
369
441
|
* model.
|
|
@@ -371,7 +443,13 @@ export namespace InputItemListResponse {
|
|
|
371
443
|
export interface OpenAIResponseInputFunctionToolCallOutput {
|
|
372
444
|
call_id: string;
|
|
373
445
|
|
|
374
|
-
output:
|
|
446
|
+
output:
|
|
447
|
+
| string
|
|
448
|
+
| Array<
|
|
449
|
+
| OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentText
|
|
450
|
+
| OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentImage
|
|
451
|
+
| OpenAIResponseInputFunctionToolCallOutput.OpenAIResponseInputMessageContentFile
|
|
452
|
+
>;
|
|
375
453
|
|
|
376
454
|
id?: string | null;
|
|
377
455
|
|
|
@@ -380,6 +458,45 @@ export namespace InputItemListResponse {
|
|
|
380
458
|
type?: 'function_call_output';
|
|
381
459
|
}
|
|
382
460
|
|
|
461
|
+
export namespace OpenAIResponseInputFunctionToolCallOutput {
|
|
462
|
+
/**
|
|
463
|
+
* Text content for input messages in OpenAI response format.
|
|
464
|
+
*/
|
|
465
|
+
export interface OpenAIResponseInputMessageContentText {
|
|
466
|
+
text: string;
|
|
467
|
+
|
|
468
|
+
type?: 'input_text';
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Image content for input messages in OpenAI response format.
|
|
473
|
+
*/
|
|
474
|
+
export interface OpenAIResponseInputMessageContentImage {
|
|
475
|
+
detail?: 'low' | 'high' | 'auto';
|
|
476
|
+
|
|
477
|
+
file_id?: string | null;
|
|
478
|
+
|
|
479
|
+
image_url?: string | null;
|
|
480
|
+
|
|
481
|
+
type?: 'input_image';
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* File content for input messages in OpenAI response format.
|
|
486
|
+
*/
|
|
487
|
+
export interface OpenAIResponseInputMessageContentFile {
|
|
488
|
+
file_data?: string | null;
|
|
489
|
+
|
|
490
|
+
file_id?: string | null;
|
|
491
|
+
|
|
492
|
+
file_url?: string | null;
|
|
493
|
+
|
|
494
|
+
filename?: string | null;
|
|
495
|
+
|
|
496
|
+
type?: 'input_file';
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
383
500
|
/**
|
|
384
501
|
* A response to an MCP approval request.
|
|
385
502
|
*/
|
|
@@ -460,6 +577,9 @@ export namespace InputItemListResponse {
|
|
|
460
577
|
type?: 'input_file';
|
|
461
578
|
}
|
|
462
579
|
|
|
580
|
+
/**
|
|
581
|
+
* Text content within an output message of an OpenAI response.
|
|
582
|
+
*/
|
|
463
583
|
export interface OpenAIResponseOutputMessageContentOutputTextOutput {
|
|
464
584
|
text: string;
|
|
465
585
|
|
|
@@ -504,6 +624,9 @@ export namespace InputItemListResponse {
|
|
|
504
624
|
type?: 'url_citation';
|
|
505
625
|
}
|
|
506
626
|
|
|
627
|
+
/**
|
|
628
|
+
* Container file citation annotation referencing a file within a container.
|
|
629
|
+
*/
|
|
507
630
|
export interface OpenAIResponseAnnotationContainerFileCitation {
|
|
508
631
|
container_id: string;
|
|
509
632
|
|
|
@@ -518,6 +641,9 @@ export namespace InputItemListResponse {
|
|
|
518
641
|
type?: 'container_file_citation';
|
|
519
642
|
}
|
|
520
643
|
|
|
644
|
+
/**
|
|
645
|
+
* File path annotation referencing a generated file in response content.
|
|
646
|
+
*/
|
|
521
647
|
export interface OpenAIResponseAnnotationFilePath {
|
|
522
648
|
file_id: string;
|
|
523
649
|
|
|
@@ -618,7 +744,7 @@ export interface InputItemListParams {
|
|
|
618
744
|
limit?: number | null;
|
|
619
745
|
|
|
620
746
|
/**
|
|
621
|
-
*
|
|
747
|
+
* The order to return the input items in.
|
|
622
748
|
*/
|
|
623
749
|
order?: 'asc' | 'desc' | null;
|
|
624
750
|
}
|