llama-stack-client 0.2.13-rc2 → 0.2.14-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/LICENSE +201 -22
- package/README.md +67 -48
- package/_shims/web-runtime.js +1 -1
- package/_shims/web-runtime.js.map +1 -1
- package/_shims/web-runtime.mjs +1 -1
- package/_shims/web-runtime.mjs.map +1 -1
- package/core.js +1 -1
- package/core.js.map +1 -1
- package/core.mjs +1 -1
- package/core.mjs.map +1 -1
- package/index.d.mts +10 -8
- package/index.d.ts +10 -8
- package/index.d.ts.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/index.mjs +3 -3
- package/index.mjs.map +1 -1
- package/package.json +4 -5
- package/resources/agents/agents.d.ts +52 -4
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +13 -0
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +13 -0
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/index.d.ts +2 -2
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/session.d.ts +35 -1
- package/resources/agents/session.d.ts.map +1 -1
- package/resources/agents/session.js +6 -0
- package/resources/agents/session.js.map +1 -1
- package/resources/agents/session.mjs +6 -0
- package/resources/agents/session.mjs.map +1 -1
- package/resources/agents/turn.d.ts +6 -2
- package/resources/agents/turn.d.ts.map +1 -1
- package/resources/benchmarks.d.ts +6 -2
- package/resources/benchmarks.d.ts.map +1 -1
- package/resources/chat/completions.d.ts +21 -7
- package/resources/chat/completions.d.ts.map +1 -1
- package/resources/completions.d.ts +6 -2
- package/resources/completions.d.ts.map +1 -1
- package/resources/datasets.d.ts +40 -10
- package/resources/datasets.d.ts.map +1 -1
- package/resources/datasets.js +10 -0
- package/resources/datasets.js.map +1 -1
- package/resources/datasets.mjs +10 -0
- package/resources/datasets.mjs.map +1 -1
- package/resources/eval/eval.d.ts +15 -5
- package/resources/eval/eval.d.ts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/inference.d.ts +9 -3
- package/resources/inference.d.ts.map +1 -1
- package/resources/inspect.d.ts +6 -2
- package/resources/inspect.d.ts.map +1 -1
- package/resources/models.d.ts +6 -2
- package/resources/models.d.ts.map +1 -1
- package/resources/post-training/job.d.ts +3 -1
- package/resources/post-training/job.d.ts.map +1 -1
- package/resources/post-training/job.js.map +1 -1
- package/resources/post-training/job.mjs.map +1 -1
- package/resources/post-training/post-training.d.ts +12 -4
- package/resources/post-training/post-training.d.ts.map +1 -1
- package/resources/responses/input-items.d.ts +32 -1
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/responses.d.ts +223 -17
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/safety.d.ts +3 -1
- package/resources/safety.d.ts.map +1 -1
- package/resources/scoring-functions.d.ts +3 -1
- package/resources/scoring-functions.d.ts.map +1 -1
- package/resources/scoring.d.ts +15 -5
- package/resources/scoring.d.ts.map +1 -1
- package/resources/shared.d.ts +29 -9
- package/resources/shared.d.ts.map +1 -1
- package/resources/shields.d.ts +6 -2
- package/resources/shields.d.ts.map +1 -1
- package/resources/synthetic-data-generation.d.ts +6 -2
- package/resources/synthetic-data-generation.d.ts.map +1 -1
- package/resources/telemetry.d.ts +21 -7
- package/resources/telemetry.d.ts.map +1 -1
- package/resources/tool-runtime/tool-runtime.d.ts +9 -3
- package/resources/tool-runtime/tool-runtime.d.ts.map +1 -1
- package/resources/toolgroups.d.ts +6 -2
- package/resources/toolgroups.d.ts.map +1 -1
- package/resources/tools.d.ts +3 -1
- package/resources/tools.d.ts.map +1 -1
- package/resources/vector-io.d.ts +139 -7
- package/resources/vector-io.d.ts.map +1 -1
- package/resources/vector-stores/files.d.ts +78 -3
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +34 -0
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +34 -0
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/index.d.ts +1 -1
- package/resources/vector-stores/index.d.ts.map +1 -1
- package/resources/vector-stores/index.js.map +1 -1
- package/resources/vector-stores/index.mjs +1 -1
- package/resources/vector-stores/index.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts +33 -11
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +1 -1
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/src/_shims/web-runtime.ts +1 -1
- package/src/core.ts +1 -1
- package/src/index.ts +16 -6
- package/src/resources/agents/agents.ts +74 -1
- package/src/resources/agents/index.ts +5 -0
- package/src/resources/agents/session.ts +54 -0
- package/src/resources/agents/turn.ts +2 -2
- package/src/resources/benchmarks.ts +2 -2
- package/src/resources/chat/completions.ts +7 -7
- package/src/resources/completions.ts +2 -2
- package/src/resources/datasets.ts +32 -9
- package/src/resources/eval/eval.ts +5 -5
- package/src/resources/index.ts +4 -0
- package/src/resources/inference.ts +3 -3
- package/src/resources/inspect.ts +2 -2
- package/src/resources/models.ts +2 -2
- package/src/resources/post-training/job.ts +1 -2
- package/src/resources/post-training/post-training.ts +4 -4
- package/src/resources/responses/input-items.ts +54 -1
- package/src/resources/responses/responses.ts +335 -17
- package/src/resources/safety.ts +1 -1
- package/src/resources/scoring-functions.ts +1 -1
- package/src/resources/scoring.ts +5 -5
- package/src/resources/shared.ts +17 -17
- package/src/resources/shields.ts +2 -2
- package/src/resources/synthetic-data-generation.ts +2 -2
- package/src/resources/telemetry.ts +7 -7
- package/src/resources/tool-runtime/tool-runtime.ts +3 -3
- package/src/resources/toolgroups.ts +2 -2
- package/src/resources/tools.ts +1 -1
- package/src/resources/vector-io.ts +159 -7
- package/src/resources/vector-stores/files.ts +146 -3
- package/src/resources/vector-stores/index.ts +10 -1
- package/src/resources/vector-stores/vector-stores.ts +29 -10
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
|
+
import { isRequestOptions } from '../../core';
|
|
4
5
|
import * as Core from '../../core';
|
|
5
6
|
import * as Shared from '../shared';
|
|
6
7
|
import * as SessionAPI from './session';
|
|
@@ -8,6 +9,8 @@ import {
|
|
|
8
9
|
Session,
|
|
9
10
|
SessionCreateParams,
|
|
10
11
|
SessionCreateResponse,
|
|
12
|
+
SessionListParams,
|
|
13
|
+
SessionListResponse,
|
|
11
14
|
SessionResource,
|
|
12
15
|
SessionRetrieveParams,
|
|
13
16
|
} from './session';
|
|
@@ -40,6 +43,28 @@ export class Agents extends APIResource {
|
|
|
40
43
|
return this._client.post('/v1/agents', { body, ...options });
|
|
41
44
|
}
|
|
42
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Describe an agent by its ID.
|
|
48
|
+
*/
|
|
49
|
+
retrieve(agentId: string, options?: Core.RequestOptions): Core.APIPromise<AgentRetrieveResponse> {
|
|
50
|
+
return this._client.get(`/v1/agents/${agentId}`, options);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* List all agents.
|
|
55
|
+
*/
|
|
56
|
+
list(query?: AgentListParams, options?: Core.RequestOptions): Core.APIPromise<AgentListResponse>;
|
|
57
|
+
list(options?: Core.RequestOptions): Core.APIPromise<AgentListResponse>;
|
|
58
|
+
list(
|
|
59
|
+
query: AgentListParams | Core.RequestOptions = {},
|
|
60
|
+
options?: Core.RequestOptions,
|
|
61
|
+
): Core.APIPromise<AgentListResponse> {
|
|
62
|
+
if (isRequestOptions(query)) {
|
|
63
|
+
return this.list({}, query);
|
|
64
|
+
}
|
|
65
|
+
return this._client.get('/v1/agents', { query, ...options });
|
|
66
|
+
}
|
|
67
|
+
|
|
43
68
|
/**
|
|
44
69
|
* Delete an agent by its ID and its associated sessions and turns.
|
|
45
70
|
*/
|
|
@@ -211,13 +236,44 @@ export interface ToolResponse {
|
|
|
211
236
|
|
|
212
237
|
tool_name: 'brave_search' | 'wolfram_alpha' | 'photogen' | 'code_interpreter' | (string & {});
|
|
213
238
|
|
|
214
|
-
metadata?:
|
|
239
|
+
metadata?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
215
240
|
}
|
|
216
241
|
|
|
217
242
|
export interface AgentCreateResponse {
|
|
218
243
|
agent_id: string;
|
|
219
244
|
}
|
|
220
245
|
|
|
246
|
+
export interface AgentRetrieveResponse {
|
|
247
|
+
/**
|
|
248
|
+
* Configuration for an agent.
|
|
249
|
+
*/
|
|
250
|
+
agent_config: Shared.AgentConfig;
|
|
251
|
+
|
|
252
|
+
agent_id: string;
|
|
253
|
+
|
|
254
|
+
created_at: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* A generic paginated response that follows a simple format.
|
|
259
|
+
*/
|
|
260
|
+
export interface AgentListResponse {
|
|
261
|
+
/**
|
|
262
|
+
* The list of items for the current page
|
|
263
|
+
*/
|
|
264
|
+
data: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Whether there are more items available after this set
|
|
268
|
+
*/
|
|
269
|
+
has_more: boolean;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* The URL for accessing this list
|
|
273
|
+
*/
|
|
274
|
+
url?: string;
|
|
275
|
+
}
|
|
276
|
+
|
|
221
277
|
export interface AgentCreateParams {
|
|
222
278
|
/**
|
|
223
279
|
* The configuration for the agent.
|
|
@@ -225,6 +281,18 @@ export interface AgentCreateParams {
|
|
|
225
281
|
agent_config: Shared.AgentConfig;
|
|
226
282
|
}
|
|
227
283
|
|
|
284
|
+
export interface AgentListParams {
|
|
285
|
+
/**
|
|
286
|
+
* The number of agents to return.
|
|
287
|
+
*/
|
|
288
|
+
limit?: number;
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* The index to start the pagination from.
|
|
292
|
+
*/
|
|
293
|
+
start_index?: number;
|
|
294
|
+
}
|
|
295
|
+
|
|
228
296
|
Agents.SessionResource = SessionResource;
|
|
229
297
|
Agents.Steps = Steps;
|
|
230
298
|
Agents.TurnResource = TurnResource;
|
|
@@ -237,15 +305,20 @@ export declare namespace Agents {
|
|
|
237
305
|
type ToolExecutionStep as ToolExecutionStep,
|
|
238
306
|
type ToolResponse as ToolResponse,
|
|
239
307
|
type AgentCreateResponse as AgentCreateResponse,
|
|
308
|
+
type AgentRetrieveResponse as AgentRetrieveResponse,
|
|
309
|
+
type AgentListResponse as AgentListResponse,
|
|
240
310
|
type AgentCreateParams as AgentCreateParams,
|
|
311
|
+
type AgentListParams as AgentListParams,
|
|
241
312
|
};
|
|
242
313
|
|
|
243
314
|
export {
|
|
244
315
|
SessionResource as SessionResource,
|
|
245
316
|
type Session as Session,
|
|
246
317
|
type SessionCreateResponse as SessionCreateResponse,
|
|
318
|
+
type SessionListResponse as SessionListResponse,
|
|
247
319
|
type SessionCreateParams as SessionCreateParams,
|
|
248
320
|
type SessionRetrieveParams as SessionRetrieveParams,
|
|
321
|
+
type SessionListParams as SessionListParams,
|
|
249
322
|
};
|
|
250
323
|
|
|
251
324
|
export { Steps as Steps, type StepRetrieveResponse as StepRetrieveResponse };
|
|
@@ -8,14 +8,19 @@ export {
|
|
|
8
8
|
type ToolExecutionStep,
|
|
9
9
|
type ToolResponse,
|
|
10
10
|
type AgentCreateResponse,
|
|
11
|
+
type AgentRetrieveResponse,
|
|
12
|
+
type AgentListResponse,
|
|
11
13
|
type AgentCreateParams,
|
|
14
|
+
type AgentListParams,
|
|
12
15
|
} from './agents';
|
|
13
16
|
export {
|
|
14
17
|
SessionResource,
|
|
15
18
|
type Session,
|
|
16
19
|
type SessionCreateResponse,
|
|
20
|
+
type SessionListResponse,
|
|
17
21
|
type SessionCreateParams,
|
|
18
22
|
type SessionRetrieveParams,
|
|
23
|
+
type SessionListParams,
|
|
19
24
|
} from './session';
|
|
20
25
|
export { Steps, type StepRetrieveResponse } from './steps';
|
|
21
26
|
export {
|
|
@@ -39,6 +39,26 @@ export class SessionResource extends APIResource {
|
|
|
39
39
|
return this._client.get(`/v1/agents/${agentId}/session/${sessionId}`, { query, ...options });
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* List all session(s) of a given agent.
|
|
44
|
+
*/
|
|
45
|
+
list(
|
|
46
|
+
agentId: string,
|
|
47
|
+
query?: SessionListParams,
|
|
48
|
+
options?: Core.RequestOptions,
|
|
49
|
+
): Core.APIPromise<SessionListResponse>;
|
|
50
|
+
list(agentId: string, options?: Core.RequestOptions): Core.APIPromise<SessionListResponse>;
|
|
51
|
+
list(
|
|
52
|
+
agentId: string,
|
|
53
|
+
query: SessionListParams | Core.RequestOptions = {},
|
|
54
|
+
options?: Core.RequestOptions,
|
|
55
|
+
): Core.APIPromise<SessionListResponse> {
|
|
56
|
+
if (isRequestOptions(query)) {
|
|
57
|
+
return this.list(agentId, {}, query);
|
|
58
|
+
}
|
|
59
|
+
return this._client.get(`/v1/agents/${agentId}/sessions`, { query, ...options });
|
|
60
|
+
}
|
|
61
|
+
|
|
42
62
|
/**
|
|
43
63
|
* Delete an agent session by its ID and its associated turns.
|
|
44
64
|
*/
|
|
@@ -67,6 +87,26 @@ export interface SessionCreateResponse {
|
|
|
67
87
|
session_id: string;
|
|
68
88
|
}
|
|
69
89
|
|
|
90
|
+
/**
|
|
91
|
+
* A generic paginated response that follows a simple format.
|
|
92
|
+
*/
|
|
93
|
+
export interface SessionListResponse {
|
|
94
|
+
/**
|
|
95
|
+
* The list of items for the current page
|
|
96
|
+
*/
|
|
97
|
+
data: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Whether there are more items available after this set
|
|
101
|
+
*/
|
|
102
|
+
has_more: boolean;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The URL for accessing this list
|
|
106
|
+
*/
|
|
107
|
+
url?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
70
110
|
export interface SessionCreateParams {
|
|
71
111
|
/**
|
|
72
112
|
* The name of the session to create.
|
|
@@ -81,11 +121,25 @@ export interface SessionRetrieveParams {
|
|
|
81
121
|
turn_ids?: Array<string>;
|
|
82
122
|
}
|
|
83
123
|
|
|
124
|
+
export interface SessionListParams {
|
|
125
|
+
/**
|
|
126
|
+
* The number of sessions to return.
|
|
127
|
+
*/
|
|
128
|
+
limit?: number;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* The index to start the pagination from.
|
|
132
|
+
*/
|
|
133
|
+
start_index?: number;
|
|
134
|
+
}
|
|
135
|
+
|
|
84
136
|
export declare namespace SessionResource {
|
|
85
137
|
export {
|
|
86
138
|
type Session as Session,
|
|
87
139
|
type SessionCreateResponse as SessionCreateResponse,
|
|
140
|
+
type SessionListResponse as SessionListResponse,
|
|
88
141
|
type SessionCreateParams as SessionCreateParams,
|
|
89
142
|
type SessionRetrieveParams as SessionRetrieveParams,
|
|
143
|
+
type SessionListParams as SessionListParams,
|
|
90
144
|
};
|
|
91
145
|
}
|
|
@@ -242,7 +242,7 @@ export namespace TurnResponseEventPayload {
|
|
|
242
242
|
*/
|
|
243
243
|
step_type: 'inference' | 'tool_execution' | 'shield_call' | 'memory_retrieval';
|
|
244
244
|
|
|
245
|
-
metadata?:
|
|
245
|
+
metadata?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
export interface AgentTurnResponseStepProgressPayload {
|
|
@@ -453,7 +453,7 @@ export namespace TurnCreateParams {
|
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
export interface AgentToolGroupWithArgs {
|
|
456
|
-
args:
|
|
456
|
+
args: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
457
457
|
|
|
458
458
|
name: string;
|
|
459
459
|
}
|
|
@@ -37,7 +37,7 @@ export interface Benchmark {
|
|
|
37
37
|
|
|
38
38
|
identifier: string;
|
|
39
39
|
|
|
40
|
-
metadata:
|
|
40
|
+
metadata: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
41
41
|
|
|
42
42
|
provider_id: string;
|
|
43
43
|
|
|
@@ -73,7 +73,7 @@ export interface BenchmarkRegisterParams {
|
|
|
73
73
|
/**
|
|
74
74
|
* The metadata to use for the benchmark.
|
|
75
75
|
*/
|
|
76
|
-
metadata?:
|
|
76
|
+
metadata?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* The ID of the provider benchmark to use for the benchmark.
|
|
@@ -1841,17 +1841,17 @@ export interface CompletionCreateParamsBase {
|
|
|
1841
1841
|
/**
|
|
1842
1842
|
* (Optional) The function call to use.
|
|
1843
1843
|
*/
|
|
1844
|
-
function_call?: string |
|
|
1844
|
+
function_call?: string | { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
1845
1845
|
|
|
1846
1846
|
/**
|
|
1847
1847
|
* (Optional) List of functions to use.
|
|
1848
1848
|
*/
|
|
1849
|
-
functions?: Array<
|
|
1849
|
+
functions?: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
1850
1850
|
|
|
1851
1851
|
/**
|
|
1852
1852
|
* (Optional) The logit bias to use.
|
|
1853
1853
|
*/
|
|
1854
|
-
logit_bias?:
|
|
1854
|
+
logit_bias?: { [key: string]: number };
|
|
1855
1855
|
|
|
1856
1856
|
/**
|
|
1857
1857
|
* (Optional) The log probabilities to use.
|
|
@@ -1909,7 +1909,7 @@ export interface CompletionCreateParamsBase {
|
|
|
1909
1909
|
/**
|
|
1910
1910
|
* (Optional) The stream options to use.
|
|
1911
1911
|
*/
|
|
1912
|
-
stream_options?:
|
|
1912
|
+
stream_options?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
1913
1913
|
|
|
1914
1914
|
/**
|
|
1915
1915
|
* (Optional) The temperature to use.
|
|
@@ -1919,12 +1919,12 @@ export interface CompletionCreateParamsBase {
|
|
|
1919
1919
|
/**
|
|
1920
1920
|
* (Optional) The tool choice to use.
|
|
1921
1921
|
*/
|
|
1922
|
-
tool_choice?: string |
|
|
1922
|
+
tool_choice?: string | { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
1923
1923
|
|
|
1924
1924
|
/**
|
|
1925
1925
|
* (Optional) The tools to use.
|
|
1926
1926
|
*/
|
|
1927
|
-
tools?: Array<
|
|
1927
|
+
tools?: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
1928
1928
|
|
|
1929
1929
|
/**
|
|
1930
1930
|
* (Optional) The top log probabilities to use.
|
|
@@ -2221,7 +2221,7 @@ export namespace CompletionCreateParams {
|
|
|
2221
2221
|
|
|
2222
2222
|
description?: string;
|
|
2223
2223
|
|
|
2224
|
-
schema?:
|
|
2224
|
+
schema?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
2225
2225
|
|
|
2226
2226
|
strict?: boolean;
|
|
2227
2227
|
}
|
|
@@ -179,7 +179,7 @@ export interface CompletionCreateParamsBase {
|
|
|
179
179
|
/**
|
|
180
180
|
* (Optional) The logit bias to use.
|
|
181
181
|
*/
|
|
182
|
-
logit_bias?:
|
|
182
|
+
logit_bias?: { [key: string]: number };
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
185
|
* (Optional) The log probabilities to use.
|
|
@@ -221,7 +221,7 @@ export interface CompletionCreateParamsBase {
|
|
|
221
221
|
/**
|
|
222
222
|
* (Optional) The stream options to use.
|
|
223
223
|
*/
|
|
224
|
-
stream_options?:
|
|
224
|
+
stream_options?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
227
|
* (Optional) The suffix that should be appended to the completion.
|
|
@@ -21,6 +21,21 @@ export class Datasets extends APIResource {
|
|
|
21
21
|
)._thenUnwrap((obj) => obj.data);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Append rows to a dataset.
|
|
26
|
+
*/
|
|
27
|
+
appendrows(
|
|
28
|
+
datasetId: string,
|
|
29
|
+
body: DatasetAppendrowsParams,
|
|
30
|
+
options?: Core.RequestOptions,
|
|
31
|
+
): Core.APIPromise<void> {
|
|
32
|
+
return this._client.post(`/v1/datasetio/append-rows/${datasetId}`, {
|
|
33
|
+
body,
|
|
34
|
+
...options,
|
|
35
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
24
39
|
/**
|
|
25
40
|
* Get a paginated list of rows from a dataset. Uses offset-based pagination where:
|
|
26
41
|
*
|
|
@@ -77,7 +92,7 @@ export interface ListDatasetsResponse {
|
|
|
77
92
|
export interface DatasetRetrieveResponse {
|
|
78
93
|
identifier: string;
|
|
79
94
|
|
|
80
|
-
metadata:
|
|
95
|
+
metadata: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
81
96
|
|
|
82
97
|
provider_id: string;
|
|
83
98
|
|
|
@@ -120,7 +135,7 @@ export namespace DatasetRetrieveResponse {
|
|
|
120
135
|
* "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}
|
|
121
136
|
* ]
|
|
122
137
|
*/
|
|
123
|
-
rows: Array<
|
|
138
|
+
rows: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
124
139
|
|
|
125
140
|
type: 'rows';
|
|
126
141
|
}
|
|
@@ -132,7 +147,7 @@ export namespace DatasetListResponse {
|
|
|
132
147
|
export interface DatasetListResponseItem {
|
|
133
148
|
identifier: string;
|
|
134
149
|
|
|
135
|
-
metadata:
|
|
150
|
+
metadata: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
136
151
|
|
|
137
152
|
provider_id: string;
|
|
138
153
|
|
|
@@ -175,7 +190,7 @@ export namespace DatasetListResponse {
|
|
|
175
190
|
* "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}
|
|
176
191
|
* ]
|
|
177
192
|
*/
|
|
178
|
-
rows: Array<
|
|
193
|
+
rows: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
179
194
|
|
|
180
195
|
type: 'rows';
|
|
181
196
|
}
|
|
@@ -189,7 +204,7 @@ export interface DatasetIterrowsResponse {
|
|
|
189
204
|
/**
|
|
190
205
|
* The list of items for the current page
|
|
191
206
|
*/
|
|
192
|
-
data: Array<
|
|
207
|
+
data: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
193
208
|
|
|
194
209
|
/**
|
|
195
210
|
* Whether there are more items available after this set
|
|
@@ -205,7 +220,7 @@ export interface DatasetIterrowsResponse {
|
|
|
205
220
|
export interface DatasetRegisterResponse {
|
|
206
221
|
identifier: string;
|
|
207
222
|
|
|
208
|
-
metadata:
|
|
223
|
+
metadata: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
209
224
|
|
|
210
225
|
provider_id: string;
|
|
211
226
|
|
|
@@ -248,12 +263,19 @@ export namespace DatasetRegisterResponse {
|
|
|
248
263
|
* "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}
|
|
249
264
|
* ]
|
|
250
265
|
*/
|
|
251
|
-
rows: Array<
|
|
266
|
+
rows: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
252
267
|
|
|
253
268
|
type: 'rows';
|
|
254
269
|
}
|
|
255
270
|
}
|
|
256
271
|
|
|
272
|
+
export interface DatasetAppendrowsParams {
|
|
273
|
+
/**
|
|
274
|
+
* The rows to append to the dataset.
|
|
275
|
+
*/
|
|
276
|
+
rows: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
277
|
+
}
|
|
278
|
+
|
|
257
279
|
export interface DatasetIterrowsParams {
|
|
258
280
|
/**
|
|
259
281
|
* The number of rows to get.
|
|
@@ -302,7 +324,7 @@ export interface DatasetRegisterParams {
|
|
|
302
324
|
/**
|
|
303
325
|
* The metadata for the dataset. - E.g. {"description": "My dataset"}.
|
|
304
326
|
*/
|
|
305
|
-
metadata?:
|
|
327
|
+
metadata?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
306
328
|
}
|
|
307
329
|
|
|
308
330
|
export namespace DatasetRegisterParams {
|
|
@@ -329,7 +351,7 @@ export namespace DatasetRegisterParams {
|
|
|
329
351
|
* "content": "Hello, world!"}, {"role": "assistant", "content": "Hello, world!"}]}
|
|
330
352
|
* ]
|
|
331
353
|
*/
|
|
332
|
-
rows: Array<
|
|
354
|
+
rows: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
333
355
|
|
|
334
356
|
type: 'rows';
|
|
335
357
|
}
|
|
@@ -342,6 +364,7 @@ export declare namespace Datasets {
|
|
|
342
364
|
type DatasetListResponse as DatasetListResponse,
|
|
343
365
|
type DatasetIterrowsResponse as DatasetIterrowsResponse,
|
|
344
366
|
type DatasetRegisterResponse as DatasetRegisterResponse,
|
|
367
|
+
type DatasetAppendrowsParams as DatasetAppendrowsParams,
|
|
345
368
|
type DatasetIterrowsParams as DatasetIterrowsParams,
|
|
346
369
|
type DatasetRegisterParams as DatasetRegisterParams,
|
|
347
370
|
};
|
|
@@ -64,7 +64,7 @@ export interface BenchmarkConfig {
|
|
|
64
64
|
* Map between scoring function id and parameters for each scoring function you
|
|
65
65
|
* want to run
|
|
66
66
|
*/
|
|
67
|
-
scoring_params:
|
|
67
|
+
scoring_params: { [key: string]: ScoringFunctionsAPI.ScoringFnParams };
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* (Optional) The number of examples to evaluate. If not provided, all examples in
|
|
@@ -121,12 +121,12 @@ export interface EvaluateResponse {
|
|
|
121
121
|
/**
|
|
122
122
|
* The generations from the evaluation.
|
|
123
123
|
*/
|
|
124
|
-
generations: Array<
|
|
124
|
+
generations: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
* The scores from the evaluation.
|
|
128
128
|
*/
|
|
129
|
-
scores:
|
|
129
|
+
scores: { [key: string]: Shared.ScoringResult };
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
export interface Job {
|
|
@@ -144,7 +144,7 @@ export interface EvalEvaluateRowsParams {
|
|
|
144
144
|
/**
|
|
145
145
|
* The rows to evaluate.
|
|
146
146
|
*/
|
|
147
|
-
input_rows: Array<
|
|
147
|
+
input_rows: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* The scoring functions to use for the evaluation.
|
|
@@ -161,7 +161,7 @@ export interface EvalEvaluateRowsAlphaParams {
|
|
|
161
161
|
/**
|
|
162
162
|
* The rows to evaluate.
|
|
163
163
|
*/
|
|
164
|
-
input_rows: Array<
|
|
164
|
+
input_rows: Array<{ [key: string]: boolean | number | string | Array<unknown> | unknown | null }>;
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
167
|
* The scoring functions to use for the evaluation.
|
package/src/resources/index.ts
CHANGED
|
@@ -9,7 +9,10 @@ export {
|
|
|
9
9
|
type ToolExecutionStep,
|
|
10
10
|
type ToolResponse,
|
|
11
11
|
type AgentCreateResponse,
|
|
12
|
+
type AgentRetrieveResponse,
|
|
13
|
+
type AgentListResponse,
|
|
12
14
|
type AgentCreateParams,
|
|
15
|
+
type AgentListParams,
|
|
13
16
|
} from './agents/agents';
|
|
14
17
|
export {
|
|
15
18
|
Benchmarks,
|
|
@@ -33,6 +36,7 @@ export {
|
|
|
33
36
|
type DatasetListResponse,
|
|
34
37
|
type DatasetIterrowsResponse,
|
|
35
38
|
type DatasetRegisterResponse,
|
|
39
|
+
type DatasetAppendrowsParams,
|
|
36
40
|
type DatasetIterrowsParams,
|
|
37
41
|
type DatasetRegisterParams,
|
|
38
42
|
} from './datasets';
|
|
@@ -190,7 +190,7 @@ export interface TokenLogProbs {
|
|
|
190
190
|
/**
|
|
191
191
|
* Dictionary mapping tokens to their log probabilities
|
|
192
192
|
*/
|
|
193
|
-
logprobs_by_token:
|
|
193
|
+
logprobs_by_token: { [key: string]: number };
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
export interface InferenceBatchChatCompletionResponse {
|
|
@@ -284,7 +284,7 @@ export namespace InferenceBatchChatCompletionParams {
|
|
|
284
284
|
|
|
285
285
|
description?: string;
|
|
286
286
|
|
|
287
|
-
parameters?:
|
|
287
|
+
parameters?: { [key: string]: Shared.ToolParamDefinition };
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
|
|
@@ -447,7 +447,7 @@ export namespace InferenceChatCompletionParams {
|
|
|
447
447
|
|
|
448
448
|
description?: string;
|
|
449
449
|
|
|
450
|
-
parameters?:
|
|
450
|
+
parameters?: { [key: string]: Shared.ToolParamDefinition };
|
|
451
451
|
}
|
|
452
452
|
|
|
453
453
|
export type InferenceChatCompletionParamsNonStreaming =
|
package/src/resources/inspect.ts
CHANGED
|
@@ -26,9 +26,9 @@ export interface HealthInfo {
|
|
|
26
26
|
export interface ProviderInfo {
|
|
27
27
|
api: string;
|
|
28
28
|
|
|
29
|
-
config:
|
|
29
|
+
config: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
30
30
|
|
|
31
|
-
health:
|
|
31
|
+
health: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
32
32
|
|
|
33
33
|
provider_id: string;
|
|
34
34
|
|
package/src/resources/models.ts
CHANGED
|
@@ -45,7 +45,7 @@ export interface ListModelsResponse {
|
|
|
45
45
|
export interface Model {
|
|
46
46
|
identifier: string;
|
|
47
47
|
|
|
48
|
-
metadata:
|
|
48
|
+
metadata: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
49
49
|
|
|
50
50
|
model_type: 'llm' | 'embedding';
|
|
51
51
|
|
|
@@ -67,7 +67,7 @@ export interface ModelRegisterParams {
|
|
|
67
67
|
/**
|
|
68
68
|
* Any additional metadata for this model.
|
|
69
69
|
*/
|
|
70
|
-
metadata?:
|
|
70
|
+
metadata?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* The type of model to register.
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import * as Core from '../../core';
|
|
5
|
-
import { ListPostTrainingJobsResponse } from './post-training';
|
|
6
5
|
import * as PostTrainingAPI from './post-training';
|
|
7
6
|
|
|
8
7
|
export class Job extends APIResource {
|
|
@@ -74,7 +73,7 @@ export interface JobStatusResponse {
|
|
|
74
73
|
|
|
75
74
|
completed_at?: string;
|
|
76
75
|
|
|
77
|
-
resources_allocated?:
|
|
76
|
+
resources_allocated?: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
78
77
|
|
|
79
78
|
scheduled_at?: string;
|
|
80
79
|
|
|
@@ -95,7 +95,7 @@ export interface PostTrainingPreferenceOptimizeParams {
|
|
|
95
95
|
/**
|
|
96
96
|
* The hyperparam search configuration.
|
|
97
97
|
*/
|
|
98
|
-
hyperparam_search_config:
|
|
98
|
+
hyperparam_search_config: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* The UUID of the job to create.
|
|
@@ -105,7 +105,7 @@ export interface PostTrainingPreferenceOptimizeParams {
|
|
|
105
105
|
/**
|
|
106
106
|
* The logger configuration.
|
|
107
107
|
*/
|
|
108
|
-
logger_config:
|
|
108
|
+
logger_config: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* The training configuration.
|
|
@@ -191,7 +191,7 @@ export interface PostTrainingSupervisedFineTuneParams {
|
|
|
191
191
|
/**
|
|
192
192
|
* The hyperparam search configuration.
|
|
193
193
|
*/
|
|
194
|
-
hyperparam_search_config:
|
|
194
|
+
hyperparam_search_config: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
197
|
* The UUID of the job to create.
|
|
@@ -201,7 +201,7 @@ export interface PostTrainingSupervisedFineTuneParams {
|
|
|
201
201
|
/**
|
|
202
202
|
* The logger configuration.
|
|
203
203
|
*/
|
|
204
|
-
logger_config:
|
|
204
|
+
logger_config: { [key: string]: boolean | number | string | Array<unknown> | unknown | null };
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
* The training configuration.
|