@letta-ai/letta-client 1.0.0-alpha.14 → 1.0.0-alpha.16
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 +20 -20
- package/client.d.mts.map +1 -1
- package/client.d.ts +20 -20
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +163 -52
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +163 -52
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +0 -6
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +1 -7
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/folders.d.mts +52 -76
- package/resources/agents/folders.d.mts.map +1 -1
- package/resources/agents/folders.d.ts +52 -76
- package/resources/agents/folders.d.ts.map +1 -1
- package/resources/agents/folders.js +5 -1
- package/resources/agents/folders.js.map +1 -1
- package/resources/agents/folders.mjs +5 -1
- package/resources/agents/folders.mjs.map +1 -1
- package/resources/agents/index.d.mts +4 -4
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +4 -4
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/messages.d.mts +344 -38
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +344 -38
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/agents/messages.js +5 -5
- package/resources/agents/messages.js.map +1 -1
- package/resources/agents/messages.mjs +5 -5
- package/resources/agents/messages.mjs.map +1 -1
- package/resources/agents/tools.d.mts +6 -27
- package/resources/agents/tools.d.mts.map +1 -1
- package/resources/agents/tools.d.ts +6 -27
- package/resources/agents/tools.d.ts.map +1 -1
- package/resources/agents/tools.js +5 -1
- package/resources/agents/tools.js.map +1 -1
- package/resources/agents/tools.mjs +5 -1
- package/resources/agents/tools.mjs.map +1 -1
- package/resources/archives.d.mts +9 -31
- package/resources/archives.d.mts.map +1 -1
- package/resources/archives.d.ts +9 -31
- package/resources/archives.d.ts.map +1 -1
- package/resources/archives.js +2 -1
- package/resources/archives.js.map +1 -1
- package/resources/archives.mjs +2 -1
- package/resources/archives.mjs.map +1 -1
- package/resources/batches/batches.d.mts +52 -34
- package/resources/batches/batches.d.mts.map +1 -1
- package/resources/batches/batches.d.ts +52 -34
- package/resources/batches/batches.d.ts.map +1 -1
- package/resources/batches/batches.js +2 -1
- package/resources/batches/batches.js.map +1 -1
- package/resources/batches/batches.mjs +2 -1
- package/resources/batches/batches.mjs.map +1 -1
- package/resources/batches/index.d.mts +2 -2
- package/resources/batches/index.d.mts.map +1 -1
- package/resources/batches/index.d.ts +2 -2
- package/resources/batches/index.d.ts.map +1 -1
- package/resources/batches/index.js.map +1 -1
- package/resources/batches/index.mjs.map +1 -1
- package/resources/batches/messages.d.mts +6 -30
- package/resources/batches/messages.d.mts.map +1 -1
- package/resources/batches/messages.d.ts +6 -30
- package/resources/batches/messages.d.ts.map +1 -1
- package/resources/batches/messages.js +2 -1
- package/resources/batches/messages.js.map +1 -1
- package/resources/batches/messages.mjs +2 -1
- package/resources/batches/messages.mjs.map +1 -1
- package/resources/blocks/blocks.d.mts +1 -6
- package/resources/blocks/blocks.d.mts.map +1 -1
- package/resources/blocks/blocks.d.ts +1 -6
- package/resources/blocks/blocks.d.ts.map +1 -1
- package/resources/blocks/blocks.js +0 -6
- package/resources/blocks/blocks.js.map +1 -1
- package/resources/blocks/blocks.mjs +0 -6
- package/resources/blocks/blocks.mjs.map +1 -1
- package/resources/blocks/index.d.mts +1 -1
- package/resources/blocks/index.d.mts.map +1 -1
- package/resources/blocks/index.d.ts +1 -1
- package/resources/blocks/index.d.ts.map +1 -1
- package/resources/blocks/index.js.map +1 -1
- package/resources/blocks/index.mjs.map +1 -1
- package/resources/folders/files.d.mts +73 -97
- package/resources/folders/files.d.mts.map +1 -1
- package/resources/folders/files.d.ts +73 -97
- package/resources/folders/files.d.ts.map +1 -1
- package/resources/folders/files.js +5 -1
- package/resources/folders/files.js.map +1 -1
- package/resources/folders/files.mjs +5 -1
- package/resources/folders/files.mjs.map +1 -1
- package/resources/folders/folders.d.mts +11 -38
- package/resources/folders/folders.d.mts.map +1 -1
- package/resources/folders/folders.d.ts +11 -38
- package/resources/folders/folders.d.ts.map +1 -1
- package/resources/folders/folders.js +2 -7
- package/resources/folders/folders.js.map +1 -1
- package/resources/folders/folders.mjs +2 -7
- package/resources/folders/folders.mjs.map +1 -1
- package/resources/folders/index.d.mts +2 -2
- package/resources/folders/index.d.mts.map +1 -1
- package/resources/folders/index.d.ts +2 -2
- package/resources/folders/index.d.ts.map +1 -1
- package/resources/folders/index.js.map +1 -1
- package/resources/folders/index.mjs.map +1 -1
- package/resources/groups/groups.d.mts +1 -6
- package/resources/groups/groups.d.mts.map +1 -1
- package/resources/groups/groups.d.ts +1 -6
- package/resources/groups/groups.d.ts.map +1 -1
- package/resources/groups/groups.js +0 -6
- package/resources/groups/groups.js.map +1 -1
- package/resources/groups/groups.mjs +0 -6
- package/resources/groups/groups.mjs.map +1 -1
- package/resources/groups/index.d.mts +1 -1
- package/resources/groups/index.d.mts.map +1 -1
- package/resources/groups/index.d.ts +1 -1
- package/resources/groups/index.d.ts.map +1 -1
- package/resources/groups/index.js.map +1 -1
- package/resources/groups/index.mjs.map +1 -1
- package/resources/groups/messages.d.mts +97 -11
- package/resources/groups/messages.d.mts.map +1 -1
- package/resources/groups/messages.d.ts +97 -11
- package/resources/groups/messages.d.ts.map +1 -1
- package/resources/identities/identities.d.mts +9 -36
- package/resources/identities/identities.d.mts.map +1 -1
- package/resources/identities/identities.d.ts +9 -36
- package/resources/identities/identities.d.ts.map +1 -1
- package/resources/identities/identities.js +2 -7
- package/resources/identities/identities.js.map +1 -1
- package/resources/identities/identities.mjs +2 -7
- package/resources/identities/identities.mjs.map +1 -1
- package/resources/identities/index.d.mts +1 -1
- package/resources/identities/index.d.mts.map +1 -1
- package/resources/identities/index.d.ts +1 -1
- package/resources/identities/index.d.ts.map +1 -1
- package/resources/identities/index.js.map +1 -1
- package/resources/identities/index.mjs.map +1 -1
- package/resources/index.d.mts +10 -10
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +10 -10
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp-servers/index.d.mts +2 -3
- package/resources/mcp-servers/index.d.mts.map +1 -1
- package/resources/mcp-servers/index.d.ts +2 -3
- package/resources/mcp-servers/index.d.ts.map +1 -1
- package/resources/mcp-servers/index.js +1 -3
- package/resources/mcp-servers/index.js.map +1 -1
- package/resources/mcp-servers/index.mjs +1 -2
- package/resources/mcp-servers/index.mjs.map +1 -1
- package/resources/mcp-servers/mcp-servers.d.mts +302 -378
- package/resources/mcp-servers/mcp-servers.d.mts.map +1 -1
- package/resources/mcp-servers/mcp-servers.d.ts +302 -378
- package/resources/mcp-servers/mcp-servers.d.ts.map +1 -1
- package/resources/mcp-servers/mcp-servers.js +17 -4
- package/resources/mcp-servers/mcp-servers.js.map +1 -1
- package/resources/mcp-servers/mcp-servers.mjs +17 -4
- package/resources/mcp-servers/mcp-servers.mjs.map +1 -1
- package/resources/mcp-servers/tools.d.mts +3 -41
- package/resources/mcp-servers/tools.d.mts.map +1 -1
- package/resources/mcp-servers/tools.d.ts +3 -41
- package/resources/mcp-servers/tools.d.ts.map +1 -1
- package/resources/mcp-servers/tools.js.map +1 -1
- package/resources/mcp-servers/tools.mjs.map +1 -1
- package/resources/models/embeddings.d.mts +71 -2
- package/resources/models/embeddings.d.mts.map +1 -1
- package/resources/models/embeddings.d.ts +71 -2
- package/resources/models/embeddings.d.ts.map +1 -1
- package/resources/models/embeddings.js +5 -1
- package/resources/models/embeddings.js.map +1 -1
- package/resources/models/embeddings.mjs +5 -1
- package/resources/models/embeddings.mjs.map +1 -1
- package/resources/models/models.d.mts +113 -2
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +113 -2
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +5 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +5 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/runs/index.d.mts +1 -1
- package/resources/runs/index.d.mts.map +1 -1
- package/resources/runs/index.d.ts +1 -1
- package/resources/runs/index.d.ts.map +1 -1
- package/resources/runs/index.js.map +1 -1
- package/resources/runs/index.mjs.map +1 -1
- package/resources/runs/runs.d.mts +6 -27
- package/resources/runs/runs.d.mts.map +1 -1
- package/resources/runs/runs.d.ts +6 -27
- package/resources/runs/runs.d.ts.map +1 -1
- package/resources/runs/runs.js +2 -1
- package/resources/runs/runs.js.map +1 -1
- package/resources/runs/runs.mjs +2 -1
- package/resources/runs/runs.mjs.map +1 -1
- package/resources/steps/messages.d.mts +1 -1
- package/resources/steps/messages.d.mts.map +1 -1
- package/resources/steps/messages.d.ts +1 -1
- package/resources/steps/messages.d.ts.map +1 -1
- package/resources/tools.d.mts +6 -64
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +6 -64
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +2 -7
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +2 -7
- package/resources/tools.mjs.map +1 -1
- package/src/client.ts +37 -28
- package/src/resources/agents/agents.ts +185 -60
- package/src/resources/agents/folders.ts +60 -85
- package/src/resources/agents/index.ts +7 -2
- package/src/resources/agents/messages.ts +504 -40
- package/src/resources/agents/tools.ts +10 -34
- package/src/resources/archives.ts +12 -39
- package/src/resources/batches/batches.ts +74 -46
- package/src/resources/batches/index.ts +2 -2
- package/src/resources/batches/messages.ts +12 -37
- package/src/resources/blocks/blocks.ts +0 -10
- package/src/resources/blocks/index.ts +0 -1
- package/src/resources/folders/files.ts +88 -113
- package/src/resources/folders/folders.ts +14 -49
- package/src/resources/folders/index.ts +2 -2
- package/src/resources/groups/groups.ts +0 -10
- package/src/resources/groups/index.ts +0 -1
- package/src/resources/groups/messages.ts +139 -12
- package/src/resources/identities/identities.ts +12 -49
- package/src/resources/identities/index.ts +1 -2
- package/src/resources/index.ts +19 -14
- package/src/resources/mcp-servers/index.ts +14 -9
- package/src/resources/mcp-servers/mcp-servers.ts +313 -402
- package/src/resources/mcp-servers/tools.ts +6 -47
- package/src/resources/models/embeddings.ts +105 -2
- package/src/resources/models/models.ts +158 -2
- package/src/resources/runs/index.ts +1 -1
- package/src/resources/runs/runs.ts +11 -39
- package/src/resources/steps/messages.ts +3 -1
- package/src/resources/tools.ts +8 -88
- 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/mcp-servers/refresh.d.mts +0 -24
- package/resources/mcp-servers/refresh.d.mts.map +0 -1
- package/resources/mcp-servers/refresh.d.ts +0 -24
- package/resources/mcp-servers/refresh.d.ts.map +0 -1
- package/resources/mcp-servers/refresh.js +0 -27
- package/resources/mcp-servers/refresh.js.map +0 -1
- package/resources/mcp-servers/refresh.mjs +0 -23
- package/resources/mcp-servers/refresh.mjs.map +0 -1
- package/src/resources/mcp-servers/refresh.ts +0 -43
|
@@ -6,7 +6,7 @@ import * as ToolsAPI from '../tools';
|
|
|
6
6
|
import * as AgentsAPI from './agents';
|
|
7
7
|
import * as RunsAPI from '../runs/runs';
|
|
8
8
|
import { APIPromise } from '../../core/api-promise';
|
|
9
|
-
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
9
|
+
import { ArrayPage, type ArrayPageParams, ObjectPage, PagePromise } from '../../core/pagination';
|
|
10
10
|
import { Stream } from '../../core/streaming';
|
|
11
11
|
import { buildHeaders } from '../../internal/headers';
|
|
12
12
|
import { RequestOptions } from '../../internal/request-options';
|
|
@@ -67,9 +67,44 @@ export class Messages extends APIResource {
|
|
|
67
67
|
/**
|
|
68
68
|
* Process a user message and return the agent's response. This endpoint accepts a
|
|
69
69
|
* message from a user and processes it through the agent.
|
|
70
|
+
*
|
|
71
|
+
* The response format is controlled by the `streaming` field in the request body:
|
|
72
|
+
*
|
|
73
|
+
* - If `streaming=false` (default): Returns a complete LettaResponse with all
|
|
74
|
+
* messages
|
|
75
|
+
* - If `streaming=true`: Returns a Server-Sent Events (SSE) stream
|
|
76
|
+
*
|
|
77
|
+
* Additional streaming options (only used when streaming=true):
|
|
78
|
+
*
|
|
79
|
+
* - `stream_tokens`: Stream individual tokens instead of complete steps
|
|
80
|
+
* - `include_pings`: Include keepalive pings to prevent connection timeouts
|
|
81
|
+
* - `background`: Process the request in the background
|
|
70
82
|
*/
|
|
71
|
-
send(
|
|
72
|
-
|
|
83
|
+
send(
|
|
84
|
+
agentID: string,
|
|
85
|
+
body: MessageSendParamsNonStreaming,
|
|
86
|
+
options?: RequestOptions,
|
|
87
|
+
): APIPromise<LettaResponse>;
|
|
88
|
+
send(
|
|
89
|
+
agentID: string,
|
|
90
|
+
body: MessageSendParamsStreaming,
|
|
91
|
+
options?: RequestOptions,
|
|
92
|
+
): APIPromise<Stream<LettaStreamingResponse>>;
|
|
93
|
+
send(
|
|
94
|
+
agentID: string,
|
|
95
|
+
body: MessageSendParamsBase,
|
|
96
|
+
options?: RequestOptions,
|
|
97
|
+
): APIPromise<Stream<LettaStreamingResponse> | LettaResponse>;
|
|
98
|
+
send(
|
|
99
|
+
agentID: string,
|
|
100
|
+
body: MessageSendParams,
|
|
101
|
+
options?: RequestOptions,
|
|
102
|
+
): APIPromise<LettaResponse> | APIPromise<Stream<LettaStreamingResponse>> {
|
|
103
|
+
return this._client.post(path`/v1/agents/${agentID}/messages`, {
|
|
104
|
+
body,
|
|
105
|
+
...options,
|
|
106
|
+
stream: body.streaming ?? false,
|
|
107
|
+
}) as APIPromise<LettaResponse> | APIPromise<Stream<LettaStreamingResponse>>;
|
|
73
108
|
}
|
|
74
109
|
|
|
75
110
|
/**
|
|
@@ -114,6 +149,10 @@ export class Messages extends APIResource {
|
|
|
114
149
|
|
|
115
150
|
export type LettaMessageUnionsArrayPage = ArrayPage<LettaMessageUnion>;
|
|
116
151
|
|
|
152
|
+
export type RunsArrayPage = ArrayPage<Run>;
|
|
153
|
+
|
|
154
|
+
export type MessagesObjectPage = ObjectPage<Message>;
|
|
155
|
+
|
|
117
156
|
/**
|
|
118
157
|
* Input to approve or deny a tool call request
|
|
119
158
|
*/
|
|
@@ -133,6 +172,11 @@ export interface ApprovalCreate {
|
|
|
133
172
|
*/
|
|
134
173
|
approve?: boolean | null;
|
|
135
174
|
|
|
175
|
+
/**
|
|
176
|
+
* The multi-agent group that the message was sent in
|
|
177
|
+
*/
|
|
178
|
+
group_id?: string | null;
|
|
179
|
+
|
|
136
180
|
/**
|
|
137
181
|
* @deprecated An optional explanation for the provided approval status
|
|
138
182
|
*/
|
|
@@ -330,6 +374,36 @@ export interface AssistantMessage {
|
|
|
330
374
|
step_id?: string | null;
|
|
331
375
|
}
|
|
332
376
|
|
|
377
|
+
/**
|
|
378
|
+
* A message for notifying the developer that an event that has occured (e.g. a
|
|
379
|
+
* compaction). Events are NOT part of the context window.
|
|
380
|
+
*/
|
|
381
|
+
export interface EventMessage {
|
|
382
|
+
id: string;
|
|
383
|
+
|
|
384
|
+
date: string;
|
|
385
|
+
|
|
386
|
+
event_data: { [key: string]: unknown };
|
|
387
|
+
|
|
388
|
+
event_type: 'compaction';
|
|
389
|
+
|
|
390
|
+
is_err?: boolean | null;
|
|
391
|
+
|
|
392
|
+
message_type?: 'event';
|
|
393
|
+
|
|
394
|
+
name?: string | null;
|
|
395
|
+
|
|
396
|
+
otid?: string | null;
|
|
397
|
+
|
|
398
|
+
run_id?: string | null;
|
|
399
|
+
|
|
400
|
+
sender_id?: string | null;
|
|
401
|
+
|
|
402
|
+
seq_id?: number | null;
|
|
403
|
+
|
|
404
|
+
step_id?: string | null;
|
|
405
|
+
}
|
|
406
|
+
|
|
333
407
|
/**
|
|
334
408
|
* Representation of an agent's internal reasoning where reasoning content has been
|
|
335
409
|
* hidden from the response.
|
|
@@ -487,14 +561,11 @@ export type LettaMessageUnion =
|
|
|
487
561
|
| ToolsAPI.ToolReturnMessage
|
|
488
562
|
| AssistantMessage
|
|
489
563
|
| ApprovalRequestMessage
|
|
490
|
-
| ApprovalResponseMessage
|
|
564
|
+
| ApprovalResponseMessage
|
|
565
|
+
| SummaryMessage
|
|
566
|
+
| EventMessage;
|
|
491
567
|
|
|
492
568
|
export interface LettaRequest {
|
|
493
|
-
/**
|
|
494
|
-
* The messages to be sent to the agent.
|
|
495
|
-
*/
|
|
496
|
-
messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
|
|
497
|
-
|
|
498
569
|
/**
|
|
499
570
|
* @deprecated The name of the message argument in the designated message tool.
|
|
500
571
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -520,11 +591,34 @@ export interface LettaRequest {
|
|
|
520
591
|
*/
|
|
521
592
|
include_return_message_types?: Array<MessageType> | null;
|
|
522
593
|
|
|
594
|
+
/**
|
|
595
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
596
|
+
* 'user', 'content': input}].
|
|
597
|
+
*/
|
|
598
|
+
input?:
|
|
599
|
+
| string
|
|
600
|
+
| Array<
|
|
601
|
+
| TextContent
|
|
602
|
+
| ImageContent
|
|
603
|
+
| ToolCallContent
|
|
604
|
+
| ToolReturnContent
|
|
605
|
+
| ReasoningContent
|
|
606
|
+
| RedactedReasoningContent
|
|
607
|
+
| OmittedReasoningContent
|
|
608
|
+
| LettaRequest.SummarizedReasoningContent
|
|
609
|
+
>
|
|
610
|
+
| null;
|
|
611
|
+
|
|
523
612
|
/**
|
|
524
613
|
* Maximum number of steps the agent should take to process the request.
|
|
525
614
|
*/
|
|
526
615
|
max_steps?: number;
|
|
527
616
|
|
|
617
|
+
/**
|
|
618
|
+
* The messages to be sent to the agent.
|
|
619
|
+
*/
|
|
620
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
621
|
+
|
|
528
622
|
/**
|
|
529
623
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
530
624
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -533,6 +627,47 @@ export interface LettaRequest {
|
|
|
533
627
|
use_assistant_message?: boolean;
|
|
534
628
|
}
|
|
535
629
|
|
|
630
|
+
export namespace LettaRequest {
|
|
631
|
+
/**
|
|
632
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
633
|
+
*/
|
|
634
|
+
export interface SummarizedReasoningContent {
|
|
635
|
+
/**
|
|
636
|
+
* The unique identifier for this reasoning step.
|
|
637
|
+
*/
|
|
638
|
+
id: string;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Summaries of the reasoning content.
|
|
642
|
+
*/
|
|
643
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* The encrypted reasoning content.
|
|
647
|
+
*/
|
|
648
|
+
encrypted_content?: string;
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Indicates this is a summarized reasoning step.
|
|
652
|
+
*/
|
|
653
|
+
type?: 'summarized_reasoning';
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
export namespace SummarizedReasoningContent {
|
|
657
|
+
export interface Summary {
|
|
658
|
+
/**
|
|
659
|
+
* The index of the summary part.
|
|
660
|
+
*/
|
|
661
|
+
index: number;
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* The text of the summary part.
|
|
665
|
+
*/
|
|
666
|
+
text: string;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
|
|
536
671
|
/**
|
|
537
672
|
* Response object from an agent interaction, consisting of the new messages
|
|
538
673
|
* generated by the agent and usage statistics. The type of the returned messages
|
|
@@ -609,11 +744,6 @@ export namespace LettaResponse {
|
|
|
609
744
|
}
|
|
610
745
|
|
|
611
746
|
export interface LettaStreamingRequest {
|
|
612
|
-
/**
|
|
613
|
-
* The messages to be sent to the agent.
|
|
614
|
-
*/
|
|
615
|
-
messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
|
|
616
|
-
|
|
617
747
|
/**
|
|
618
748
|
* @deprecated The name of the message argument in the designated message tool.
|
|
619
749
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -628,7 +758,8 @@ export interface LettaStreamingRequest {
|
|
|
628
758
|
assistant_message_tool_name?: string;
|
|
629
759
|
|
|
630
760
|
/**
|
|
631
|
-
* Whether to process the request in the background
|
|
761
|
+
* Whether to process the request in the background (only used when
|
|
762
|
+
* streaming=true).
|
|
632
763
|
*/
|
|
633
764
|
background?: boolean;
|
|
634
765
|
|
|
@@ -640,7 +771,7 @@ export interface LettaStreamingRequest {
|
|
|
640
771
|
|
|
641
772
|
/**
|
|
642
773
|
* Whether to include periodic keepalive ping messages in the stream to prevent
|
|
643
|
-
* connection timeouts.
|
|
774
|
+
* connection timeouts (only used when streaming=true).
|
|
644
775
|
*/
|
|
645
776
|
include_pings?: boolean;
|
|
646
777
|
|
|
@@ -650,17 +781,46 @@ export interface LettaStreamingRequest {
|
|
|
650
781
|
*/
|
|
651
782
|
include_return_message_types?: Array<MessageType> | null;
|
|
652
783
|
|
|
784
|
+
/**
|
|
785
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
786
|
+
* 'user', 'content': input}].
|
|
787
|
+
*/
|
|
788
|
+
input?:
|
|
789
|
+
| string
|
|
790
|
+
| Array<
|
|
791
|
+
| TextContent
|
|
792
|
+
| ImageContent
|
|
793
|
+
| ToolCallContent
|
|
794
|
+
| ToolReturnContent
|
|
795
|
+
| ReasoningContent
|
|
796
|
+
| RedactedReasoningContent
|
|
797
|
+
| OmittedReasoningContent
|
|
798
|
+
| LettaStreamingRequest.SummarizedReasoningContent
|
|
799
|
+
>
|
|
800
|
+
| null;
|
|
801
|
+
|
|
653
802
|
/**
|
|
654
803
|
* Maximum number of steps the agent should take to process the request.
|
|
655
804
|
*/
|
|
656
805
|
max_steps?: number;
|
|
657
806
|
|
|
807
|
+
/**
|
|
808
|
+
* The messages to be sent to the agent.
|
|
809
|
+
*/
|
|
810
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
811
|
+
|
|
658
812
|
/**
|
|
659
813
|
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
660
|
-
* per step.
|
|
814
|
+
* per step (only used when streaming=true).
|
|
661
815
|
*/
|
|
662
816
|
stream_tokens?: boolean;
|
|
663
817
|
|
|
818
|
+
/**
|
|
819
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
820
|
+
* returns a complete response.
|
|
821
|
+
*/
|
|
822
|
+
streaming?: boolean;
|
|
823
|
+
|
|
664
824
|
/**
|
|
665
825
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
666
826
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -669,6 +829,47 @@ export interface LettaStreamingRequest {
|
|
|
669
829
|
use_assistant_message?: boolean;
|
|
670
830
|
}
|
|
671
831
|
|
|
832
|
+
export namespace LettaStreamingRequest {
|
|
833
|
+
/**
|
|
834
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
835
|
+
*/
|
|
836
|
+
export interface SummarizedReasoningContent {
|
|
837
|
+
/**
|
|
838
|
+
* The unique identifier for this reasoning step.
|
|
839
|
+
*/
|
|
840
|
+
id: string;
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Summaries of the reasoning content.
|
|
844
|
+
*/
|
|
845
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* The encrypted reasoning content.
|
|
849
|
+
*/
|
|
850
|
+
encrypted_content?: string;
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* Indicates this is a summarized reasoning step.
|
|
854
|
+
*/
|
|
855
|
+
type?: 'summarized_reasoning';
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
export namespace SummarizedReasoningContent {
|
|
859
|
+
export interface Summary {
|
|
860
|
+
/**
|
|
861
|
+
* The index of the summary part.
|
|
862
|
+
*/
|
|
863
|
+
index: number;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* The text of the summary part.
|
|
867
|
+
*/
|
|
868
|
+
text: string;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
672
873
|
/**
|
|
673
874
|
* Streaming response type for Server-Sent Events (SSE) endpoints. Each event in
|
|
674
875
|
* the stream will be one of these types.
|
|
@@ -778,14 +979,14 @@ export type LettaUserMessageContentUnion = TextContent | ImageContent;
|
|
|
778
979
|
*/
|
|
779
980
|
export interface Message {
|
|
780
981
|
/**
|
|
781
|
-
* The
|
|
982
|
+
* The human-friendly ID of the Message
|
|
782
983
|
*/
|
|
783
|
-
|
|
984
|
+
id: string;
|
|
784
985
|
|
|
785
986
|
/**
|
|
786
|
-
* The
|
|
987
|
+
* The role of the participant.
|
|
787
988
|
*/
|
|
788
|
-
|
|
989
|
+
role: MessageRole;
|
|
789
990
|
|
|
790
991
|
/**
|
|
791
992
|
* The unique identifier of the agent.
|
|
@@ -1174,14 +1375,14 @@ export interface RedactedReasoningContent {
|
|
|
1174
1375
|
*/
|
|
1175
1376
|
export interface Run {
|
|
1176
1377
|
/**
|
|
1177
|
-
* The
|
|
1378
|
+
* The human-friendly ID of the Run
|
|
1178
1379
|
*/
|
|
1179
|
-
|
|
1380
|
+
id: string;
|
|
1180
1381
|
|
|
1181
1382
|
/**
|
|
1182
|
-
* The
|
|
1383
|
+
* The unique identifier of the agent associated with the run.
|
|
1183
1384
|
*/
|
|
1184
|
-
|
|
1385
|
+
agent_id: string;
|
|
1185
1386
|
|
|
1186
1387
|
/**
|
|
1187
1388
|
* Whether the run was created in background mode.
|
|
@@ -1283,6 +1484,34 @@ export namespace Run {
|
|
|
1283
1484
|
}
|
|
1284
1485
|
}
|
|
1285
1486
|
|
|
1487
|
+
/**
|
|
1488
|
+
* A message representing a summary of the conversation. Sent to the LLM as a user
|
|
1489
|
+
* or system message depending on the provider.
|
|
1490
|
+
*/
|
|
1491
|
+
export interface SummaryMessage {
|
|
1492
|
+
id: string;
|
|
1493
|
+
|
|
1494
|
+
date: string;
|
|
1495
|
+
|
|
1496
|
+
summary: string;
|
|
1497
|
+
|
|
1498
|
+
is_err?: boolean | null;
|
|
1499
|
+
|
|
1500
|
+
message_type?: 'summary';
|
|
1501
|
+
|
|
1502
|
+
name?: string | null;
|
|
1503
|
+
|
|
1504
|
+
otid?: string | null;
|
|
1505
|
+
|
|
1506
|
+
run_id?: string | null;
|
|
1507
|
+
|
|
1508
|
+
sender_id?: string | null;
|
|
1509
|
+
|
|
1510
|
+
seq_id?: number | null;
|
|
1511
|
+
|
|
1512
|
+
step_id?: string | null;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1286
1515
|
/**
|
|
1287
1516
|
* A message generated by the system. Never streamed back on a response, only used
|
|
1288
1517
|
* for cursor pagination.
|
|
@@ -1557,7 +1786,9 @@ export type MessageModifyResponse =
|
|
|
1557
1786
|
| ToolsAPI.ToolReturnMessage
|
|
1558
1787
|
| AssistantMessage
|
|
1559
1788
|
| ApprovalRequestMessage
|
|
1560
|
-
| ApprovalResponseMessage
|
|
1789
|
+
| ApprovalResponseMessage
|
|
1790
|
+
| SummaryMessage
|
|
1791
|
+
| EventMessage;
|
|
1561
1792
|
|
|
1562
1793
|
export interface MessageListParams extends ArrayPageParams {
|
|
1563
1794
|
/**
|
|
@@ -1680,12 +1911,9 @@ export interface MessageResetParams {
|
|
|
1680
1911
|
add_default_initial_messages?: boolean;
|
|
1681
1912
|
}
|
|
1682
1913
|
|
|
1683
|
-
export
|
|
1684
|
-
/**
|
|
1685
|
-
* The messages to be sent to the agent.
|
|
1686
|
-
*/
|
|
1687
|
-
messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
|
|
1914
|
+
export type MessageSendParams = MessageSendParamsNonStreaming | MessageSendParamsStreaming;
|
|
1688
1915
|
|
|
1916
|
+
export interface MessageSendParamsBase {
|
|
1689
1917
|
/**
|
|
1690
1918
|
* @deprecated The name of the message argument in the designated message tool.
|
|
1691
1919
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -1699,23 +1927,70 @@ export interface MessageSendParams {
|
|
|
1699
1927
|
*/
|
|
1700
1928
|
assistant_message_tool_name?: string;
|
|
1701
1929
|
|
|
1930
|
+
/**
|
|
1931
|
+
* Whether to process the request in the background (only used when
|
|
1932
|
+
* streaming=true).
|
|
1933
|
+
*/
|
|
1934
|
+
background?: boolean;
|
|
1935
|
+
|
|
1702
1936
|
/**
|
|
1703
1937
|
* @deprecated If set to True, enables reasoning before responses or tool calls
|
|
1704
1938
|
* from the agent.
|
|
1705
1939
|
*/
|
|
1706
1940
|
enable_thinking?: string;
|
|
1707
1941
|
|
|
1942
|
+
/**
|
|
1943
|
+
* Whether to include periodic keepalive ping messages in the stream to prevent
|
|
1944
|
+
* connection timeouts (only used when streaming=true).
|
|
1945
|
+
*/
|
|
1946
|
+
include_pings?: boolean;
|
|
1947
|
+
|
|
1708
1948
|
/**
|
|
1709
1949
|
* Only return specified message types in the response. If `None` (default) returns
|
|
1710
1950
|
* all messages.
|
|
1711
1951
|
*/
|
|
1712
1952
|
include_return_message_types?: Array<MessageType> | null;
|
|
1713
1953
|
|
|
1954
|
+
/**
|
|
1955
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
1956
|
+
* 'user', 'content': input}].
|
|
1957
|
+
*/
|
|
1958
|
+
input?:
|
|
1959
|
+
| string
|
|
1960
|
+
| Array<
|
|
1961
|
+
| TextContent
|
|
1962
|
+
| ImageContent
|
|
1963
|
+
| ToolCallContent
|
|
1964
|
+
| ToolReturnContent
|
|
1965
|
+
| ReasoningContent
|
|
1966
|
+
| RedactedReasoningContent
|
|
1967
|
+
| OmittedReasoningContent
|
|
1968
|
+
| MessageSendParams.SummarizedReasoningContent
|
|
1969
|
+
>
|
|
1970
|
+
| null;
|
|
1971
|
+
|
|
1714
1972
|
/**
|
|
1715
1973
|
* Maximum number of steps the agent should take to process the request.
|
|
1716
1974
|
*/
|
|
1717
1975
|
max_steps?: number;
|
|
1718
1976
|
|
|
1977
|
+
/**
|
|
1978
|
+
* The messages to be sent to the agent.
|
|
1979
|
+
*/
|
|
1980
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
1981
|
+
|
|
1982
|
+
/**
|
|
1983
|
+
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
1984
|
+
* per step (only used when streaming=true).
|
|
1985
|
+
*/
|
|
1986
|
+
stream_tokens?: boolean;
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
1990
|
+
* returns a complete response.
|
|
1991
|
+
*/
|
|
1992
|
+
streaming?: boolean;
|
|
1993
|
+
|
|
1719
1994
|
/**
|
|
1720
1995
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
1721
1996
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -1724,12 +1999,67 @@ export interface MessageSendParams {
|
|
|
1724
1999
|
use_assistant_message?: boolean;
|
|
1725
2000
|
}
|
|
1726
2001
|
|
|
1727
|
-
export
|
|
2002
|
+
export namespace MessageSendParams {
|
|
1728
2003
|
/**
|
|
1729
|
-
* The
|
|
2004
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
1730
2005
|
*/
|
|
1731
|
-
|
|
2006
|
+
export interface SummarizedReasoningContent {
|
|
2007
|
+
/**
|
|
2008
|
+
* The unique identifier for this reasoning step.
|
|
2009
|
+
*/
|
|
2010
|
+
id: string;
|
|
1732
2011
|
|
|
2012
|
+
/**
|
|
2013
|
+
* Summaries of the reasoning content.
|
|
2014
|
+
*/
|
|
2015
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
2016
|
+
|
|
2017
|
+
/**
|
|
2018
|
+
* The encrypted reasoning content.
|
|
2019
|
+
*/
|
|
2020
|
+
encrypted_content?: string;
|
|
2021
|
+
|
|
2022
|
+
/**
|
|
2023
|
+
* Indicates this is a summarized reasoning step.
|
|
2024
|
+
*/
|
|
2025
|
+
type?: 'summarized_reasoning';
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
export namespace SummarizedReasoningContent {
|
|
2029
|
+
export interface Summary {
|
|
2030
|
+
/**
|
|
2031
|
+
* The index of the summary part.
|
|
2032
|
+
*/
|
|
2033
|
+
index: number;
|
|
2034
|
+
|
|
2035
|
+
/**
|
|
2036
|
+
* The text of the summary part.
|
|
2037
|
+
*/
|
|
2038
|
+
text: string;
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
export type MessageSendParamsNonStreaming = MessagesAPI.MessageSendParamsNonStreaming;
|
|
2043
|
+
export type MessageSendParamsStreaming = MessagesAPI.MessageSendParamsStreaming;
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
export interface MessageSendParamsNonStreaming extends MessageSendParamsBase {
|
|
2047
|
+
/**
|
|
2048
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
2049
|
+
* returns a complete response.
|
|
2050
|
+
*/
|
|
2051
|
+
streaming?: false;
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
export interface MessageSendParamsStreaming extends MessageSendParamsBase {
|
|
2055
|
+
/**
|
|
2056
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
2057
|
+
* returns a complete response.
|
|
2058
|
+
*/
|
|
2059
|
+
streaming: true;
|
|
2060
|
+
}
|
|
2061
|
+
|
|
2062
|
+
export interface MessageSendAsyncParams {
|
|
1733
2063
|
/**
|
|
1734
2064
|
* @deprecated The name of the message argument in the designated message tool.
|
|
1735
2065
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -1760,11 +2090,34 @@ export interface MessageSendAsyncParams {
|
|
|
1760
2090
|
*/
|
|
1761
2091
|
include_return_message_types?: Array<MessageType> | null;
|
|
1762
2092
|
|
|
2093
|
+
/**
|
|
2094
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
2095
|
+
* 'user', 'content': input}].
|
|
2096
|
+
*/
|
|
2097
|
+
input?:
|
|
2098
|
+
| string
|
|
2099
|
+
| Array<
|
|
2100
|
+
| TextContent
|
|
2101
|
+
| ImageContent
|
|
2102
|
+
| ToolCallContent
|
|
2103
|
+
| ToolReturnContent
|
|
2104
|
+
| ReasoningContent
|
|
2105
|
+
| RedactedReasoningContent
|
|
2106
|
+
| OmittedReasoningContent
|
|
2107
|
+
| MessageSendAsyncParams.SummarizedReasoningContent
|
|
2108
|
+
>
|
|
2109
|
+
| null;
|
|
2110
|
+
|
|
1763
2111
|
/**
|
|
1764
2112
|
* Maximum number of steps the agent should take to process the request.
|
|
1765
2113
|
*/
|
|
1766
2114
|
max_steps?: number;
|
|
1767
2115
|
|
|
2116
|
+
/**
|
|
2117
|
+
* The messages to be sent to the agent.
|
|
2118
|
+
*/
|
|
2119
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
2120
|
+
|
|
1768
2121
|
/**
|
|
1769
2122
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
1770
2123
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -1773,12 +2126,48 @@ export interface MessageSendAsyncParams {
|
|
|
1773
2126
|
use_assistant_message?: boolean;
|
|
1774
2127
|
}
|
|
1775
2128
|
|
|
1776
|
-
export
|
|
2129
|
+
export namespace MessageSendAsyncParams {
|
|
1777
2130
|
/**
|
|
1778
|
-
* The
|
|
2131
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
1779
2132
|
*/
|
|
1780
|
-
|
|
2133
|
+
export interface SummarizedReasoningContent {
|
|
2134
|
+
/**
|
|
2135
|
+
* The unique identifier for this reasoning step.
|
|
2136
|
+
*/
|
|
2137
|
+
id: string;
|
|
1781
2138
|
|
|
2139
|
+
/**
|
|
2140
|
+
* Summaries of the reasoning content.
|
|
2141
|
+
*/
|
|
2142
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
2143
|
+
|
|
2144
|
+
/**
|
|
2145
|
+
* The encrypted reasoning content.
|
|
2146
|
+
*/
|
|
2147
|
+
encrypted_content?: string;
|
|
2148
|
+
|
|
2149
|
+
/**
|
|
2150
|
+
* Indicates this is a summarized reasoning step.
|
|
2151
|
+
*/
|
|
2152
|
+
type?: 'summarized_reasoning';
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2155
|
+
export namespace SummarizedReasoningContent {
|
|
2156
|
+
export interface Summary {
|
|
2157
|
+
/**
|
|
2158
|
+
* The index of the summary part.
|
|
2159
|
+
*/
|
|
2160
|
+
index: number;
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* The text of the summary part.
|
|
2164
|
+
*/
|
|
2165
|
+
text: string;
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
export interface MessageStreamParams {
|
|
1782
2171
|
/**
|
|
1783
2172
|
* @deprecated The name of the message argument in the designated message tool.
|
|
1784
2173
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -1793,7 +2182,8 @@ export interface MessageStreamParams {
|
|
|
1793
2182
|
assistant_message_tool_name?: string;
|
|
1794
2183
|
|
|
1795
2184
|
/**
|
|
1796
|
-
* Whether to process the request in the background
|
|
2185
|
+
* Whether to process the request in the background (only used when
|
|
2186
|
+
* streaming=true).
|
|
1797
2187
|
*/
|
|
1798
2188
|
background?: boolean;
|
|
1799
2189
|
|
|
@@ -1805,7 +2195,7 @@ export interface MessageStreamParams {
|
|
|
1805
2195
|
|
|
1806
2196
|
/**
|
|
1807
2197
|
* Whether to include periodic keepalive ping messages in the stream to prevent
|
|
1808
|
-
* connection timeouts.
|
|
2198
|
+
* connection timeouts (only used when streaming=true).
|
|
1809
2199
|
*/
|
|
1810
2200
|
include_pings?: boolean;
|
|
1811
2201
|
|
|
@@ -1815,17 +2205,46 @@ export interface MessageStreamParams {
|
|
|
1815
2205
|
*/
|
|
1816
2206
|
include_return_message_types?: Array<MessageType> | null;
|
|
1817
2207
|
|
|
2208
|
+
/**
|
|
2209
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
2210
|
+
* 'user', 'content': input}].
|
|
2211
|
+
*/
|
|
2212
|
+
input?:
|
|
2213
|
+
| string
|
|
2214
|
+
| Array<
|
|
2215
|
+
| TextContent
|
|
2216
|
+
| ImageContent
|
|
2217
|
+
| ToolCallContent
|
|
2218
|
+
| ToolReturnContent
|
|
2219
|
+
| ReasoningContent
|
|
2220
|
+
| RedactedReasoningContent
|
|
2221
|
+
| OmittedReasoningContent
|
|
2222
|
+
| MessageStreamParams.SummarizedReasoningContent
|
|
2223
|
+
>
|
|
2224
|
+
| null;
|
|
2225
|
+
|
|
1818
2226
|
/**
|
|
1819
2227
|
* Maximum number of steps the agent should take to process the request.
|
|
1820
2228
|
*/
|
|
1821
2229
|
max_steps?: number;
|
|
1822
2230
|
|
|
2231
|
+
/**
|
|
2232
|
+
* The messages to be sent to the agent.
|
|
2233
|
+
*/
|
|
2234
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
2235
|
+
|
|
1823
2236
|
/**
|
|
1824
2237
|
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
1825
|
-
* per step.
|
|
2238
|
+
* per step (only used when streaming=true).
|
|
1826
2239
|
*/
|
|
1827
2240
|
stream_tokens?: boolean;
|
|
1828
2241
|
|
|
2242
|
+
/**
|
|
2243
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
2244
|
+
* returns a complete response.
|
|
2245
|
+
*/
|
|
2246
|
+
streaming?: boolean;
|
|
2247
|
+
|
|
1829
2248
|
/**
|
|
1830
2249
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
1831
2250
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -1834,12 +2253,54 @@ export interface MessageStreamParams {
|
|
|
1834
2253
|
use_assistant_message?: boolean;
|
|
1835
2254
|
}
|
|
1836
2255
|
|
|
2256
|
+
export namespace MessageStreamParams {
|
|
2257
|
+
/**
|
|
2258
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
2259
|
+
*/
|
|
2260
|
+
export interface SummarizedReasoningContent {
|
|
2261
|
+
/**
|
|
2262
|
+
* The unique identifier for this reasoning step.
|
|
2263
|
+
*/
|
|
2264
|
+
id: string;
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* Summaries of the reasoning content.
|
|
2268
|
+
*/
|
|
2269
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
2270
|
+
|
|
2271
|
+
/**
|
|
2272
|
+
* The encrypted reasoning content.
|
|
2273
|
+
*/
|
|
2274
|
+
encrypted_content?: string;
|
|
2275
|
+
|
|
2276
|
+
/**
|
|
2277
|
+
* Indicates this is a summarized reasoning step.
|
|
2278
|
+
*/
|
|
2279
|
+
type?: 'summarized_reasoning';
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
export namespace SummarizedReasoningContent {
|
|
2283
|
+
export interface Summary {
|
|
2284
|
+
/**
|
|
2285
|
+
* The index of the summary part.
|
|
2286
|
+
*/
|
|
2287
|
+
index: number;
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
* The text of the summary part.
|
|
2291
|
+
*/
|
|
2292
|
+
text: string;
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
}
|
|
2296
|
+
|
|
1837
2297
|
export declare namespace Messages {
|
|
1838
2298
|
export {
|
|
1839
2299
|
type ApprovalCreate as ApprovalCreate,
|
|
1840
2300
|
type ApprovalRequestMessage as ApprovalRequestMessage,
|
|
1841
2301
|
type ApprovalResponseMessage as ApprovalResponseMessage,
|
|
1842
2302
|
type AssistantMessage as AssistantMessage,
|
|
2303
|
+
type EventMessage as EventMessage,
|
|
1843
2304
|
type HiddenReasoningMessage as HiddenReasoningMessage,
|
|
1844
2305
|
type ImageContent as ImageContent,
|
|
1845
2306
|
type JobStatus as JobStatus,
|
|
@@ -1859,6 +2320,7 @@ export declare namespace Messages {
|
|
|
1859
2320
|
type ReasoningMessage as ReasoningMessage,
|
|
1860
2321
|
type RedactedReasoningContent as RedactedReasoningContent,
|
|
1861
2322
|
type Run as Run,
|
|
2323
|
+
type SummaryMessage as SummaryMessage,
|
|
1862
2324
|
type SystemMessage as SystemMessage,
|
|
1863
2325
|
type TextContent as TextContent,
|
|
1864
2326
|
type ToolCall as ToolCall,
|
|
@@ -1880,6 +2342,8 @@ export declare namespace Messages {
|
|
|
1880
2342
|
type MessageModifyParams as MessageModifyParams,
|
|
1881
2343
|
type MessageResetParams as MessageResetParams,
|
|
1882
2344
|
type MessageSendParams as MessageSendParams,
|
|
2345
|
+
type MessageSendParamsNonStreaming as MessageSendParamsNonStreaming,
|
|
2346
|
+
type MessageSendParamsStreaming as MessageSendParamsStreaming,
|
|
1883
2347
|
type MessageSendAsyncParams as MessageSendAsyncParams,
|
|
1884
2348
|
type MessageStreamParams as MessageStreamParams,
|
|
1885
2349
|
};
|