@letta-ai/letta-client 1.7.8 → 1.7.9
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 +36 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.js +10 -3
- package/client.js.map +1 -1
- package/client.mjs +10 -3
- package/client.mjs.map +1 -1
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +48 -42
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +48 -42
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/messages.d.mts +271 -19
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +271 -19
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/conversations/conversations.d.mts +607 -6
- package/resources/conversations/conversations.d.mts.map +1 -1
- package/resources/conversations/conversations.d.ts +607 -6
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js +13 -2
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs +13 -2
- 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 +62 -29
- package/resources/conversations/messages.d.mts.map +1 -1
- package/resources/conversations/messages.d.ts +62 -29
- package/resources/conversations/messages.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.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/models/models.d.mts +40 -6
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +40 -6
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/runs/runs.d.mts +1 -1
- package/resources/runs/runs.d.mts.map +1 -1
- package/resources/runs/runs.d.ts +1 -1
- package/resources/runs/runs.d.ts.map +1 -1
- package/resources/runs/runs.js.map +1 -1
- package/resources/runs/runs.mjs.map +1 -1
- package/resources/templates/index.d.mts +1 -1
- package/resources/templates/index.d.mts.map +1 -1
- package/resources/templates/index.d.ts +1 -1
- package/resources/templates/index.d.ts.map +1 -1
- package/resources/templates/index.js.map +1 -1
- package/resources/templates/index.mjs.map +1 -1
- package/resources/templates/templates.d.mts +77 -1
- package/resources/templates/templates.d.mts.map +1 -1
- package/resources/templates/templates.d.ts +77 -1
- package/resources/templates/templates.d.ts.map +1 -1
- package/resources/templates/templates.js +14 -0
- package/resources/templates/templates.js.map +1 -1
- package/resources/templates/templates.mjs +14 -0
- package/resources/templates/templates.mjs.map +1 -1
- package/src/client.ts +27 -5
- package/src/core/streaming.ts +2 -2
- package/src/resources/agents/agents.ts +53 -45
- package/src/resources/agents/messages.ts +322 -20
- package/src/resources/conversations/conversations.ts +831 -5
- package/src/resources/conversations/index.ts +1 -0
- package/src/resources/conversations/messages.ts +71 -31
- package/src/resources/index.ts +5 -0
- package/src/resources/models/models.ts +46 -6
- package/src/resources/runs/runs.ts +1 -0
- package/src/resources/templates/index.ts +4 -0
- package/src/resources/templates/templates.ts +111 -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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as AgentsAPI from "../agents/agents.mjs";
|
|
2
3
|
import * as MessagesAPI from "./messages.mjs";
|
|
3
4
|
import { CompactionRequest, CompactionResponse, MessageCompactParams, MessageCreateParams, MessageListParams, MessageStreamParams, MessageStreamResponse, Messages } from "./messages.mjs";
|
|
4
5
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
@@ -18,9 +19,18 @@ export declare class Conversations extends APIResource {
|
|
|
18
19
|
*/
|
|
19
20
|
update(conversationID: string, body: ConversationUpdateParams, options?: RequestOptions): APIPromise<Conversation>;
|
|
20
21
|
/**
|
|
21
|
-
* List all conversations for an agent
|
|
22
|
+
* List all conversations for an agent (or all conversations if agent_id not
|
|
23
|
+
* provided).
|
|
22
24
|
*/
|
|
23
|
-
list(query
|
|
25
|
+
list(query?: ConversationListParams | null | undefined, options?: RequestOptions): APIPromise<ConversationListResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Delete a conversation (soft delete).
|
|
28
|
+
*
|
|
29
|
+
* This marks the conversation as deleted but does not permanently remove it from
|
|
30
|
+
* the database. The conversation will no longer appear in list operations. Any
|
|
31
|
+
* isolated blocks associated with the conversation will be permanently deleted.
|
|
32
|
+
*/
|
|
33
|
+
delete(conversationID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
24
34
|
/**
|
|
25
35
|
* Cancel runs associated with a conversation.
|
|
26
36
|
*
|
|
@@ -61,6 +71,15 @@ export interface Conversation {
|
|
|
61
71
|
* The id of the user that made this object.
|
|
62
72
|
*/
|
|
63
73
|
last_updated_by_id?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* The model handle for this conversation (overrides agent's model). Format:
|
|
76
|
+
* provider/model-name.
|
|
77
|
+
*/
|
|
78
|
+
model?: string | null;
|
|
79
|
+
/**
|
|
80
|
+
* The model settings for this conversation (overrides agent's model settings).
|
|
81
|
+
*/
|
|
82
|
+
model_settings?: AgentsAPI.OpenAIModelSettings | AgentsAPI.AnthropicModelSettings | AgentsAPI.GoogleAIModelSettings | AgentsAPI.GoogleVertexModelSettings | AgentsAPI.AzureModelSettings | AgentsAPI.XaiModelSettings | Conversation.ZaiModelSettings | AgentsAPI.GroqModelSettings | AgentsAPI.DeepseekModelSettings | AgentsAPI.TogetherModelSettings | AgentsAPI.BedrockModelSettings | Conversation.OpenRouterModelSettings | Conversation.ChatGptoAuthModelSettings | null;
|
|
64
83
|
/**
|
|
65
84
|
* A summary of the conversation.
|
|
66
85
|
*/
|
|
@@ -70,6 +89,113 @@ export interface Conversation {
|
|
|
70
89
|
*/
|
|
71
90
|
updated_at?: string | null;
|
|
72
91
|
}
|
|
92
|
+
export declare namespace Conversation {
|
|
93
|
+
/**
|
|
94
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
95
|
+
*/
|
|
96
|
+
interface ZaiModelSettings {
|
|
97
|
+
/**
|
|
98
|
+
* The maximum number of tokens the model can generate.
|
|
99
|
+
*/
|
|
100
|
+
max_output_tokens?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Whether to enable parallel tool calling.
|
|
103
|
+
*/
|
|
104
|
+
parallel_tool_calls?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* The type of the provider.
|
|
107
|
+
*/
|
|
108
|
+
provider_type?: 'zai';
|
|
109
|
+
/**
|
|
110
|
+
* The response format for the model.
|
|
111
|
+
*/
|
|
112
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
113
|
+
/**
|
|
114
|
+
* The temperature of the model.
|
|
115
|
+
*/
|
|
116
|
+
temperature?: number;
|
|
117
|
+
/**
|
|
118
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
119
|
+
*/
|
|
120
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
121
|
+
}
|
|
122
|
+
namespace ZaiModelSettings {
|
|
123
|
+
/**
|
|
124
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
125
|
+
*/
|
|
126
|
+
interface Thinking {
|
|
127
|
+
/**
|
|
128
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
129
|
+
*/
|
|
130
|
+
clear_thinking?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Whether thinking is enabled or disabled.
|
|
133
|
+
*/
|
|
134
|
+
type?: 'enabled' | 'disabled';
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
139
|
+
*/
|
|
140
|
+
interface OpenRouterModelSettings {
|
|
141
|
+
/**
|
|
142
|
+
* The maximum number of tokens the model can generate.
|
|
143
|
+
*/
|
|
144
|
+
max_output_tokens?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Whether to enable parallel tool calling.
|
|
147
|
+
*/
|
|
148
|
+
parallel_tool_calls?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* The type of the provider.
|
|
151
|
+
*/
|
|
152
|
+
provider_type?: 'openrouter';
|
|
153
|
+
/**
|
|
154
|
+
* The response format for the model.
|
|
155
|
+
*/
|
|
156
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
157
|
+
/**
|
|
158
|
+
* The temperature of the model.
|
|
159
|
+
*/
|
|
160
|
+
temperature?: number;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
164
|
+
*/
|
|
165
|
+
interface ChatGptoAuthModelSettings {
|
|
166
|
+
/**
|
|
167
|
+
* The maximum number of tokens the model can generate.
|
|
168
|
+
*/
|
|
169
|
+
max_output_tokens?: number;
|
|
170
|
+
/**
|
|
171
|
+
* Whether to enable parallel tool calling.
|
|
172
|
+
*/
|
|
173
|
+
parallel_tool_calls?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* The type of the provider.
|
|
176
|
+
*/
|
|
177
|
+
provider_type?: 'chatgpt_oauth';
|
|
178
|
+
/**
|
|
179
|
+
* The reasoning configuration for the model.
|
|
180
|
+
*/
|
|
181
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
182
|
+
/**
|
|
183
|
+
* The temperature of the model.
|
|
184
|
+
*/
|
|
185
|
+
temperature?: number;
|
|
186
|
+
}
|
|
187
|
+
namespace ChatGptoAuthModelSettings {
|
|
188
|
+
/**
|
|
189
|
+
* The reasoning configuration for the model.
|
|
190
|
+
*/
|
|
191
|
+
interface Reasoning {
|
|
192
|
+
/**
|
|
193
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
194
|
+
*/
|
|
195
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
73
199
|
/**
|
|
74
200
|
* Request model for creating a new conversation.
|
|
75
201
|
*/
|
|
@@ -80,21 +206,254 @@ export interface CreateConversation {
|
|
|
80
206
|
* blocks with these labels.
|
|
81
207
|
*/
|
|
82
208
|
isolated_block_labels?: Array<string> | null;
|
|
209
|
+
/**
|
|
210
|
+
* The model handle for this conversation (overrides agent's model). Format:
|
|
211
|
+
* provider/model-name.
|
|
212
|
+
*/
|
|
213
|
+
model?: string | null;
|
|
214
|
+
/**
|
|
215
|
+
* The model settings for this conversation (overrides agent's model settings).
|
|
216
|
+
*/
|
|
217
|
+
model_settings?: AgentsAPI.OpenAIModelSettings | AgentsAPI.AnthropicModelSettings | AgentsAPI.GoogleAIModelSettings | AgentsAPI.GoogleVertexModelSettings | AgentsAPI.AzureModelSettings | AgentsAPI.XaiModelSettings | CreateConversation.ZaiModelSettings | AgentsAPI.GroqModelSettings | AgentsAPI.DeepseekModelSettings | AgentsAPI.TogetherModelSettings | AgentsAPI.BedrockModelSettings | CreateConversation.OpenRouterModelSettings | CreateConversation.ChatGptoAuthModelSettings | null;
|
|
83
218
|
/**
|
|
84
219
|
* A summary of the conversation.
|
|
85
220
|
*/
|
|
86
221
|
summary?: string | null;
|
|
87
222
|
}
|
|
223
|
+
export declare namespace CreateConversation {
|
|
224
|
+
/**
|
|
225
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
226
|
+
*/
|
|
227
|
+
interface ZaiModelSettings {
|
|
228
|
+
/**
|
|
229
|
+
* The maximum number of tokens the model can generate.
|
|
230
|
+
*/
|
|
231
|
+
max_output_tokens?: number;
|
|
232
|
+
/**
|
|
233
|
+
* Whether to enable parallel tool calling.
|
|
234
|
+
*/
|
|
235
|
+
parallel_tool_calls?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* The type of the provider.
|
|
238
|
+
*/
|
|
239
|
+
provider_type?: 'zai';
|
|
240
|
+
/**
|
|
241
|
+
* The response format for the model.
|
|
242
|
+
*/
|
|
243
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
244
|
+
/**
|
|
245
|
+
* The temperature of the model.
|
|
246
|
+
*/
|
|
247
|
+
temperature?: number;
|
|
248
|
+
/**
|
|
249
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
250
|
+
*/
|
|
251
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
252
|
+
}
|
|
253
|
+
namespace ZaiModelSettings {
|
|
254
|
+
/**
|
|
255
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
256
|
+
*/
|
|
257
|
+
interface Thinking {
|
|
258
|
+
/**
|
|
259
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
260
|
+
*/
|
|
261
|
+
clear_thinking?: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* Whether thinking is enabled or disabled.
|
|
264
|
+
*/
|
|
265
|
+
type?: 'enabled' | 'disabled';
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
270
|
+
*/
|
|
271
|
+
interface OpenRouterModelSettings {
|
|
272
|
+
/**
|
|
273
|
+
* The maximum number of tokens the model can generate.
|
|
274
|
+
*/
|
|
275
|
+
max_output_tokens?: number;
|
|
276
|
+
/**
|
|
277
|
+
* Whether to enable parallel tool calling.
|
|
278
|
+
*/
|
|
279
|
+
parallel_tool_calls?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* The type of the provider.
|
|
282
|
+
*/
|
|
283
|
+
provider_type?: 'openrouter';
|
|
284
|
+
/**
|
|
285
|
+
* The response format for the model.
|
|
286
|
+
*/
|
|
287
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
288
|
+
/**
|
|
289
|
+
* The temperature of the model.
|
|
290
|
+
*/
|
|
291
|
+
temperature?: number;
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
295
|
+
*/
|
|
296
|
+
interface ChatGptoAuthModelSettings {
|
|
297
|
+
/**
|
|
298
|
+
* The maximum number of tokens the model can generate.
|
|
299
|
+
*/
|
|
300
|
+
max_output_tokens?: number;
|
|
301
|
+
/**
|
|
302
|
+
* Whether to enable parallel tool calling.
|
|
303
|
+
*/
|
|
304
|
+
parallel_tool_calls?: boolean;
|
|
305
|
+
/**
|
|
306
|
+
* The type of the provider.
|
|
307
|
+
*/
|
|
308
|
+
provider_type?: 'chatgpt_oauth';
|
|
309
|
+
/**
|
|
310
|
+
* The reasoning configuration for the model.
|
|
311
|
+
*/
|
|
312
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
313
|
+
/**
|
|
314
|
+
* The temperature of the model.
|
|
315
|
+
*/
|
|
316
|
+
temperature?: number;
|
|
317
|
+
}
|
|
318
|
+
namespace ChatGptoAuthModelSettings {
|
|
319
|
+
/**
|
|
320
|
+
* The reasoning configuration for the model.
|
|
321
|
+
*/
|
|
322
|
+
interface Reasoning {
|
|
323
|
+
/**
|
|
324
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
325
|
+
*/
|
|
326
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
88
330
|
/**
|
|
89
331
|
* Request model for updating a conversation.
|
|
90
332
|
*/
|
|
91
333
|
export interface UpdateConversation {
|
|
334
|
+
/**
|
|
335
|
+
* The model handle for this conversation (overrides agent's model). Format:
|
|
336
|
+
* provider/model-name.
|
|
337
|
+
*/
|
|
338
|
+
model?: string | null;
|
|
339
|
+
/**
|
|
340
|
+
* The model settings for this conversation (overrides agent's model settings).
|
|
341
|
+
*/
|
|
342
|
+
model_settings?: AgentsAPI.OpenAIModelSettings | AgentsAPI.AnthropicModelSettings | AgentsAPI.GoogleAIModelSettings | AgentsAPI.GoogleVertexModelSettings | AgentsAPI.AzureModelSettings | AgentsAPI.XaiModelSettings | UpdateConversation.ZaiModelSettings | AgentsAPI.GroqModelSettings | AgentsAPI.DeepseekModelSettings | AgentsAPI.TogetherModelSettings | AgentsAPI.BedrockModelSettings | UpdateConversation.OpenRouterModelSettings | UpdateConversation.ChatGptoAuthModelSettings | null;
|
|
92
343
|
/**
|
|
93
344
|
* A summary of the conversation.
|
|
94
345
|
*/
|
|
95
346
|
summary?: string | null;
|
|
96
347
|
}
|
|
348
|
+
export declare namespace UpdateConversation {
|
|
349
|
+
/**
|
|
350
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
351
|
+
*/
|
|
352
|
+
interface ZaiModelSettings {
|
|
353
|
+
/**
|
|
354
|
+
* The maximum number of tokens the model can generate.
|
|
355
|
+
*/
|
|
356
|
+
max_output_tokens?: number;
|
|
357
|
+
/**
|
|
358
|
+
* Whether to enable parallel tool calling.
|
|
359
|
+
*/
|
|
360
|
+
parallel_tool_calls?: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* The type of the provider.
|
|
363
|
+
*/
|
|
364
|
+
provider_type?: 'zai';
|
|
365
|
+
/**
|
|
366
|
+
* The response format for the model.
|
|
367
|
+
*/
|
|
368
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
369
|
+
/**
|
|
370
|
+
* The temperature of the model.
|
|
371
|
+
*/
|
|
372
|
+
temperature?: number;
|
|
373
|
+
/**
|
|
374
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
375
|
+
*/
|
|
376
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
377
|
+
}
|
|
378
|
+
namespace ZaiModelSettings {
|
|
379
|
+
/**
|
|
380
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
381
|
+
*/
|
|
382
|
+
interface Thinking {
|
|
383
|
+
/**
|
|
384
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
385
|
+
*/
|
|
386
|
+
clear_thinking?: boolean;
|
|
387
|
+
/**
|
|
388
|
+
* Whether thinking is enabled or disabled.
|
|
389
|
+
*/
|
|
390
|
+
type?: 'enabled' | 'disabled';
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
395
|
+
*/
|
|
396
|
+
interface OpenRouterModelSettings {
|
|
397
|
+
/**
|
|
398
|
+
* The maximum number of tokens the model can generate.
|
|
399
|
+
*/
|
|
400
|
+
max_output_tokens?: number;
|
|
401
|
+
/**
|
|
402
|
+
* Whether to enable parallel tool calling.
|
|
403
|
+
*/
|
|
404
|
+
parallel_tool_calls?: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* The type of the provider.
|
|
407
|
+
*/
|
|
408
|
+
provider_type?: 'openrouter';
|
|
409
|
+
/**
|
|
410
|
+
* The response format for the model.
|
|
411
|
+
*/
|
|
412
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
413
|
+
/**
|
|
414
|
+
* The temperature of the model.
|
|
415
|
+
*/
|
|
416
|
+
temperature?: number;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
420
|
+
*/
|
|
421
|
+
interface ChatGptoAuthModelSettings {
|
|
422
|
+
/**
|
|
423
|
+
* The maximum number of tokens the model can generate.
|
|
424
|
+
*/
|
|
425
|
+
max_output_tokens?: number;
|
|
426
|
+
/**
|
|
427
|
+
* Whether to enable parallel tool calling.
|
|
428
|
+
*/
|
|
429
|
+
parallel_tool_calls?: boolean;
|
|
430
|
+
/**
|
|
431
|
+
* The type of the provider.
|
|
432
|
+
*/
|
|
433
|
+
provider_type?: 'chatgpt_oauth';
|
|
434
|
+
/**
|
|
435
|
+
* The reasoning configuration for the model.
|
|
436
|
+
*/
|
|
437
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
438
|
+
/**
|
|
439
|
+
* The temperature of the model.
|
|
440
|
+
*/
|
|
441
|
+
temperature?: number;
|
|
442
|
+
}
|
|
443
|
+
namespace ChatGptoAuthModelSettings {
|
|
444
|
+
/**
|
|
445
|
+
* The reasoning configuration for the model.
|
|
446
|
+
*/
|
|
447
|
+
interface Reasoning {
|
|
448
|
+
/**
|
|
449
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
450
|
+
*/
|
|
451
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
97
455
|
export type ConversationListResponse = Array<Conversation>;
|
|
456
|
+
export type ConversationDeleteResponse = unknown;
|
|
98
457
|
export type ConversationCancelResponse = {
|
|
99
458
|
[key: string]: unknown;
|
|
100
459
|
};
|
|
@@ -109,37 +468,279 @@ export interface ConversationCreateParams {
|
|
|
109
468
|
* the agent's blocks with these labels.
|
|
110
469
|
*/
|
|
111
470
|
isolated_block_labels?: Array<string> | null;
|
|
471
|
+
/**
|
|
472
|
+
* Body param: The model handle for this conversation (overrides agent's model).
|
|
473
|
+
* Format: provider/model-name.
|
|
474
|
+
*/
|
|
475
|
+
model?: string | null;
|
|
476
|
+
/**
|
|
477
|
+
* Body param: The model settings for this conversation (overrides agent's model
|
|
478
|
+
* settings).
|
|
479
|
+
*/
|
|
480
|
+
model_settings?: AgentsAPI.OpenAIModelSettings | AgentsAPI.AnthropicModelSettings | AgentsAPI.GoogleAIModelSettings | AgentsAPI.GoogleVertexModelSettings | AgentsAPI.AzureModelSettings | AgentsAPI.XaiModelSettings | ConversationCreateParams.ZaiModelSettings | AgentsAPI.GroqModelSettings | AgentsAPI.DeepseekModelSettings | AgentsAPI.TogetherModelSettings | AgentsAPI.BedrockModelSettings | ConversationCreateParams.OpenRouterModelSettings | ConversationCreateParams.ChatGptoAuthModelSettings | null;
|
|
112
481
|
/**
|
|
113
482
|
* Body param: A summary of the conversation.
|
|
114
483
|
*/
|
|
115
484
|
summary?: string | null;
|
|
116
485
|
}
|
|
486
|
+
export declare namespace ConversationCreateParams {
|
|
487
|
+
/**
|
|
488
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
489
|
+
*/
|
|
490
|
+
interface ZaiModelSettings {
|
|
491
|
+
/**
|
|
492
|
+
* The maximum number of tokens the model can generate.
|
|
493
|
+
*/
|
|
494
|
+
max_output_tokens?: number;
|
|
495
|
+
/**
|
|
496
|
+
* Whether to enable parallel tool calling.
|
|
497
|
+
*/
|
|
498
|
+
parallel_tool_calls?: boolean;
|
|
499
|
+
/**
|
|
500
|
+
* The type of the provider.
|
|
501
|
+
*/
|
|
502
|
+
provider_type?: 'zai';
|
|
503
|
+
/**
|
|
504
|
+
* The response format for the model.
|
|
505
|
+
*/
|
|
506
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
507
|
+
/**
|
|
508
|
+
* The temperature of the model.
|
|
509
|
+
*/
|
|
510
|
+
temperature?: number;
|
|
511
|
+
/**
|
|
512
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
513
|
+
*/
|
|
514
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
515
|
+
}
|
|
516
|
+
namespace ZaiModelSettings {
|
|
517
|
+
/**
|
|
518
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
519
|
+
*/
|
|
520
|
+
interface Thinking {
|
|
521
|
+
/**
|
|
522
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
523
|
+
*/
|
|
524
|
+
clear_thinking?: boolean;
|
|
525
|
+
/**
|
|
526
|
+
* Whether thinking is enabled or disabled.
|
|
527
|
+
*/
|
|
528
|
+
type?: 'enabled' | 'disabled';
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
533
|
+
*/
|
|
534
|
+
interface OpenRouterModelSettings {
|
|
535
|
+
/**
|
|
536
|
+
* The maximum number of tokens the model can generate.
|
|
537
|
+
*/
|
|
538
|
+
max_output_tokens?: number;
|
|
539
|
+
/**
|
|
540
|
+
* Whether to enable parallel tool calling.
|
|
541
|
+
*/
|
|
542
|
+
parallel_tool_calls?: boolean;
|
|
543
|
+
/**
|
|
544
|
+
* The type of the provider.
|
|
545
|
+
*/
|
|
546
|
+
provider_type?: 'openrouter';
|
|
547
|
+
/**
|
|
548
|
+
* The response format for the model.
|
|
549
|
+
*/
|
|
550
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
551
|
+
/**
|
|
552
|
+
* The temperature of the model.
|
|
553
|
+
*/
|
|
554
|
+
temperature?: number;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
558
|
+
*/
|
|
559
|
+
interface ChatGptoAuthModelSettings {
|
|
560
|
+
/**
|
|
561
|
+
* The maximum number of tokens the model can generate.
|
|
562
|
+
*/
|
|
563
|
+
max_output_tokens?: number;
|
|
564
|
+
/**
|
|
565
|
+
* Whether to enable parallel tool calling.
|
|
566
|
+
*/
|
|
567
|
+
parallel_tool_calls?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* The type of the provider.
|
|
570
|
+
*/
|
|
571
|
+
provider_type?: 'chatgpt_oauth';
|
|
572
|
+
/**
|
|
573
|
+
* The reasoning configuration for the model.
|
|
574
|
+
*/
|
|
575
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
576
|
+
/**
|
|
577
|
+
* The temperature of the model.
|
|
578
|
+
*/
|
|
579
|
+
temperature?: number;
|
|
580
|
+
}
|
|
581
|
+
namespace ChatGptoAuthModelSettings {
|
|
582
|
+
/**
|
|
583
|
+
* The reasoning configuration for the model.
|
|
584
|
+
*/
|
|
585
|
+
interface Reasoning {
|
|
586
|
+
/**
|
|
587
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
588
|
+
*/
|
|
589
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
117
593
|
export interface ConversationUpdateParams {
|
|
594
|
+
/**
|
|
595
|
+
* The model handle for this conversation (overrides agent's model). Format:
|
|
596
|
+
* provider/model-name.
|
|
597
|
+
*/
|
|
598
|
+
model?: string | null;
|
|
599
|
+
/**
|
|
600
|
+
* The model settings for this conversation (overrides agent's model settings).
|
|
601
|
+
*/
|
|
602
|
+
model_settings?: AgentsAPI.OpenAIModelSettings | AgentsAPI.AnthropicModelSettings | AgentsAPI.GoogleAIModelSettings | AgentsAPI.GoogleVertexModelSettings | AgentsAPI.AzureModelSettings | AgentsAPI.XaiModelSettings | ConversationUpdateParams.ZaiModelSettings | AgentsAPI.GroqModelSettings | AgentsAPI.DeepseekModelSettings | AgentsAPI.TogetherModelSettings | AgentsAPI.BedrockModelSettings | ConversationUpdateParams.OpenRouterModelSettings | ConversationUpdateParams.ChatGptoAuthModelSettings | null;
|
|
118
603
|
/**
|
|
119
604
|
* A summary of the conversation.
|
|
120
605
|
*/
|
|
121
606
|
summary?: string | null;
|
|
122
607
|
}
|
|
123
|
-
export
|
|
608
|
+
export declare namespace ConversationUpdateParams {
|
|
124
609
|
/**
|
|
125
|
-
*
|
|
610
|
+
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
126
611
|
*/
|
|
127
|
-
|
|
612
|
+
interface ZaiModelSettings {
|
|
613
|
+
/**
|
|
614
|
+
* The maximum number of tokens the model can generate.
|
|
615
|
+
*/
|
|
616
|
+
max_output_tokens?: number;
|
|
617
|
+
/**
|
|
618
|
+
* Whether to enable parallel tool calling.
|
|
619
|
+
*/
|
|
620
|
+
parallel_tool_calls?: boolean;
|
|
621
|
+
/**
|
|
622
|
+
* The type of the provider.
|
|
623
|
+
*/
|
|
624
|
+
provider_type?: 'zai';
|
|
625
|
+
/**
|
|
626
|
+
* The response format for the model.
|
|
627
|
+
*/
|
|
628
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
629
|
+
/**
|
|
630
|
+
* The temperature of the model.
|
|
631
|
+
*/
|
|
632
|
+
temperature?: number;
|
|
633
|
+
/**
|
|
634
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
635
|
+
*/
|
|
636
|
+
thinking?: ZaiModelSettings.Thinking;
|
|
637
|
+
}
|
|
638
|
+
namespace ZaiModelSettings {
|
|
639
|
+
/**
|
|
640
|
+
* The thinking configuration for GLM-4.5+ models.
|
|
641
|
+
*/
|
|
642
|
+
interface Thinking {
|
|
643
|
+
/**
|
|
644
|
+
* If False, preserved thinking is used (recommended for agents).
|
|
645
|
+
*/
|
|
646
|
+
clear_thinking?: boolean;
|
|
647
|
+
/**
|
|
648
|
+
* Whether thinking is enabled or disabled.
|
|
649
|
+
*/
|
|
650
|
+
type?: 'enabled' | 'disabled';
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
/**
|
|
654
|
+
* OpenRouter model configuration (OpenAI-compatible).
|
|
655
|
+
*/
|
|
656
|
+
interface OpenRouterModelSettings {
|
|
657
|
+
/**
|
|
658
|
+
* The maximum number of tokens the model can generate.
|
|
659
|
+
*/
|
|
660
|
+
max_output_tokens?: number;
|
|
661
|
+
/**
|
|
662
|
+
* Whether to enable parallel tool calling.
|
|
663
|
+
*/
|
|
664
|
+
parallel_tool_calls?: boolean;
|
|
665
|
+
/**
|
|
666
|
+
* The type of the provider.
|
|
667
|
+
*/
|
|
668
|
+
provider_type?: 'openrouter';
|
|
669
|
+
/**
|
|
670
|
+
* The response format for the model.
|
|
671
|
+
*/
|
|
672
|
+
response_format?: AgentsAPI.TextResponseFormat | AgentsAPI.JsonSchemaResponseFormat | AgentsAPI.JsonObjectResponseFormat | null;
|
|
673
|
+
/**
|
|
674
|
+
* The temperature of the model.
|
|
675
|
+
*/
|
|
676
|
+
temperature?: number;
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* ChatGPT OAuth model configuration (uses ChatGPT backend API).
|
|
680
|
+
*/
|
|
681
|
+
interface ChatGptoAuthModelSettings {
|
|
682
|
+
/**
|
|
683
|
+
* The maximum number of tokens the model can generate.
|
|
684
|
+
*/
|
|
685
|
+
max_output_tokens?: number;
|
|
686
|
+
/**
|
|
687
|
+
* Whether to enable parallel tool calling.
|
|
688
|
+
*/
|
|
689
|
+
parallel_tool_calls?: boolean;
|
|
690
|
+
/**
|
|
691
|
+
* The type of the provider.
|
|
692
|
+
*/
|
|
693
|
+
provider_type?: 'chatgpt_oauth';
|
|
694
|
+
/**
|
|
695
|
+
* The reasoning configuration for the model.
|
|
696
|
+
*/
|
|
697
|
+
reasoning?: ChatGptoAuthModelSettings.Reasoning;
|
|
698
|
+
/**
|
|
699
|
+
* The temperature of the model.
|
|
700
|
+
*/
|
|
701
|
+
temperature?: number;
|
|
702
|
+
}
|
|
703
|
+
namespace ChatGptoAuthModelSettings {
|
|
704
|
+
/**
|
|
705
|
+
* The reasoning configuration for the model.
|
|
706
|
+
*/
|
|
707
|
+
interface Reasoning {
|
|
708
|
+
/**
|
|
709
|
+
* The reasoning effort level for GPT-5.x and o-series models.
|
|
710
|
+
*/
|
|
711
|
+
reasoning_effort?: 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
export interface ConversationListParams {
|
|
128
716
|
/**
|
|
129
717
|
* Cursor for pagination (conversation ID)
|
|
130
718
|
*/
|
|
131
719
|
after?: string | null;
|
|
720
|
+
/**
|
|
721
|
+
* The agent ID to list conversations for (optional - returns all conversations if
|
|
722
|
+
* not provided)
|
|
723
|
+
*/
|
|
724
|
+
agent_id?: string | null;
|
|
132
725
|
/**
|
|
133
726
|
* Maximum number of conversations to return
|
|
134
727
|
*/
|
|
135
728
|
limit?: number;
|
|
729
|
+
/**
|
|
730
|
+
* Sort order for conversations. 'asc' for oldest first, 'desc' for newest first
|
|
731
|
+
*/
|
|
732
|
+
order?: 'asc' | 'desc';
|
|
733
|
+
/**
|
|
734
|
+
* Field to sort by
|
|
735
|
+
*/
|
|
736
|
+
order_by?: 'created_at' | 'last_run_completion';
|
|
136
737
|
/**
|
|
137
738
|
* Search for text within conversation summaries
|
|
138
739
|
*/
|
|
139
740
|
summary_search?: string | null;
|
|
140
741
|
}
|
|
141
742
|
export declare namespace Conversations {
|
|
142
|
-
export { type Conversation as Conversation, type CreateConversation as CreateConversation, type UpdateConversation as UpdateConversation, type ConversationListResponse as ConversationListResponse, type ConversationCancelResponse as ConversationCancelResponse, type ConversationCreateParams as ConversationCreateParams, type ConversationUpdateParams as ConversationUpdateParams, type ConversationListParams as ConversationListParams, };
|
|
743
|
+
export { type Conversation as Conversation, type CreateConversation as CreateConversation, type UpdateConversation as UpdateConversation, type ConversationListResponse as ConversationListResponse, type ConversationDeleteResponse as ConversationDeleteResponse, type ConversationCancelResponse as ConversationCancelResponse, type ConversationCreateParams as ConversationCreateParams, type ConversationUpdateParams as ConversationUpdateParams, type ConversationListParams as ConversationListParams, };
|
|
143
744
|
export { Messages as Messages, type CompactionRequest as CompactionRequest, type CompactionResponse as CompactionResponse, type MessageStreamResponse as MessageStreamResponse, type MessageCreateParams as MessageCreateParams, type MessageListParams as MessageListParams, type MessageCompactParams as MessageCompactParams, type MessageStreamParams as MessageStreamParams, };
|
|
144
745
|
}
|
|
145
746
|
//# sourceMappingURL=conversations.d.mts.map
|