@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,240 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as AgentsAPI from "../agents/agents.mjs";
|
|
3
|
-
import * as MessagesAPI from "../agents/messages.mjs";
|
|
4
|
-
import * as BatchesMessagesAPI from "./messages.mjs";
|
|
5
|
-
import { MessageListParams, Messages } from "./messages.mjs";
|
|
6
|
-
import * as RunsAPI from "../runs/runs.mjs";
|
|
7
|
-
import { APIPromise } from "../../core/api-promise.mjs";
|
|
8
|
-
import { ArrayPage, type ArrayPageParams, PagePromise } from "../../core/pagination.mjs";
|
|
9
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
10
|
-
export declare class Batches extends APIResource {
|
|
11
|
-
messages: BatchesMessagesAPI.Messages;
|
|
12
|
-
/**
|
|
13
|
-
* Submit a batch of agent runs for asynchronous processing.
|
|
14
|
-
*
|
|
15
|
-
* Creates a job that will fan out messages to all listed agents and process them
|
|
16
|
-
* in parallel. The request will be rejected if it exceeds 256MB.
|
|
17
|
-
*/
|
|
18
|
-
create(body: BatchCreateParams, options?: RequestOptions): APIPromise<BatchJob>;
|
|
19
|
-
/**
|
|
20
|
-
* Retrieve the status and details of a batch run.
|
|
21
|
-
*/
|
|
22
|
-
retrieve(batchID: string, options?: RequestOptions): APIPromise<BatchJob>;
|
|
23
|
-
/**
|
|
24
|
-
* List all batch runs.
|
|
25
|
-
*/
|
|
26
|
-
list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise<BatchJobsArrayPage, BatchJob>;
|
|
27
|
-
/**
|
|
28
|
-
* Cancel a batch run.
|
|
29
|
-
*/
|
|
30
|
-
cancel(batchID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
31
|
-
}
|
|
32
|
-
export type BatchJobsArrayPage = ArrayPage<BatchJob>;
|
|
33
|
-
export interface BatchJob {
|
|
34
|
-
/**
|
|
35
|
-
* The human-friendly ID of the Job
|
|
36
|
-
*/
|
|
37
|
-
id: string;
|
|
38
|
-
/**
|
|
39
|
-
* The agent associated with this job/run.
|
|
40
|
-
*/
|
|
41
|
-
agent_id?: string | null;
|
|
42
|
-
/**
|
|
43
|
-
* Whether the job was created in background mode.
|
|
44
|
-
*/
|
|
45
|
-
background?: boolean | null;
|
|
46
|
-
/**
|
|
47
|
-
* Optional error message from attempting to POST the callback endpoint.
|
|
48
|
-
*/
|
|
49
|
-
callback_error?: string | null;
|
|
50
|
-
/**
|
|
51
|
-
* Timestamp when the callback was last attempted.
|
|
52
|
-
*/
|
|
53
|
-
callback_sent_at?: string | null;
|
|
54
|
-
/**
|
|
55
|
-
* HTTP status code returned by the callback endpoint.
|
|
56
|
-
*/
|
|
57
|
-
callback_status_code?: number | null;
|
|
58
|
-
/**
|
|
59
|
-
* If set, POST to this URL when the job completes.
|
|
60
|
-
*/
|
|
61
|
-
callback_url?: string | null;
|
|
62
|
-
/**
|
|
63
|
-
* The unix timestamp of when the job was completed.
|
|
64
|
-
*/
|
|
65
|
-
completed_at?: string | null;
|
|
66
|
-
/**
|
|
67
|
-
* The unix timestamp of when the job was created.
|
|
68
|
-
*/
|
|
69
|
-
created_at?: string;
|
|
70
|
-
/**
|
|
71
|
-
* The id of the user that made this object.
|
|
72
|
-
*/
|
|
73
|
-
created_by_id?: string | null;
|
|
74
|
-
job_type?: MessagesAPI.JobType;
|
|
75
|
-
/**
|
|
76
|
-
* The id of the user that made this object.
|
|
77
|
-
*/
|
|
78
|
-
last_updated_by_id?: string | null;
|
|
79
|
-
/**
|
|
80
|
-
* The metadata of the job.
|
|
81
|
-
*/
|
|
82
|
-
metadata?: {
|
|
83
|
-
[key: string]: unknown;
|
|
84
|
-
} | null;
|
|
85
|
-
/**
|
|
86
|
-
* The status of the job.
|
|
87
|
-
*/
|
|
88
|
-
status?: MessagesAPI.JobStatus;
|
|
89
|
-
/**
|
|
90
|
-
* The reason why the job was stopped.
|
|
91
|
-
*/
|
|
92
|
-
stop_reason?: RunsAPI.StopReasonType | null;
|
|
93
|
-
/**
|
|
94
|
-
* Total run duration in nanoseconds
|
|
95
|
-
*/
|
|
96
|
-
total_duration_ns?: number | null;
|
|
97
|
-
/**
|
|
98
|
-
* Time to first token for a run in nanoseconds
|
|
99
|
-
*/
|
|
100
|
-
ttft_ns?: number | null;
|
|
101
|
-
/**
|
|
102
|
-
* The timestamp when the object was last updated.
|
|
103
|
-
*/
|
|
104
|
-
updated_at?: string | null;
|
|
105
|
-
}
|
|
106
|
-
export type BatchCancelResponse = unknown;
|
|
107
|
-
export interface BatchCreateParams {
|
|
108
|
-
/**
|
|
109
|
-
* List of requests to be processed in batch.
|
|
110
|
-
*/
|
|
111
|
-
requests: Array<BatchCreateParams.Request>;
|
|
112
|
-
/**
|
|
113
|
-
* Optional URL to call via POST when the batch completes. The callback payload
|
|
114
|
-
* will be a JSON object with the following fields: {'job_id': string, 'status':
|
|
115
|
-
* string, 'completed_at': string}. Where 'job_id' is the unique batch job
|
|
116
|
-
* identifier, 'status' is the final batch status (e.g., 'completed', 'failed'),
|
|
117
|
-
* and 'completed_at' is an ISO 8601 timestamp indicating when the batch job
|
|
118
|
-
* completed.
|
|
119
|
-
*/
|
|
120
|
-
callback_url?: string | null;
|
|
121
|
-
}
|
|
122
|
-
export declare namespace BatchCreateParams {
|
|
123
|
-
interface Request {
|
|
124
|
-
/**
|
|
125
|
-
* The ID of the agent to send this batch request for
|
|
126
|
-
*/
|
|
127
|
-
agent_id: string;
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated The name of the message argument in the designated message tool.
|
|
130
|
-
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
131
|
-
* onward.
|
|
132
|
-
*/
|
|
133
|
-
assistant_message_tool_kwarg?: string;
|
|
134
|
-
/**
|
|
135
|
-
* @deprecated The name of the designated message tool. Still supported for legacy
|
|
136
|
-
* agent types, but deprecated for letta_v1_agent onward.
|
|
137
|
-
*/
|
|
138
|
-
assistant_message_tool_name?: string;
|
|
139
|
-
/**
|
|
140
|
-
* Client-side tools that the agent can call. When the agent calls a client-side
|
|
141
|
-
* tool, execution pauses and returns control to the client to execute the tool and
|
|
142
|
-
* provide the result via a ToolReturn.
|
|
143
|
-
*/
|
|
144
|
-
client_tools?: Array<Request.ClientTool> | null;
|
|
145
|
-
/**
|
|
146
|
-
* @deprecated If set to True, enables reasoning before responses or tool calls
|
|
147
|
-
* from the agent.
|
|
148
|
-
*/
|
|
149
|
-
enable_thinking?: string;
|
|
150
|
-
/**
|
|
151
|
-
* Only return specified message types in the response. If `None` (default) returns
|
|
152
|
-
* all messages.
|
|
153
|
-
*/
|
|
154
|
-
include_return_message_types?: Array<MessagesAPI.MessageType> | null;
|
|
155
|
-
/**
|
|
156
|
-
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
157
|
-
* 'user', 'content': input}].
|
|
158
|
-
*/
|
|
159
|
-
input?: string | Array<MessagesAPI.TextContent | MessagesAPI.ImageContent | MessagesAPI.ToolCallContent | MessagesAPI.ToolReturnContent | MessagesAPI.ReasoningContent | MessagesAPI.RedactedReasoningContent | MessagesAPI.OmittedReasoningContent | Request.SummarizedReasoningContent> | null;
|
|
160
|
-
/**
|
|
161
|
-
* Maximum number of steps the agent should take to process the request.
|
|
162
|
-
*/
|
|
163
|
-
max_steps?: number;
|
|
164
|
-
/**
|
|
165
|
-
* The messages to be sent to the agent.
|
|
166
|
-
*/
|
|
167
|
-
messages?: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate> | null;
|
|
168
|
-
/**
|
|
169
|
-
* @deprecated Whether the server should parse specific tool call arguments
|
|
170
|
-
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
171
|
-
* legacy agent types, but deprecated for letta_v1_agent onward.
|
|
172
|
-
*/
|
|
173
|
-
use_assistant_message?: boolean;
|
|
174
|
-
}
|
|
175
|
-
namespace Request {
|
|
176
|
-
/**
|
|
177
|
-
* Schema for a client-side tool passed in the request.
|
|
178
|
-
*
|
|
179
|
-
* Client-side tools are executed by the client, not the server. When the agent
|
|
180
|
-
* calls a client-side tool, execution pauses and returns control to the client to
|
|
181
|
-
* execute the tool and provide the result.
|
|
182
|
-
*/
|
|
183
|
-
interface ClientTool {
|
|
184
|
-
/**
|
|
185
|
-
* The name of the tool function
|
|
186
|
-
*/
|
|
187
|
-
name: string;
|
|
188
|
-
/**
|
|
189
|
-
* Description of what the tool does
|
|
190
|
-
*/
|
|
191
|
-
description?: string | null;
|
|
192
|
-
/**
|
|
193
|
-
* JSON Schema for the function parameters
|
|
194
|
-
*/
|
|
195
|
-
parameters?: {
|
|
196
|
-
[key: string]: unknown;
|
|
197
|
-
} | null;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* The style of reasoning content returned by the OpenAI Responses API
|
|
201
|
-
*/
|
|
202
|
-
interface SummarizedReasoningContent {
|
|
203
|
-
/**
|
|
204
|
-
* The unique identifier for this reasoning step.
|
|
205
|
-
*/
|
|
206
|
-
id: string;
|
|
207
|
-
/**
|
|
208
|
-
* Summaries of the reasoning content.
|
|
209
|
-
*/
|
|
210
|
-
summary: Array<SummarizedReasoningContent.Summary>;
|
|
211
|
-
/**
|
|
212
|
-
* The encrypted reasoning content.
|
|
213
|
-
*/
|
|
214
|
-
encrypted_content?: string;
|
|
215
|
-
/**
|
|
216
|
-
* Indicates this is a summarized reasoning step.
|
|
217
|
-
*/
|
|
218
|
-
type?: 'summarized_reasoning';
|
|
219
|
-
}
|
|
220
|
-
namespace SummarizedReasoningContent {
|
|
221
|
-
interface Summary {
|
|
222
|
-
/**
|
|
223
|
-
* The index of the summary part.
|
|
224
|
-
*/
|
|
225
|
-
index: number;
|
|
226
|
-
/**
|
|
227
|
-
* The text of the summary part.
|
|
228
|
-
*/
|
|
229
|
-
text: string;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
export interface BatchListParams extends ArrayPageParams {
|
|
235
|
-
}
|
|
236
|
-
export declare namespace Batches {
|
|
237
|
-
export { type BatchJob as BatchJob, type BatchCancelResponse as BatchCancelResponse, type BatchJobsArrayPage as BatchJobsArrayPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, };
|
|
238
|
-
export { Messages as Messages, type MessageListParams as MessageListParams };
|
|
239
|
-
}
|
|
240
|
-
//# sourceMappingURL=batches.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batches.d.mts","sourceRoot":"","sources":["../../src/resources/batches/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,KAAK,WAAW;OAChB,KA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,CAAC;YAC1C,UAAiB,OAAO;gBACtB;;mBAEG;gBACH,KAAK,EAAE,MAAM,CAAC;gBAEd;;mBAEG;gBACH,IAAI,EAAE,MAAM,CAAC;aACd;SACF;KACF;CACF;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;CAAG;AAI3D,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;IAEF,OAAO,EAAE,QAAQ,IAAI,QAAQ,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CAC9E"}
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as AgentsAPI from "../agents/agents.js";
|
|
3
|
-
import * as MessagesAPI from "../agents/messages.js";
|
|
4
|
-
import * as BatchesMessagesAPI from "./messages.js";
|
|
5
|
-
import { MessageListParams, Messages } from "./messages.js";
|
|
6
|
-
import * as RunsAPI from "../runs/runs.js";
|
|
7
|
-
import { APIPromise } from "../../core/api-promise.js";
|
|
8
|
-
import { ArrayPage, type ArrayPageParams, PagePromise } from "../../core/pagination.js";
|
|
9
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
10
|
-
export declare class Batches extends APIResource {
|
|
11
|
-
messages: BatchesMessagesAPI.Messages;
|
|
12
|
-
/**
|
|
13
|
-
* Submit a batch of agent runs for asynchronous processing.
|
|
14
|
-
*
|
|
15
|
-
* Creates a job that will fan out messages to all listed agents and process them
|
|
16
|
-
* in parallel. The request will be rejected if it exceeds 256MB.
|
|
17
|
-
*/
|
|
18
|
-
create(body: BatchCreateParams, options?: RequestOptions): APIPromise<BatchJob>;
|
|
19
|
-
/**
|
|
20
|
-
* Retrieve the status and details of a batch run.
|
|
21
|
-
*/
|
|
22
|
-
retrieve(batchID: string, options?: RequestOptions): APIPromise<BatchJob>;
|
|
23
|
-
/**
|
|
24
|
-
* List all batch runs.
|
|
25
|
-
*/
|
|
26
|
-
list(query?: BatchListParams | null | undefined, options?: RequestOptions): PagePromise<BatchJobsArrayPage, BatchJob>;
|
|
27
|
-
/**
|
|
28
|
-
* Cancel a batch run.
|
|
29
|
-
*/
|
|
30
|
-
cancel(batchID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
31
|
-
}
|
|
32
|
-
export type BatchJobsArrayPage = ArrayPage<BatchJob>;
|
|
33
|
-
export interface BatchJob {
|
|
34
|
-
/**
|
|
35
|
-
* The human-friendly ID of the Job
|
|
36
|
-
*/
|
|
37
|
-
id: string;
|
|
38
|
-
/**
|
|
39
|
-
* The agent associated with this job/run.
|
|
40
|
-
*/
|
|
41
|
-
agent_id?: string | null;
|
|
42
|
-
/**
|
|
43
|
-
* Whether the job was created in background mode.
|
|
44
|
-
*/
|
|
45
|
-
background?: boolean | null;
|
|
46
|
-
/**
|
|
47
|
-
* Optional error message from attempting to POST the callback endpoint.
|
|
48
|
-
*/
|
|
49
|
-
callback_error?: string | null;
|
|
50
|
-
/**
|
|
51
|
-
* Timestamp when the callback was last attempted.
|
|
52
|
-
*/
|
|
53
|
-
callback_sent_at?: string | null;
|
|
54
|
-
/**
|
|
55
|
-
* HTTP status code returned by the callback endpoint.
|
|
56
|
-
*/
|
|
57
|
-
callback_status_code?: number | null;
|
|
58
|
-
/**
|
|
59
|
-
* If set, POST to this URL when the job completes.
|
|
60
|
-
*/
|
|
61
|
-
callback_url?: string | null;
|
|
62
|
-
/**
|
|
63
|
-
* The unix timestamp of when the job was completed.
|
|
64
|
-
*/
|
|
65
|
-
completed_at?: string | null;
|
|
66
|
-
/**
|
|
67
|
-
* The unix timestamp of when the job was created.
|
|
68
|
-
*/
|
|
69
|
-
created_at?: string;
|
|
70
|
-
/**
|
|
71
|
-
* The id of the user that made this object.
|
|
72
|
-
*/
|
|
73
|
-
created_by_id?: string | null;
|
|
74
|
-
job_type?: MessagesAPI.JobType;
|
|
75
|
-
/**
|
|
76
|
-
* The id of the user that made this object.
|
|
77
|
-
*/
|
|
78
|
-
last_updated_by_id?: string | null;
|
|
79
|
-
/**
|
|
80
|
-
* The metadata of the job.
|
|
81
|
-
*/
|
|
82
|
-
metadata?: {
|
|
83
|
-
[key: string]: unknown;
|
|
84
|
-
} | null;
|
|
85
|
-
/**
|
|
86
|
-
* The status of the job.
|
|
87
|
-
*/
|
|
88
|
-
status?: MessagesAPI.JobStatus;
|
|
89
|
-
/**
|
|
90
|
-
* The reason why the job was stopped.
|
|
91
|
-
*/
|
|
92
|
-
stop_reason?: RunsAPI.StopReasonType | null;
|
|
93
|
-
/**
|
|
94
|
-
* Total run duration in nanoseconds
|
|
95
|
-
*/
|
|
96
|
-
total_duration_ns?: number | null;
|
|
97
|
-
/**
|
|
98
|
-
* Time to first token for a run in nanoseconds
|
|
99
|
-
*/
|
|
100
|
-
ttft_ns?: number | null;
|
|
101
|
-
/**
|
|
102
|
-
* The timestamp when the object was last updated.
|
|
103
|
-
*/
|
|
104
|
-
updated_at?: string | null;
|
|
105
|
-
}
|
|
106
|
-
export type BatchCancelResponse = unknown;
|
|
107
|
-
export interface BatchCreateParams {
|
|
108
|
-
/**
|
|
109
|
-
* List of requests to be processed in batch.
|
|
110
|
-
*/
|
|
111
|
-
requests: Array<BatchCreateParams.Request>;
|
|
112
|
-
/**
|
|
113
|
-
* Optional URL to call via POST when the batch completes. The callback payload
|
|
114
|
-
* will be a JSON object with the following fields: {'job_id': string, 'status':
|
|
115
|
-
* string, 'completed_at': string}. Where 'job_id' is the unique batch job
|
|
116
|
-
* identifier, 'status' is the final batch status (e.g., 'completed', 'failed'),
|
|
117
|
-
* and 'completed_at' is an ISO 8601 timestamp indicating when the batch job
|
|
118
|
-
* completed.
|
|
119
|
-
*/
|
|
120
|
-
callback_url?: string | null;
|
|
121
|
-
}
|
|
122
|
-
export declare namespace BatchCreateParams {
|
|
123
|
-
interface Request {
|
|
124
|
-
/**
|
|
125
|
-
* The ID of the agent to send this batch request for
|
|
126
|
-
*/
|
|
127
|
-
agent_id: string;
|
|
128
|
-
/**
|
|
129
|
-
* @deprecated The name of the message argument in the designated message tool.
|
|
130
|
-
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
131
|
-
* onward.
|
|
132
|
-
*/
|
|
133
|
-
assistant_message_tool_kwarg?: string;
|
|
134
|
-
/**
|
|
135
|
-
* @deprecated The name of the designated message tool. Still supported for legacy
|
|
136
|
-
* agent types, but deprecated for letta_v1_agent onward.
|
|
137
|
-
*/
|
|
138
|
-
assistant_message_tool_name?: string;
|
|
139
|
-
/**
|
|
140
|
-
* Client-side tools that the agent can call. When the agent calls a client-side
|
|
141
|
-
* tool, execution pauses and returns control to the client to execute the tool and
|
|
142
|
-
* provide the result via a ToolReturn.
|
|
143
|
-
*/
|
|
144
|
-
client_tools?: Array<Request.ClientTool> | null;
|
|
145
|
-
/**
|
|
146
|
-
* @deprecated If set to True, enables reasoning before responses or tool calls
|
|
147
|
-
* from the agent.
|
|
148
|
-
*/
|
|
149
|
-
enable_thinking?: string;
|
|
150
|
-
/**
|
|
151
|
-
* Only return specified message types in the response. If `None` (default) returns
|
|
152
|
-
* all messages.
|
|
153
|
-
*/
|
|
154
|
-
include_return_message_types?: Array<MessagesAPI.MessageType> | null;
|
|
155
|
-
/**
|
|
156
|
-
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
157
|
-
* 'user', 'content': input}].
|
|
158
|
-
*/
|
|
159
|
-
input?: string | Array<MessagesAPI.TextContent | MessagesAPI.ImageContent | MessagesAPI.ToolCallContent | MessagesAPI.ToolReturnContent | MessagesAPI.ReasoningContent | MessagesAPI.RedactedReasoningContent | MessagesAPI.OmittedReasoningContent | Request.SummarizedReasoningContent> | null;
|
|
160
|
-
/**
|
|
161
|
-
* Maximum number of steps the agent should take to process the request.
|
|
162
|
-
*/
|
|
163
|
-
max_steps?: number;
|
|
164
|
-
/**
|
|
165
|
-
* The messages to be sent to the agent.
|
|
166
|
-
*/
|
|
167
|
-
messages?: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate> | null;
|
|
168
|
-
/**
|
|
169
|
-
* @deprecated Whether the server should parse specific tool call arguments
|
|
170
|
-
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
171
|
-
* legacy agent types, but deprecated for letta_v1_agent onward.
|
|
172
|
-
*/
|
|
173
|
-
use_assistant_message?: boolean;
|
|
174
|
-
}
|
|
175
|
-
namespace Request {
|
|
176
|
-
/**
|
|
177
|
-
* Schema for a client-side tool passed in the request.
|
|
178
|
-
*
|
|
179
|
-
* Client-side tools are executed by the client, not the server. When the agent
|
|
180
|
-
* calls a client-side tool, execution pauses and returns control to the client to
|
|
181
|
-
* execute the tool and provide the result.
|
|
182
|
-
*/
|
|
183
|
-
interface ClientTool {
|
|
184
|
-
/**
|
|
185
|
-
* The name of the tool function
|
|
186
|
-
*/
|
|
187
|
-
name: string;
|
|
188
|
-
/**
|
|
189
|
-
* Description of what the tool does
|
|
190
|
-
*/
|
|
191
|
-
description?: string | null;
|
|
192
|
-
/**
|
|
193
|
-
* JSON Schema for the function parameters
|
|
194
|
-
*/
|
|
195
|
-
parameters?: {
|
|
196
|
-
[key: string]: unknown;
|
|
197
|
-
} | null;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* The style of reasoning content returned by the OpenAI Responses API
|
|
201
|
-
*/
|
|
202
|
-
interface SummarizedReasoningContent {
|
|
203
|
-
/**
|
|
204
|
-
* The unique identifier for this reasoning step.
|
|
205
|
-
*/
|
|
206
|
-
id: string;
|
|
207
|
-
/**
|
|
208
|
-
* Summaries of the reasoning content.
|
|
209
|
-
*/
|
|
210
|
-
summary: Array<SummarizedReasoningContent.Summary>;
|
|
211
|
-
/**
|
|
212
|
-
* The encrypted reasoning content.
|
|
213
|
-
*/
|
|
214
|
-
encrypted_content?: string;
|
|
215
|
-
/**
|
|
216
|
-
* Indicates this is a summarized reasoning step.
|
|
217
|
-
*/
|
|
218
|
-
type?: 'summarized_reasoning';
|
|
219
|
-
}
|
|
220
|
-
namespace SummarizedReasoningContent {
|
|
221
|
-
interface Summary {
|
|
222
|
-
/**
|
|
223
|
-
* The index of the summary part.
|
|
224
|
-
*/
|
|
225
|
-
index: number;
|
|
226
|
-
/**
|
|
227
|
-
* The text of the summary part.
|
|
228
|
-
*/
|
|
229
|
-
text: string;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
export interface BatchListParams extends ArrayPageParams {
|
|
235
|
-
}
|
|
236
|
-
export declare namespace Batches {
|
|
237
|
-
export { type BatchJob as BatchJob, type BatchCancelResponse as BatchCancelResponse, type BatchJobsArrayPage as BatchJobsArrayPage, type BatchCreateParams as BatchCreateParams, type BatchListParams as BatchListParams, };
|
|
238
|
-
export { Messages as Messages, type MessageListParams as MessageListParams };
|
|
239
|
-
}
|
|
240
|
-
//# sourceMappingURL=batches.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batches.d.ts","sourceRoot":"","sources":["../../src/resources/batches/batches.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,KAAK,WAAW;OAChB,KAAK,kBAAkB;OACvB,EAAE,iBAAiB,EAAE,QAAQ,EAAE;OAC/B,KAAK,OAAO;OACZ,EAAE,UAAU,EAAE;OACd,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,WAAW,EAAE;OAChD,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,QAAQ,EAAE,kBAAkB,CAAC,QAAQ,CAAiD;IAEtF;;;;;OAKG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;IAI/E;;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3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;IAEF,OAAO,EAAE,QAAQ,IAAI,QAAQ,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CAC9E"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Batches = void 0;
|
|
5
|
-
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
-
const resource_1 = require("../../core/resource.js");
|
|
7
|
-
const BatchesMessagesAPI = tslib_1.__importStar(require("./messages.js"));
|
|
8
|
-
const messages_1 = require("./messages.js");
|
|
9
|
-
const pagination_1 = require("../../core/pagination.js");
|
|
10
|
-
const path_1 = require("../../internal/utils/path.js");
|
|
11
|
-
class Batches extends resource_1.APIResource {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.messages = new BatchesMessagesAPI.Messages(this._client);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Submit a batch of agent runs for asynchronous processing.
|
|
18
|
-
*
|
|
19
|
-
* Creates a job that will fan out messages to all listed agents and process them
|
|
20
|
-
* in parallel. The request will be rejected if it exceeds 256MB.
|
|
21
|
-
*/
|
|
22
|
-
create(body, options) {
|
|
23
|
-
return this._client.post('/v1/messages/batches', { body, ...options });
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Retrieve the status and details of a batch run.
|
|
27
|
-
*/
|
|
28
|
-
retrieve(batchID, options) {
|
|
29
|
-
return this._client.get((0, path_1.path) `/v1/messages/batches/${batchID}`, options);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* List all batch runs.
|
|
33
|
-
*/
|
|
34
|
-
list(query = {}, options) {
|
|
35
|
-
return this._client.getAPIList('/v1/messages/batches', (pagination_1.ArrayPage), { query, ...options });
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Cancel a batch run.
|
|
39
|
-
*/
|
|
40
|
-
cancel(batchID, options) {
|
|
41
|
-
return this._client.patch((0, path_1.path) `/v1/messages/batches/${batchID}/cancel`, options);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.Batches = Batches;
|
|
45
|
-
Batches.Messages = messages_1.Messages;
|
|
46
|
-
//# sourceMappingURL=batches.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batches.js","sourceRoot":"","sources":["../../src/resources/batches/batches.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAGlD,0EAAiD;AACjD,4CAAyD;AAGzD,yDAAqF;AAErF,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,aAAQ,GAAgC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmCxF,CAAC;IAjCC;;;;;OAKG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,sBAAmB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAe,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,wBAAwB,OAAO,SAAS,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CACF;AApCD,0BAoCC;AA+PD,OAAO,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
-
import * as BatchesMessagesAPI from "./messages.mjs";
|
|
4
|
-
import { Messages } from "./messages.mjs";
|
|
5
|
-
import { ArrayPage } from "../../core/pagination.mjs";
|
|
6
|
-
import { path } from "../../internal/utils/path.mjs";
|
|
7
|
-
export class Batches extends APIResource {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(...arguments);
|
|
10
|
-
this.messages = new BatchesMessagesAPI.Messages(this._client);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Submit a batch of agent runs for asynchronous processing.
|
|
14
|
-
*
|
|
15
|
-
* Creates a job that will fan out messages to all listed agents and process them
|
|
16
|
-
* in parallel. The request will be rejected if it exceeds 256MB.
|
|
17
|
-
*/
|
|
18
|
-
create(body, options) {
|
|
19
|
-
return this._client.post('/v1/messages/batches', { body, ...options });
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Retrieve the status and details of a batch run.
|
|
23
|
-
*/
|
|
24
|
-
retrieve(batchID, options) {
|
|
25
|
-
return this._client.get(path `/v1/messages/batches/${batchID}`, options);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* List all batch runs.
|
|
29
|
-
*/
|
|
30
|
-
list(query = {}, options) {
|
|
31
|
-
return this._client.getAPIList('/v1/messages/batches', (ArrayPage), { query, ...options });
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Cancel a batch run.
|
|
35
|
-
*/
|
|
36
|
-
cancel(batchID, options) {
|
|
37
|
-
return this._client.patch(path `/v1/messages/batches/${batchID}/cancel`, options);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
Batches.Messages = Messages;
|
|
41
|
-
//# sourceMappingURL=batches.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batches.mjs","sourceRoot":"","sources":["../../src/resources/batches/batches.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,KAAK,kBAAkB;OACvB,EAAqB,QAAQ,EAAE;OAG/B,EAAE,SAAS,EAAqC;OAEhD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,aAAQ,GAAgC,IAAI,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmCxF,CAAC;IAjCC;;;;;OAKG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,OAAe,EAAE,OAAwB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA4C,EAAE,EAC9C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAA,SAAmB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,OAAe,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,wBAAwB,OAAO,SAAS,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CACF;AA+PD,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/batches/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/batches/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB;OACM,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Messages = exports.Batches = void 0;
|
|
5
|
-
var batches_1 = require("./batches.js");
|
|
6
|
-
Object.defineProperty(exports, "Batches", { enumerable: true, get: function () { return batches_1.Batches; } });
|
|
7
|
-
var messages_1 = require("./messages.js");
|
|
8
|
-
Object.defineProperty(exports, "Messages", { enumerable: true, get: function () { return messages_1.Messages; } });
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/batches/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,0CAA8D;AAArD,oGAAA,QAAQ,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/batches/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAMR;OACM,EAAE,QAAQ,EAA0B"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as MessagesAPI from "../agents/messages.mjs";
|
|
3
|
-
import { InternalMessagesObjectPage } from "../agents/messages.mjs";
|
|
4
|
-
import { type ObjectPageParams, PagePromise } from "../../core/pagination.mjs";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
-
export declare class Messages extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Get response messages for a specific batch job.
|
|
9
|
-
*/
|
|
10
|
-
list(batchID: string, query?: MessageListParams | null | undefined, options?: RequestOptions): PagePromise<InternalMessagesObjectPage, MessagesAPI.InternalMessage>;
|
|
11
|
-
}
|
|
12
|
-
export interface MessageListParams extends ObjectPageParams {
|
|
13
|
-
/**
|
|
14
|
-
* Filter messages by agent ID
|
|
15
|
-
*/
|
|
16
|
-
agent_id?: string | null;
|
|
17
|
-
}
|
|
18
|
-
export declare namespace Messages {
|
|
19
|
-
export { type MessageListParams as MessageListParams };
|
|
20
|
-
}
|
|
21
|
-
export { type InternalMessagesObjectPage };
|
|
22
|
-
//# sourceMappingURL=messages.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/batches/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,0BAA0B,EAAE;OAC9B,EAAc,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,0BAA0B,EAAE,WAAW,CAAC,eAAe,CAAC;CAOxE;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACxD;AAED,OAAO,EAAE,KAAK,0BAA0B,EAAE,CAAC"}
|