@letta-ai/letta-client 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/client.d.mts +2 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -11
- package/client.d.ts.map +1 -1
- package/client.js +0 -9
- package/client.js.map +1 -1
- package/client.mjs +0 -9
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +165 -13
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +165 -13
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +0 -8
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +0 -8
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -3
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -3
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js +1 -5
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs +0 -2
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/messages.d.mts +1 -2
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +1 -2
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/agents/messages.js.map +1 -1
- package/resources/agents/messages.mjs.map +1 -1
- package/resources/conversations/conversations.d.mts +2 -2
- package/resources/conversations/conversations.d.mts.map +1 -1
- package/resources/conversations/conversations.d.ts +2 -2
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/index.d.mts +1 -1
- package/resources/conversations/index.d.mts.map +1 -1
- package/resources/conversations/index.d.ts +1 -1
- package/resources/conversations/index.d.ts.map +1 -1
- package/resources/conversations/index.js.map +1 -1
- package/resources/conversations/index.mjs.map +1 -1
- package/resources/conversations/messages.d.mts +12 -16
- package/resources/conversations/messages.d.mts.map +1 -1
- package/resources/conversations/messages.d.ts +12 -16
- package/resources/conversations/messages.d.ts.map +1 -1
- package/resources/conversations/messages.js +3 -3
- package/resources/conversations/messages.js.map +1 -1
- package/resources/conversations/messages.mjs +3 -3
- package/resources/conversations/messages.mjs.map +1 -1
- package/resources/index.d.mts +1 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -3
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +6 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +6 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +7 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +7 -0
- package/resources/messages.mjs.map +1 -1
- package/src/client.ts +2 -79
- package/src/resources/agents/agents.ts +210 -37
- package/src/resources/agents/index.ts +0 -13
- package/src/resources/agents/messages.ts +1 -3
- package/src/resources/conversations/conversations.ts +0 -2
- package/src/resources/conversations/index.ts +0 -1
- package/src/resources/conversations/messages.ts +17 -19
- package/src/resources/index.ts +1 -35
- package/src/resources/messages.ts +11 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/agents/groups.d.mts +0 -22
- package/resources/agents/groups.d.mts.map +0 -1
- package/resources/agents/groups.d.ts +0 -22
- package/resources/agents/groups.d.ts.map +0 -1
- package/resources/agents/groups.js +0 -20
- package/resources/agents/groups.js.map +0 -1
- package/resources/agents/groups.mjs +0 -16
- package/resources/agents/groups.mjs.map +0 -1
- package/resources/agents/schedule.d.mts +0 -197
- package/resources/agents/schedule.d.mts.map +0 -1
- package/resources/agents/schedule.d.ts +0 -197
- package/resources/agents/schedule.d.ts.map +0 -1
- package/resources/agents/schedule.js +0 -40
- package/resources/agents/schedule.js.map +0 -1
- package/resources/agents/schedule.mjs +0 -36
- package/resources/agents/schedule.mjs.map +0 -1
- package/resources/batches/batches.d.mts +0 -240
- package/resources/batches/batches.d.mts.map +0 -1
- package/resources/batches/batches.d.ts +0 -240
- package/resources/batches/batches.d.ts.map +0 -1
- package/resources/batches/batches.js +0 -46
- package/resources/batches/batches.js.map +0 -1
- package/resources/batches/batches.mjs +0 -41
- package/resources/batches/batches.mjs.map +0 -1
- package/resources/batches/index.d.mts +0 -3
- package/resources/batches/index.d.mts.map +0 -1
- package/resources/batches/index.d.ts +0 -3
- package/resources/batches/index.d.ts.map +0 -1
- package/resources/batches/index.js +0 -9
- package/resources/batches/index.js.map +0 -1
- package/resources/batches/index.mjs +0 -4
- package/resources/batches/index.mjs.map +0 -1
- package/resources/batches/messages.d.mts +0 -22
- package/resources/batches/messages.d.mts.map +0 -1
- package/resources/batches/messages.d.ts +0 -22
- package/resources/batches/messages.d.ts.map +0 -1
- package/resources/batches/messages.js +0 -17
- package/resources/batches/messages.js.map +0 -1
- package/resources/batches/messages.mjs +0 -13
- package/resources/batches/messages.mjs.map +0 -1
- package/resources/batches.d.mts +0 -2
- package/resources/batches.d.mts.map +0 -1
- package/resources/batches.d.ts +0 -2
- package/resources/batches.d.ts.map +0 -1
- package/resources/batches.js +0 -6
- package/resources/batches.js.map +0 -1
- package/resources/batches.mjs +0 -3
- package/resources/batches.mjs.map +0 -1
- package/resources/groups/groups.d.mts +0 -197
- package/resources/groups/groups.d.mts.map +0 -1
- package/resources/groups/groups.d.ts +0 -197
- package/resources/groups/groups.d.ts.map +0 -1
- package/resources/groups/groups.js +0 -49
- package/resources/groups/groups.js.map +0 -1
- package/resources/groups/groups.mjs +0 -44
- package/resources/groups/groups.mjs.map +0 -1
- package/resources/groups/index.d.mts +0 -3
- package/resources/groups/index.d.mts.map +0 -1
- package/resources/groups/index.d.ts +0 -3
- package/resources/groups/index.d.ts.map +0 -1
- package/resources/groups/index.js +0 -9
- package/resources/groups/index.js.map +0 -1
- package/resources/groups/index.mjs +0 -4
- package/resources/groups/index.mjs.map +0 -1
- package/resources/groups/messages.d.mts +0 -360
- package/resources/groups/messages.d.mts.map +0 -1
- package/resources/groups/messages.d.ts +0 -360
- package/resources/groups/messages.d.ts.map +0 -1
- package/resources/groups/messages.js +0 -54
- package/resources/groups/messages.js.map +0 -1
- package/resources/groups/messages.mjs +0 -50
- package/resources/groups/messages.mjs.map +0 -1
- package/resources/groups.d.mts +0 -2
- package/resources/groups.d.mts.map +0 -1
- package/resources/groups.d.ts +0 -2
- package/resources/groups.d.ts.map +0 -1
- package/resources/groups.js +0 -6
- package/resources/groups.js.map +0 -1
- package/resources/groups.mjs +0 -3
- package/resources/groups.mjs.map +0 -1
- package/resources/identities/agents.d.mts +0 -23
- package/resources/identities/agents.d.mts.map +0 -1
- package/resources/identities/agents.d.ts +0 -23
- package/resources/identities/agents.d.ts.map +0 -1
- package/resources/identities/agents.js +0 -17
- package/resources/identities/agents.js.map +0 -1
- package/resources/identities/agents.mjs +0 -13
- package/resources/identities/agents.mjs.map +0 -1
- package/resources/identities/blocks.d.mts +0 -18
- package/resources/identities/blocks.d.mts.map +0 -1
- package/resources/identities/blocks.d.ts +0 -18
- package/resources/identities/blocks.d.ts.map +0 -1
- package/resources/identities/blocks.js +0 -17
- package/resources/identities/blocks.js.map +0 -1
- package/resources/identities/blocks.mjs +0 -13
- package/resources/identities/blocks.mjs.map +0 -1
- package/resources/identities/identities.d.mts +0 -204
- package/resources/identities/identities.d.mts.map +0 -1
- package/resources/identities/identities.d.ts +0 -204
- package/resources/identities/identities.d.ts.map +0 -1
- package/resources/identities/identities.js +0 -63
- package/resources/identities/identities.js.map +0 -1
- package/resources/identities/identities.mjs +0 -58
- package/resources/identities/identities.mjs.map +0 -1
- package/resources/identities/index.d.mts +0 -5
- package/resources/identities/index.d.mts.map +0 -1
- package/resources/identities/index.d.ts +0 -5
- package/resources/identities/index.d.ts.map +0 -1
- package/resources/identities/index.js +0 -13
- package/resources/identities/index.js.map +0 -1
- package/resources/identities/index.mjs +0 -6
- package/resources/identities/index.mjs.map +0 -1
- package/resources/identities/properties.d.mts +0 -18
- package/resources/identities/properties.d.mts.map +0 -1
- package/resources/identities/properties.d.ts +0 -18
- package/resources/identities/properties.d.ts.map +0 -1
- package/resources/identities/properties.js +0 -17
- package/resources/identities/properties.js.map +0 -1
- package/resources/identities/properties.mjs +0 -13
- package/resources/identities/properties.mjs.map +0 -1
- package/resources/identities.d.mts +0 -2
- package/resources/identities.d.mts.map +0 -1
- package/resources/identities.d.ts +0 -2
- package/resources/identities.d.ts.map +0 -1
- package/resources/identities.js +0 -6
- package/resources/identities.js.map +0 -1
- package/resources/identities.mjs +0 -3
- package/resources/identities.mjs.map +0 -1
- package/src/resources/agents/groups.ts +0 -37
- package/src/resources/agents/schedule.ts +0 -361
- package/src/resources/batches/batches.ts +0 -317
- package/src/resources/batches/index.ts +0 -11
- package/src/resources/batches/messages.ts +0 -38
- package/src/resources/batches.ts +0 -3
- package/src/resources/groups/groups.ts +0 -334
- package/src/resources/groups/index.ts +0 -27
- package/src/resources/groups/messages.ts +0 -505
- package/src/resources/groups.ts +0 -3
- package/src/resources/identities/agents.ts +0 -48
- package/src/resources/identities/blocks.ts +0 -33
- package/src/resources/identities/identities.ts +0 -286
- package/src/resources/identities/index.ts +0 -17
- package/src/resources/identities/properties.ts +0 -30
- package/src/resources/identities.ts +0 -3
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as AgentsAPI from '../agents/agents';
|
|
5
|
-
import * as MessagesAPI from '../agents/messages';
|
|
6
|
-
import * as BatchesMessagesAPI from './messages';
|
|
7
|
-
import { MessageListParams, Messages } from './messages';
|
|
8
|
-
import * as RunsAPI from '../runs/runs';
|
|
9
|
-
import { APIPromise } from '../../core/api-promise';
|
|
10
|
-
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
11
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
12
|
-
import { path } from '../../internal/utils/path';
|
|
13
|
-
|
|
14
|
-
export class Batches extends APIResource {
|
|
15
|
-
messages: BatchesMessagesAPI.Messages = new BatchesMessagesAPI.Messages(this._client);
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Submit a batch of agent runs for asynchronous processing.
|
|
19
|
-
*
|
|
20
|
-
* Creates a job that will fan out messages to all listed agents and process them
|
|
21
|
-
* in parallel. The request will be rejected if it exceeds 256MB.
|
|
22
|
-
*/
|
|
23
|
-
create(body: BatchCreateParams, options?: RequestOptions): APIPromise<BatchJob> {
|
|
24
|
-
return this._client.post('/v1/messages/batches', { body, ...options });
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Retrieve the status and details of a batch run.
|
|
29
|
-
*/
|
|
30
|
-
retrieve(batchID: string, options?: RequestOptions): APIPromise<BatchJob> {
|
|
31
|
-
return this._client.get(path`/v1/messages/batches/${batchID}`, options);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* List all batch runs.
|
|
36
|
-
*/
|
|
37
|
-
list(
|
|
38
|
-
query: BatchListParams | null | undefined = {},
|
|
39
|
-
options?: RequestOptions,
|
|
40
|
-
): PagePromise<BatchJobsArrayPage, BatchJob> {
|
|
41
|
-
return this._client.getAPIList('/v1/messages/batches', ArrayPage<BatchJob>, { query, ...options });
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Cancel a batch run.
|
|
46
|
-
*/
|
|
47
|
-
cancel(batchID: string, options?: RequestOptions): APIPromise<unknown> {
|
|
48
|
-
return this._client.patch(path`/v1/messages/batches/${batchID}/cancel`, options);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type BatchJobsArrayPage = ArrayPage<BatchJob>;
|
|
53
|
-
|
|
54
|
-
export interface BatchJob {
|
|
55
|
-
/**
|
|
56
|
-
* The human-friendly ID of the Job
|
|
57
|
-
*/
|
|
58
|
-
id: string;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* The agent associated with this job/run.
|
|
62
|
-
*/
|
|
63
|
-
agent_id?: string | null;
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Whether the job was created in background mode.
|
|
67
|
-
*/
|
|
68
|
-
background?: boolean | null;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Optional error message from attempting to POST the callback endpoint.
|
|
72
|
-
*/
|
|
73
|
-
callback_error?: string | null;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Timestamp when the callback was last attempted.
|
|
77
|
-
*/
|
|
78
|
-
callback_sent_at?: string | null;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* HTTP status code returned by the callback endpoint.
|
|
82
|
-
*/
|
|
83
|
-
callback_status_code?: number | null;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* If set, POST to this URL when the job completes.
|
|
87
|
-
*/
|
|
88
|
-
callback_url?: string | null;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* The unix timestamp of when the job was completed.
|
|
92
|
-
*/
|
|
93
|
-
completed_at?: string | null;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* The unix timestamp of when the job was created.
|
|
97
|
-
*/
|
|
98
|
-
created_at?: string;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* The id of the user that made this object.
|
|
102
|
-
*/
|
|
103
|
-
created_by_id?: string | null;
|
|
104
|
-
|
|
105
|
-
job_type?: MessagesAPI.JobType;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* The id of the user that made this object.
|
|
109
|
-
*/
|
|
110
|
-
last_updated_by_id?: string | null;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* The metadata of the job.
|
|
114
|
-
*/
|
|
115
|
-
metadata?: { [key: string]: unknown } | null;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* The status of the job.
|
|
119
|
-
*/
|
|
120
|
-
status?: MessagesAPI.JobStatus;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* The reason why the job was stopped.
|
|
124
|
-
*/
|
|
125
|
-
stop_reason?: RunsAPI.StopReasonType | null;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Total run duration in nanoseconds
|
|
129
|
-
*/
|
|
130
|
-
total_duration_ns?: number | null;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Time to first token for a run in nanoseconds
|
|
134
|
-
*/
|
|
135
|
-
ttft_ns?: number | null;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* The timestamp when the object was last updated.
|
|
139
|
-
*/
|
|
140
|
-
updated_at?: string | null;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export type BatchCancelResponse = unknown;
|
|
144
|
-
|
|
145
|
-
export interface BatchCreateParams {
|
|
146
|
-
/**
|
|
147
|
-
* List of requests to be processed in batch.
|
|
148
|
-
*/
|
|
149
|
-
requests: Array<BatchCreateParams.Request>;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Optional URL to call via POST when the batch completes. The callback payload
|
|
153
|
-
* will be a JSON object with the following fields: {'job_id': string, 'status':
|
|
154
|
-
* string, 'completed_at': string}. Where 'job_id' is the unique batch job
|
|
155
|
-
* identifier, 'status' is the final batch status (e.g., 'completed', 'failed'),
|
|
156
|
-
* and 'completed_at' is an ISO 8601 timestamp indicating when the batch job
|
|
157
|
-
* completed.
|
|
158
|
-
*/
|
|
159
|
-
callback_url?: string | null;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export namespace BatchCreateParams {
|
|
163
|
-
export interface Request {
|
|
164
|
-
/**
|
|
165
|
-
* The ID of the agent to send this batch request for
|
|
166
|
-
*/
|
|
167
|
-
agent_id: string;
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* @deprecated The name of the message argument in the designated message tool.
|
|
171
|
-
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
172
|
-
* onward.
|
|
173
|
-
*/
|
|
174
|
-
assistant_message_tool_kwarg?: string;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* @deprecated The name of the designated message tool. Still supported for legacy
|
|
178
|
-
* agent types, but deprecated for letta_v1_agent onward.
|
|
179
|
-
*/
|
|
180
|
-
assistant_message_tool_name?: string;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* Client-side tools that the agent can call. When the agent calls a client-side
|
|
184
|
-
* tool, execution pauses and returns control to the client to execute the tool and
|
|
185
|
-
* provide the result via a ToolReturn.
|
|
186
|
-
*/
|
|
187
|
-
client_tools?: Array<Request.ClientTool> | null;
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* @deprecated If set to True, enables reasoning before responses or tool calls
|
|
191
|
-
* from the agent.
|
|
192
|
-
*/
|
|
193
|
-
enable_thinking?: string;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Only return specified message types in the response. If `None` (default) returns
|
|
197
|
-
* all messages.
|
|
198
|
-
*/
|
|
199
|
-
include_return_message_types?: Array<MessagesAPI.MessageType> | null;
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
203
|
-
* 'user', 'content': input}].
|
|
204
|
-
*/
|
|
205
|
-
input?:
|
|
206
|
-
| string
|
|
207
|
-
| Array<
|
|
208
|
-
| MessagesAPI.TextContent
|
|
209
|
-
| MessagesAPI.ImageContent
|
|
210
|
-
| MessagesAPI.ToolCallContent
|
|
211
|
-
| MessagesAPI.ToolReturnContent
|
|
212
|
-
| MessagesAPI.ReasoningContent
|
|
213
|
-
| MessagesAPI.RedactedReasoningContent
|
|
214
|
-
| MessagesAPI.OmittedReasoningContent
|
|
215
|
-
| Request.SummarizedReasoningContent
|
|
216
|
-
>
|
|
217
|
-
| null;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Maximum number of steps the agent should take to process the request.
|
|
221
|
-
*/
|
|
222
|
-
max_steps?: number;
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* The messages to be sent to the agent.
|
|
226
|
-
*/
|
|
227
|
-
messages?: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate> | null;
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* @deprecated Whether the server should parse specific tool call arguments
|
|
231
|
-
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
232
|
-
* legacy agent types, but deprecated for letta_v1_agent onward.
|
|
233
|
-
*/
|
|
234
|
-
use_assistant_message?: boolean;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export namespace Request {
|
|
238
|
-
/**
|
|
239
|
-
* Schema for a client-side tool passed in the request.
|
|
240
|
-
*
|
|
241
|
-
* Client-side tools are executed by the client, not the server. When the agent
|
|
242
|
-
* calls a client-side tool, execution pauses and returns control to the client to
|
|
243
|
-
* execute the tool and provide the result.
|
|
244
|
-
*/
|
|
245
|
-
export interface ClientTool {
|
|
246
|
-
/**
|
|
247
|
-
* The name of the tool function
|
|
248
|
-
*/
|
|
249
|
-
name: string;
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Description of what the tool does
|
|
253
|
-
*/
|
|
254
|
-
description?: string | null;
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* JSON Schema for the function parameters
|
|
258
|
-
*/
|
|
259
|
-
parameters?: { [key: string]: unknown } | null;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* The style of reasoning content returned by the OpenAI Responses API
|
|
264
|
-
*/
|
|
265
|
-
export interface SummarizedReasoningContent {
|
|
266
|
-
/**
|
|
267
|
-
* The unique identifier for this reasoning step.
|
|
268
|
-
*/
|
|
269
|
-
id: string;
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* Summaries of the reasoning content.
|
|
273
|
-
*/
|
|
274
|
-
summary: Array<SummarizedReasoningContent.Summary>;
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* The encrypted reasoning content.
|
|
278
|
-
*/
|
|
279
|
-
encrypted_content?: string;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Indicates this is a summarized reasoning step.
|
|
283
|
-
*/
|
|
284
|
-
type?: 'summarized_reasoning';
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export namespace SummarizedReasoningContent {
|
|
288
|
-
export interface Summary {
|
|
289
|
-
/**
|
|
290
|
-
* The index of the summary part.
|
|
291
|
-
*/
|
|
292
|
-
index: number;
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* The text of the summary part.
|
|
296
|
-
*/
|
|
297
|
-
text: string;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export interface BatchListParams extends ArrayPageParams {}
|
|
304
|
-
|
|
305
|
-
Batches.Messages = Messages;
|
|
306
|
-
|
|
307
|
-
export declare namespace Batches {
|
|
308
|
-
export {
|
|
309
|
-
type BatchJob as BatchJob,
|
|
310
|
-
type BatchCancelResponse as BatchCancelResponse,
|
|
311
|
-
type BatchJobsArrayPage as BatchJobsArrayPage,
|
|
312
|
-
type BatchCreateParams as BatchCreateParams,
|
|
313
|
-
type BatchListParams as BatchListParams,
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
export { Messages as Messages, type MessageListParams as MessageListParams };
|
|
317
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
Batches,
|
|
5
|
-
type BatchJob,
|
|
6
|
-
type BatchCancelResponse,
|
|
7
|
-
type BatchCreateParams,
|
|
8
|
-
type BatchListParams,
|
|
9
|
-
type BatchJobsArrayPage,
|
|
10
|
-
} from './batches';
|
|
11
|
-
export { Messages, type MessageListParams } from './messages';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as MessagesAPI from '../agents/messages';
|
|
5
|
-
import { InternalMessagesObjectPage } from '../agents/messages';
|
|
6
|
-
import { ObjectPage, type ObjectPageParams, PagePromise } from '../../core/pagination';
|
|
7
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
8
|
-
import { path } from '../../internal/utils/path';
|
|
9
|
-
|
|
10
|
-
export class Messages extends APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Get response messages for a specific batch job.
|
|
13
|
-
*/
|
|
14
|
-
list(
|
|
15
|
-
batchID: string,
|
|
16
|
-
query: MessageListParams | null | undefined = {},
|
|
17
|
-
options?: RequestOptions,
|
|
18
|
-
): PagePromise<InternalMessagesObjectPage, MessagesAPI.InternalMessage> {
|
|
19
|
-
return this._client.getAPIList(
|
|
20
|
-
path`/v1/messages/batches/${batchID}/messages`,
|
|
21
|
-
ObjectPage<MessagesAPI.InternalMessage>,
|
|
22
|
-
{ query, ...options },
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface MessageListParams extends ObjectPageParams {
|
|
28
|
-
/**
|
|
29
|
-
* Filter messages by agent ID
|
|
30
|
-
*/
|
|
31
|
-
agent_id?: string | null;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export declare namespace Messages {
|
|
35
|
-
export { type MessageListParams as MessageListParams };
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { type InternalMessagesObjectPage };
|
package/src/resources/batches.ts
DELETED
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as MessagesAPI from './messages';
|
|
5
|
-
import {
|
|
6
|
-
MessageCreateParams,
|
|
7
|
-
MessageListParams,
|
|
8
|
-
MessageResetResponse,
|
|
9
|
-
MessageStreamParams,
|
|
10
|
-
MessageStreamResponse,
|
|
11
|
-
MessageUpdateParams,
|
|
12
|
-
MessageUpdateResponse,
|
|
13
|
-
Messages,
|
|
14
|
-
} from './messages';
|
|
15
|
-
import { APIPromise } from '../../core/api-promise';
|
|
16
|
-
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
17
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
18
|
-
import { path } from '../../internal/utils/path';
|
|
19
|
-
|
|
20
|
-
export class Groups extends APIResource {
|
|
21
|
-
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Create a new multi-agent group with the specified configuration.
|
|
25
|
-
*/
|
|
26
|
-
create(body: GroupCreateParams, options?: RequestOptions): APIPromise<Group> {
|
|
27
|
-
return this._client.post('/v1/groups/', { body, ...options });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Retrieve the group by id.
|
|
32
|
-
*/
|
|
33
|
-
retrieve(groupID: string, options?: RequestOptions): APIPromise<Group> {
|
|
34
|
-
return this._client.get(path`/v1/groups/${groupID}`, options);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Create a new multi-agent group with the specified configuration.
|
|
39
|
-
*/
|
|
40
|
-
update(groupID: string, body: GroupUpdateParams, options?: RequestOptions): APIPromise<Group> {
|
|
41
|
-
return this._client.patch(path`/v1/groups/${groupID}`, { body, ...options });
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Fetch all multi-agent groups matching query.
|
|
46
|
-
*/
|
|
47
|
-
list(
|
|
48
|
-
query: GroupListParams | null | undefined = {},
|
|
49
|
-
options?: RequestOptions,
|
|
50
|
-
): PagePromise<GroupsArrayPage, Group> {
|
|
51
|
-
return this._client.getAPIList('/v1/groups/', ArrayPage<Group>, { query, ...options });
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Delete a multi-agent group.
|
|
56
|
-
*/
|
|
57
|
-
delete(groupID: string, options?: RequestOptions): APIPromise<unknown> {
|
|
58
|
-
return this._client.delete(path`/v1/groups/${groupID}`, options);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export type GroupsArrayPage = ArrayPage<Group>;
|
|
63
|
-
|
|
64
|
-
export interface DynamicManager {
|
|
65
|
-
manager_agent_id: string;
|
|
66
|
-
|
|
67
|
-
manager_type?: 'dynamic';
|
|
68
|
-
|
|
69
|
-
max_turns?: number | null;
|
|
70
|
-
|
|
71
|
-
termination_token?: string | null;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface Group {
|
|
75
|
-
/**
|
|
76
|
-
* The id of the group. Assigned by the database.
|
|
77
|
-
*/
|
|
78
|
-
id: string;
|
|
79
|
-
|
|
80
|
-
agent_ids: Array<string>;
|
|
81
|
-
|
|
82
|
-
description: string;
|
|
83
|
-
|
|
84
|
-
manager_type: ManagerType;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* The base template id.
|
|
88
|
-
*/
|
|
89
|
-
base_template_id?: string | null;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* The id of the deployment.
|
|
93
|
-
*/
|
|
94
|
-
deployment_id?: string | null;
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* If set to True, the group will be hidden.
|
|
98
|
-
*/
|
|
99
|
-
hidden?: boolean | null;
|
|
100
|
-
|
|
101
|
-
last_processed_message_id?: string | null;
|
|
102
|
-
|
|
103
|
-
manager_agent_id?: string | null;
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* The desired maximum length of messages in the context window of the convo agent.
|
|
107
|
-
* This is a best effort, and may be off slightly due to user/assistant
|
|
108
|
-
* interleaving.
|
|
109
|
-
*/
|
|
110
|
-
max_message_buffer_length?: number | null;
|
|
111
|
-
|
|
112
|
-
max_turns?: number | null;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* The desired minimum length of messages in the context window of the convo agent.
|
|
116
|
-
* This is a best effort, and may be off-by-one due to user/assistant interleaving.
|
|
117
|
-
*/
|
|
118
|
-
min_message_buffer_length?: number | null;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* The associated project id.
|
|
122
|
-
*/
|
|
123
|
-
project_id?: string | null;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* @deprecated
|
|
127
|
-
*/
|
|
128
|
-
shared_block_ids?: Array<string>;
|
|
129
|
-
|
|
130
|
-
sleeptime_agent_frequency?: number | null;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* The id of the template.
|
|
134
|
-
*/
|
|
135
|
-
template_id?: string | null;
|
|
136
|
-
|
|
137
|
-
termination_token?: string | null;
|
|
138
|
-
|
|
139
|
-
turns_counter?: number | null;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export type ManagerType =
|
|
143
|
-
| 'round_robin'
|
|
144
|
-
| 'supervisor'
|
|
145
|
-
| 'dynamic'
|
|
146
|
-
| 'sleeptime'
|
|
147
|
-
| 'voice_sleeptime'
|
|
148
|
-
| 'swarm';
|
|
149
|
-
|
|
150
|
-
export interface RoundRobinManager {
|
|
151
|
-
manager_type?: 'round_robin';
|
|
152
|
-
|
|
153
|
-
max_turns?: number | null;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export interface SleeptimeManager {
|
|
157
|
-
manager_agent_id: string;
|
|
158
|
-
|
|
159
|
-
manager_type?: 'sleeptime';
|
|
160
|
-
|
|
161
|
-
sleeptime_agent_frequency?: number | null;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export interface SupervisorManager {
|
|
165
|
-
manager_agent_id: string;
|
|
166
|
-
|
|
167
|
-
manager_type?: 'supervisor';
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export interface VoiceSleeptimeManager {
|
|
171
|
-
manager_agent_id: string;
|
|
172
|
-
|
|
173
|
-
manager_type?: 'voice_sleeptime';
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* The desired maximum length of messages in the context window of the convo agent.
|
|
177
|
-
* This is a best effort, and may be off slightly due to user/assistant
|
|
178
|
-
* interleaving.
|
|
179
|
-
*/
|
|
180
|
-
max_message_buffer_length?: number | null;
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* The desired minimum length of messages in the context window of the convo agent.
|
|
184
|
-
* This is a best effort, and may be off-by-one due to user/assistant interleaving.
|
|
185
|
-
*/
|
|
186
|
-
min_message_buffer_length?: number | null;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export type GroupDeleteResponse = unknown;
|
|
190
|
-
|
|
191
|
-
export interface GroupCreateParams {
|
|
192
|
-
agent_ids: Array<string>;
|
|
193
|
-
|
|
194
|
-
description: string;
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* If set to True, the group will be hidden.
|
|
198
|
-
*/
|
|
199
|
-
hidden?: boolean | null;
|
|
200
|
-
|
|
201
|
-
manager_config?:
|
|
202
|
-
| RoundRobinManager
|
|
203
|
-
| SupervisorManager
|
|
204
|
-
| DynamicManager
|
|
205
|
-
| SleeptimeManager
|
|
206
|
-
| VoiceSleeptimeManager;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* The associated project id.
|
|
210
|
-
*/
|
|
211
|
-
project_id?: string | null;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* @deprecated
|
|
215
|
-
*/
|
|
216
|
-
shared_block_ids?: Array<string>;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export interface GroupUpdateParams {
|
|
220
|
-
agent_ids?: Array<string> | null;
|
|
221
|
-
|
|
222
|
-
description?: string | null;
|
|
223
|
-
|
|
224
|
-
manager_config?:
|
|
225
|
-
| GroupUpdateParams.RoundRobinManagerUpdate
|
|
226
|
-
| GroupUpdateParams.SupervisorManagerUpdate
|
|
227
|
-
| GroupUpdateParams.DynamicManagerUpdate
|
|
228
|
-
| GroupUpdateParams.SleeptimeManagerUpdate
|
|
229
|
-
| GroupUpdateParams.VoiceSleeptimeManagerUpdate
|
|
230
|
-
| null;
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* The associated project id.
|
|
234
|
-
*/
|
|
235
|
-
project_id?: string | null;
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* @deprecated
|
|
239
|
-
*/
|
|
240
|
-
shared_block_ids?: Array<string> | null;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export namespace GroupUpdateParams {
|
|
244
|
-
export interface RoundRobinManagerUpdate {
|
|
245
|
-
manager_type?: 'round_robin';
|
|
246
|
-
|
|
247
|
-
max_turns?: number | null;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export interface SupervisorManagerUpdate {
|
|
251
|
-
manager_agent_id: string | null;
|
|
252
|
-
|
|
253
|
-
manager_type?: 'supervisor';
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export interface DynamicManagerUpdate {
|
|
257
|
-
manager_agent_id?: string | null;
|
|
258
|
-
|
|
259
|
-
manager_type?: 'dynamic';
|
|
260
|
-
|
|
261
|
-
max_turns?: number | null;
|
|
262
|
-
|
|
263
|
-
termination_token?: string | null;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export interface SleeptimeManagerUpdate {
|
|
267
|
-
manager_agent_id?: string | null;
|
|
268
|
-
|
|
269
|
-
manager_type?: 'sleeptime';
|
|
270
|
-
|
|
271
|
-
sleeptime_agent_frequency?: number | null;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
export interface VoiceSleeptimeManagerUpdate {
|
|
275
|
-
manager_agent_id?: string | null;
|
|
276
|
-
|
|
277
|
-
manager_type?: 'voice_sleeptime';
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* The desired maximum length of messages in the context window of the convo agent.
|
|
281
|
-
* This is a best effort, and may be off slightly due to user/assistant
|
|
282
|
-
* interleaving.
|
|
283
|
-
*/
|
|
284
|
-
max_message_buffer_length?: number | null;
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* The desired minimum length of messages in the context window of the convo agent.
|
|
288
|
-
* This is a best effort, and may be off-by-one due to user/assistant interleaving.
|
|
289
|
-
*/
|
|
290
|
-
min_message_buffer_length?: number | null;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
export interface GroupListParams extends ArrayPageParams {
|
|
295
|
-
/**
|
|
296
|
-
* Search groups by manager type
|
|
297
|
-
*/
|
|
298
|
-
manager_type?: ManagerType | null;
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Search groups by project id
|
|
302
|
-
*/
|
|
303
|
-
project_id?: string | null;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
Groups.Messages = Messages;
|
|
307
|
-
|
|
308
|
-
export declare namespace Groups {
|
|
309
|
-
export {
|
|
310
|
-
type DynamicManager as DynamicManager,
|
|
311
|
-
type Group as Group,
|
|
312
|
-
type ManagerType as ManagerType,
|
|
313
|
-
type RoundRobinManager as RoundRobinManager,
|
|
314
|
-
type SleeptimeManager as SleeptimeManager,
|
|
315
|
-
type SupervisorManager as SupervisorManager,
|
|
316
|
-
type VoiceSleeptimeManager as VoiceSleeptimeManager,
|
|
317
|
-
type GroupDeleteResponse as GroupDeleteResponse,
|
|
318
|
-
type GroupsArrayPage as GroupsArrayPage,
|
|
319
|
-
type GroupCreateParams as GroupCreateParams,
|
|
320
|
-
type GroupUpdateParams as GroupUpdateParams,
|
|
321
|
-
type GroupListParams as GroupListParams,
|
|
322
|
-
};
|
|
323
|
-
|
|
324
|
-
export {
|
|
325
|
-
Messages as Messages,
|
|
326
|
-
type MessageUpdateResponse as MessageUpdateResponse,
|
|
327
|
-
type MessageResetResponse as MessageResetResponse,
|
|
328
|
-
type MessageStreamResponse as MessageStreamResponse,
|
|
329
|
-
type MessageCreateParams as MessageCreateParams,
|
|
330
|
-
type MessageUpdateParams as MessageUpdateParams,
|
|
331
|
-
type MessageListParams as MessageListParams,
|
|
332
|
-
type MessageStreamParams as MessageStreamParams,
|
|
333
|
-
};
|
|
334
|
-
}
|