@letta-ai/letta-client 1.0.0-alpha.14 → 1.0.0-alpha.15
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 +10 -0
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +2 -2
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +2 -2
- 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/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- 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 +258 -21
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +258 -21
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/batches/batches.d.mts +44 -4
- package/resources/batches/batches.d.mts.map +1 -1
- package/resources/batches/batches.d.ts +44 -4
- package/resources/batches/batches.d.ts.map +1 -1
- package/resources/batches/batches.js.map +1 -1
- package/resources/batches/batches.mjs.map +1 -1
- package/resources/groups/messages.d.mts +88 -8
- package/resources/groups/messages.d.mts.map +1 -1
- package/resources/groups/messages.d.ts +88 -8
- package/resources/groups/messages.d.ts.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/src/resources/agents/agents.ts +4 -0
- package/src/resources/agents/index.ts +2 -0
- package/src/resources/agents/messages.ts +382 -23
- package/src/resources/batches/batches.ts +64 -5
- package/src/resources/groups/messages.ts +129 -9
- package/src/resources/steps/messages.ts +3 -1
- 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
|
@@ -330,6 +330,36 @@ export interface AssistantMessage {
|
|
|
330
330
|
step_id?: string | null;
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
+
/**
|
|
334
|
+
* A message for notifying the developer that an event that has occured (e.g. a
|
|
335
|
+
* compaction). Events are NOT part of the context window.
|
|
336
|
+
*/
|
|
337
|
+
export interface EventMessage {
|
|
338
|
+
id: string;
|
|
339
|
+
|
|
340
|
+
date: string;
|
|
341
|
+
|
|
342
|
+
event_data: { [key: string]: unknown };
|
|
343
|
+
|
|
344
|
+
event_type: 'compaction';
|
|
345
|
+
|
|
346
|
+
is_err?: boolean | null;
|
|
347
|
+
|
|
348
|
+
message_type?: 'event';
|
|
349
|
+
|
|
350
|
+
name?: string | null;
|
|
351
|
+
|
|
352
|
+
otid?: string | null;
|
|
353
|
+
|
|
354
|
+
run_id?: string | null;
|
|
355
|
+
|
|
356
|
+
sender_id?: string | null;
|
|
357
|
+
|
|
358
|
+
seq_id?: number | null;
|
|
359
|
+
|
|
360
|
+
step_id?: string | null;
|
|
361
|
+
}
|
|
362
|
+
|
|
333
363
|
/**
|
|
334
364
|
* Representation of an agent's internal reasoning where reasoning content has been
|
|
335
365
|
* hidden from the response.
|
|
@@ -487,14 +517,11 @@ export type LettaMessageUnion =
|
|
|
487
517
|
| ToolsAPI.ToolReturnMessage
|
|
488
518
|
| AssistantMessage
|
|
489
519
|
| ApprovalRequestMessage
|
|
490
|
-
| ApprovalResponseMessage
|
|
520
|
+
| ApprovalResponseMessage
|
|
521
|
+
| SummaryMessage
|
|
522
|
+
| EventMessage;
|
|
491
523
|
|
|
492
524
|
export interface LettaRequest {
|
|
493
|
-
/**
|
|
494
|
-
* The messages to be sent to the agent.
|
|
495
|
-
*/
|
|
496
|
-
messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
|
|
497
|
-
|
|
498
525
|
/**
|
|
499
526
|
* @deprecated The name of the message argument in the designated message tool.
|
|
500
527
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -520,11 +547,34 @@ export interface LettaRequest {
|
|
|
520
547
|
*/
|
|
521
548
|
include_return_message_types?: Array<MessageType> | null;
|
|
522
549
|
|
|
550
|
+
/**
|
|
551
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
552
|
+
* 'user', 'content': input}].
|
|
553
|
+
*/
|
|
554
|
+
input?:
|
|
555
|
+
| string
|
|
556
|
+
| Array<
|
|
557
|
+
| TextContent
|
|
558
|
+
| ImageContent
|
|
559
|
+
| ToolCallContent
|
|
560
|
+
| ToolReturnContent
|
|
561
|
+
| ReasoningContent
|
|
562
|
+
| RedactedReasoningContent
|
|
563
|
+
| OmittedReasoningContent
|
|
564
|
+
| LettaRequest.SummarizedReasoningContent
|
|
565
|
+
>
|
|
566
|
+
| null;
|
|
567
|
+
|
|
523
568
|
/**
|
|
524
569
|
* Maximum number of steps the agent should take to process the request.
|
|
525
570
|
*/
|
|
526
571
|
max_steps?: number;
|
|
527
572
|
|
|
573
|
+
/**
|
|
574
|
+
* The messages to be sent to the agent.
|
|
575
|
+
*/
|
|
576
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
577
|
+
|
|
528
578
|
/**
|
|
529
579
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
530
580
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -533,6 +583,47 @@ export interface LettaRequest {
|
|
|
533
583
|
use_assistant_message?: boolean;
|
|
534
584
|
}
|
|
535
585
|
|
|
586
|
+
export namespace LettaRequest {
|
|
587
|
+
/**
|
|
588
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
589
|
+
*/
|
|
590
|
+
export interface SummarizedReasoningContent {
|
|
591
|
+
/**
|
|
592
|
+
* The unique identifier for this reasoning step.
|
|
593
|
+
*/
|
|
594
|
+
id: string;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Summaries of the reasoning content.
|
|
598
|
+
*/
|
|
599
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* The encrypted reasoning content.
|
|
603
|
+
*/
|
|
604
|
+
encrypted_content?: string;
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* Indicates this is a summarized reasoning step.
|
|
608
|
+
*/
|
|
609
|
+
type?: 'summarized_reasoning';
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export namespace SummarizedReasoningContent {
|
|
613
|
+
export interface Summary {
|
|
614
|
+
/**
|
|
615
|
+
* The index of the summary part.
|
|
616
|
+
*/
|
|
617
|
+
index: number;
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* The text of the summary part.
|
|
621
|
+
*/
|
|
622
|
+
text: string;
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
536
627
|
/**
|
|
537
628
|
* Response object from an agent interaction, consisting of the new messages
|
|
538
629
|
* generated by the agent and usage statistics. The type of the returned messages
|
|
@@ -609,11 +700,6 @@ export namespace LettaResponse {
|
|
|
609
700
|
}
|
|
610
701
|
|
|
611
702
|
export interface LettaStreamingRequest {
|
|
612
|
-
/**
|
|
613
|
-
* The messages to be sent to the agent.
|
|
614
|
-
*/
|
|
615
|
-
messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
|
|
616
|
-
|
|
617
703
|
/**
|
|
618
704
|
* @deprecated The name of the message argument in the designated message tool.
|
|
619
705
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -650,11 +736,34 @@ export interface LettaStreamingRequest {
|
|
|
650
736
|
*/
|
|
651
737
|
include_return_message_types?: Array<MessageType> | null;
|
|
652
738
|
|
|
739
|
+
/**
|
|
740
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
741
|
+
* 'user', 'content': input}].
|
|
742
|
+
*/
|
|
743
|
+
input?:
|
|
744
|
+
| string
|
|
745
|
+
| Array<
|
|
746
|
+
| TextContent
|
|
747
|
+
| ImageContent
|
|
748
|
+
| ToolCallContent
|
|
749
|
+
| ToolReturnContent
|
|
750
|
+
| ReasoningContent
|
|
751
|
+
| RedactedReasoningContent
|
|
752
|
+
| OmittedReasoningContent
|
|
753
|
+
| LettaStreamingRequest.SummarizedReasoningContent
|
|
754
|
+
>
|
|
755
|
+
| null;
|
|
756
|
+
|
|
653
757
|
/**
|
|
654
758
|
* Maximum number of steps the agent should take to process the request.
|
|
655
759
|
*/
|
|
656
760
|
max_steps?: number;
|
|
657
761
|
|
|
762
|
+
/**
|
|
763
|
+
* The messages to be sent to the agent.
|
|
764
|
+
*/
|
|
765
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
766
|
+
|
|
658
767
|
/**
|
|
659
768
|
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
660
769
|
* per step.
|
|
@@ -669,6 +778,47 @@ export interface LettaStreamingRequest {
|
|
|
669
778
|
use_assistant_message?: boolean;
|
|
670
779
|
}
|
|
671
780
|
|
|
781
|
+
export namespace LettaStreamingRequest {
|
|
782
|
+
/**
|
|
783
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
784
|
+
*/
|
|
785
|
+
export interface SummarizedReasoningContent {
|
|
786
|
+
/**
|
|
787
|
+
* The unique identifier for this reasoning step.
|
|
788
|
+
*/
|
|
789
|
+
id: string;
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Summaries of the reasoning content.
|
|
793
|
+
*/
|
|
794
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* The encrypted reasoning content.
|
|
798
|
+
*/
|
|
799
|
+
encrypted_content?: string;
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Indicates this is a summarized reasoning step.
|
|
803
|
+
*/
|
|
804
|
+
type?: 'summarized_reasoning';
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
export namespace SummarizedReasoningContent {
|
|
808
|
+
export interface Summary {
|
|
809
|
+
/**
|
|
810
|
+
* The index of the summary part.
|
|
811
|
+
*/
|
|
812
|
+
index: number;
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* The text of the summary part.
|
|
816
|
+
*/
|
|
817
|
+
text: string;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
672
822
|
/**
|
|
673
823
|
* Streaming response type for Server-Sent Events (SSE) endpoints. Each event in
|
|
674
824
|
* the stream will be one of these types.
|
|
@@ -1283,6 +1433,34 @@ export namespace Run {
|
|
|
1283
1433
|
}
|
|
1284
1434
|
}
|
|
1285
1435
|
|
|
1436
|
+
/**
|
|
1437
|
+
* A message representing a summary of the conversation. Sent to the LLM as a user
|
|
1438
|
+
* or system message depending on the provider.
|
|
1439
|
+
*/
|
|
1440
|
+
export interface SummaryMessage {
|
|
1441
|
+
id: string;
|
|
1442
|
+
|
|
1443
|
+
date: string;
|
|
1444
|
+
|
|
1445
|
+
summary: string;
|
|
1446
|
+
|
|
1447
|
+
is_err?: boolean | null;
|
|
1448
|
+
|
|
1449
|
+
message_type?: 'summary';
|
|
1450
|
+
|
|
1451
|
+
name?: string | null;
|
|
1452
|
+
|
|
1453
|
+
otid?: string | null;
|
|
1454
|
+
|
|
1455
|
+
run_id?: string | null;
|
|
1456
|
+
|
|
1457
|
+
sender_id?: string | null;
|
|
1458
|
+
|
|
1459
|
+
seq_id?: number | null;
|
|
1460
|
+
|
|
1461
|
+
step_id?: string | null;
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1286
1464
|
/**
|
|
1287
1465
|
* A message generated by the system. Never streamed back on a response, only used
|
|
1288
1466
|
* for cursor pagination.
|
|
@@ -1557,7 +1735,9 @@ export type MessageModifyResponse =
|
|
|
1557
1735
|
| ToolsAPI.ToolReturnMessage
|
|
1558
1736
|
| AssistantMessage
|
|
1559
1737
|
| ApprovalRequestMessage
|
|
1560
|
-
| ApprovalResponseMessage
|
|
1738
|
+
| ApprovalResponseMessage
|
|
1739
|
+
| SummaryMessage
|
|
1740
|
+
| EventMessage;
|
|
1561
1741
|
|
|
1562
1742
|
export interface MessageListParams extends ArrayPageParams {
|
|
1563
1743
|
/**
|
|
@@ -1681,11 +1861,6 @@ export interface MessageResetParams {
|
|
|
1681
1861
|
}
|
|
1682
1862
|
|
|
1683
1863
|
export interface MessageSendParams {
|
|
1684
|
-
/**
|
|
1685
|
-
* The messages to be sent to the agent.
|
|
1686
|
-
*/
|
|
1687
|
-
messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
|
|
1688
|
-
|
|
1689
1864
|
/**
|
|
1690
1865
|
* @deprecated The name of the message argument in the designated message tool.
|
|
1691
1866
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -1711,11 +1886,34 @@ export interface MessageSendParams {
|
|
|
1711
1886
|
*/
|
|
1712
1887
|
include_return_message_types?: Array<MessageType> | null;
|
|
1713
1888
|
|
|
1889
|
+
/**
|
|
1890
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
1891
|
+
* 'user', 'content': input}].
|
|
1892
|
+
*/
|
|
1893
|
+
input?:
|
|
1894
|
+
| string
|
|
1895
|
+
| Array<
|
|
1896
|
+
| TextContent
|
|
1897
|
+
| ImageContent
|
|
1898
|
+
| ToolCallContent
|
|
1899
|
+
| ToolReturnContent
|
|
1900
|
+
| ReasoningContent
|
|
1901
|
+
| RedactedReasoningContent
|
|
1902
|
+
| OmittedReasoningContent
|
|
1903
|
+
| MessageSendParams.SummarizedReasoningContent
|
|
1904
|
+
>
|
|
1905
|
+
| null;
|
|
1906
|
+
|
|
1714
1907
|
/**
|
|
1715
1908
|
* Maximum number of steps the agent should take to process the request.
|
|
1716
1909
|
*/
|
|
1717
1910
|
max_steps?: number;
|
|
1718
1911
|
|
|
1912
|
+
/**
|
|
1913
|
+
* The messages to be sent to the agent.
|
|
1914
|
+
*/
|
|
1915
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
1916
|
+
|
|
1719
1917
|
/**
|
|
1720
1918
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
1721
1919
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -1724,12 +1922,48 @@ export interface MessageSendParams {
|
|
|
1724
1922
|
use_assistant_message?: boolean;
|
|
1725
1923
|
}
|
|
1726
1924
|
|
|
1727
|
-
export
|
|
1925
|
+
export namespace MessageSendParams {
|
|
1728
1926
|
/**
|
|
1729
|
-
* The
|
|
1927
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
1730
1928
|
*/
|
|
1731
|
-
|
|
1929
|
+
export interface SummarizedReasoningContent {
|
|
1930
|
+
/**
|
|
1931
|
+
* The unique identifier for this reasoning step.
|
|
1932
|
+
*/
|
|
1933
|
+
id: string;
|
|
1934
|
+
|
|
1935
|
+
/**
|
|
1936
|
+
* Summaries of the reasoning content.
|
|
1937
|
+
*/
|
|
1938
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* The encrypted reasoning content.
|
|
1942
|
+
*/
|
|
1943
|
+
encrypted_content?: string;
|
|
1944
|
+
|
|
1945
|
+
/**
|
|
1946
|
+
* Indicates this is a summarized reasoning step.
|
|
1947
|
+
*/
|
|
1948
|
+
type?: 'summarized_reasoning';
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
export namespace SummarizedReasoningContent {
|
|
1952
|
+
export interface Summary {
|
|
1953
|
+
/**
|
|
1954
|
+
* The index of the summary part.
|
|
1955
|
+
*/
|
|
1956
|
+
index: number;
|
|
1732
1957
|
|
|
1958
|
+
/**
|
|
1959
|
+
* The text of the summary part.
|
|
1960
|
+
*/
|
|
1961
|
+
text: string;
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
export interface MessageSendAsyncParams {
|
|
1733
1967
|
/**
|
|
1734
1968
|
* @deprecated The name of the message argument in the designated message tool.
|
|
1735
1969
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -1760,11 +1994,34 @@ export interface MessageSendAsyncParams {
|
|
|
1760
1994
|
*/
|
|
1761
1995
|
include_return_message_types?: Array<MessageType> | null;
|
|
1762
1996
|
|
|
1997
|
+
/**
|
|
1998
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
1999
|
+
* 'user', 'content': input}].
|
|
2000
|
+
*/
|
|
2001
|
+
input?:
|
|
2002
|
+
| string
|
|
2003
|
+
| Array<
|
|
2004
|
+
| TextContent
|
|
2005
|
+
| ImageContent
|
|
2006
|
+
| ToolCallContent
|
|
2007
|
+
| ToolReturnContent
|
|
2008
|
+
| ReasoningContent
|
|
2009
|
+
| RedactedReasoningContent
|
|
2010
|
+
| OmittedReasoningContent
|
|
2011
|
+
| MessageSendAsyncParams.SummarizedReasoningContent
|
|
2012
|
+
>
|
|
2013
|
+
| null;
|
|
2014
|
+
|
|
1763
2015
|
/**
|
|
1764
2016
|
* Maximum number of steps the agent should take to process the request.
|
|
1765
2017
|
*/
|
|
1766
2018
|
max_steps?: number;
|
|
1767
2019
|
|
|
2020
|
+
/**
|
|
2021
|
+
* The messages to be sent to the agent.
|
|
2022
|
+
*/
|
|
2023
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
2024
|
+
|
|
1768
2025
|
/**
|
|
1769
2026
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
1770
2027
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -1773,12 +2030,48 @@ export interface MessageSendAsyncParams {
|
|
|
1773
2030
|
use_assistant_message?: boolean;
|
|
1774
2031
|
}
|
|
1775
2032
|
|
|
1776
|
-
export
|
|
2033
|
+
export namespace MessageSendAsyncParams {
|
|
1777
2034
|
/**
|
|
1778
|
-
* The
|
|
2035
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
1779
2036
|
*/
|
|
1780
|
-
|
|
2037
|
+
export interface SummarizedReasoningContent {
|
|
2038
|
+
/**
|
|
2039
|
+
* The unique identifier for this reasoning step.
|
|
2040
|
+
*/
|
|
2041
|
+
id: string;
|
|
2042
|
+
|
|
2043
|
+
/**
|
|
2044
|
+
* Summaries of the reasoning content.
|
|
2045
|
+
*/
|
|
2046
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
1781
2047
|
|
|
2048
|
+
/**
|
|
2049
|
+
* The encrypted reasoning content.
|
|
2050
|
+
*/
|
|
2051
|
+
encrypted_content?: string;
|
|
2052
|
+
|
|
2053
|
+
/**
|
|
2054
|
+
* Indicates this is a summarized reasoning step.
|
|
2055
|
+
*/
|
|
2056
|
+
type?: 'summarized_reasoning';
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
export namespace SummarizedReasoningContent {
|
|
2060
|
+
export interface Summary {
|
|
2061
|
+
/**
|
|
2062
|
+
* The index of the summary part.
|
|
2063
|
+
*/
|
|
2064
|
+
index: number;
|
|
2065
|
+
|
|
2066
|
+
/**
|
|
2067
|
+
* The text of the summary part.
|
|
2068
|
+
*/
|
|
2069
|
+
text: string;
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
export interface MessageStreamParams {
|
|
1782
2075
|
/**
|
|
1783
2076
|
* @deprecated The name of the message argument in the designated message tool.
|
|
1784
2077
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -1815,11 +2108,34 @@ export interface MessageStreamParams {
|
|
|
1815
2108
|
*/
|
|
1816
2109
|
include_return_message_types?: Array<MessageType> | null;
|
|
1817
2110
|
|
|
2111
|
+
/**
|
|
2112
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
2113
|
+
* 'user', 'content': input}].
|
|
2114
|
+
*/
|
|
2115
|
+
input?:
|
|
2116
|
+
| string
|
|
2117
|
+
| Array<
|
|
2118
|
+
| TextContent
|
|
2119
|
+
| ImageContent
|
|
2120
|
+
| ToolCallContent
|
|
2121
|
+
| ToolReturnContent
|
|
2122
|
+
| ReasoningContent
|
|
2123
|
+
| RedactedReasoningContent
|
|
2124
|
+
| OmittedReasoningContent
|
|
2125
|
+
| MessageStreamParams.SummarizedReasoningContent
|
|
2126
|
+
>
|
|
2127
|
+
| null;
|
|
2128
|
+
|
|
1818
2129
|
/**
|
|
1819
2130
|
* Maximum number of steps the agent should take to process the request.
|
|
1820
2131
|
*/
|
|
1821
2132
|
max_steps?: number;
|
|
1822
2133
|
|
|
2134
|
+
/**
|
|
2135
|
+
* The messages to be sent to the agent.
|
|
2136
|
+
*/
|
|
2137
|
+
messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
|
|
2138
|
+
|
|
1823
2139
|
/**
|
|
1824
2140
|
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
1825
2141
|
* per step.
|
|
@@ -1834,12 +2150,54 @@ export interface MessageStreamParams {
|
|
|
1834
2150
|
use_assistant_message?: boolean;
|
|
1835
2151
|
}
|
|
1836
2152
|
|
|
2153
|
+
export namespace MessageStreamParams {
|
|
2154
|
+
/**
|
|
2155
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
2156
|
+
*/
|
|
2157
|
+
export interface SummarizedReasoningContent {
|
|
2158
|
+
/**
|
|
2159
|
+
* The unique identifier for this reasoning step.
|
|
2160
|
+
*/
|
|
2161
|
+
id: string;
|
|
2162
|
+
|
|
2163
|
+
/**
|
|
2164
|
+
* Summaries of the reasoning content.
|
|
2165
|
+
*/
|
|
2166
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* The encrypted reasoning content.
|
|
2170
|
+
*/
|
|
2171
|
+
encrypted_content?: string;
|
|
2172
|
+
|
|
2173
|
+
/**
|
|
2174
|
+
* Indicates this is a summarized reasoning step.
|
|
2175
|
+
*/
|
|
2176
|
+
type?: 'summarized_reasoning';
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
export namespace SummarizedReasoningContent {
|
|
2180
|
+
export interface Summary {
|
|
2181
|
+
/**
|
|
2182
|
+
* The index of the summary part.
|
|
2183
|
+
*/
|
|
2184
|
+
index: number;
|
|
2185
|
+
|
|
2186
|
+
/**
|
|
2187
|
+
* The text of the summary part.
|
|
2188
|
+
*/
|
|
2189
|
+
text: string;
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
|
|
1837
2194
|
export declare namespace Messages {
|
|
1838
2195
|
export {
|
|
1839
2196
|
type ApprovalCreate as ApprovalCreate,
|
|
1840
2197
|
type ApprovalRequestMessage as ApprovalRequestMessage,
|
|
1841
2198
|
type ApprovalResponseMessage as ApprovalResponseMessage,
|
|
1842
2199
|
type AssistantMessage as AssistantMessage,
|
|
2200
|
+
type EventMessage as EventMessage,
|
|
1843
2201
|
type HiddenReasoningMessage as HiddenReasoningMessage,
|
|
1844
2202
|
type ImageContent as ImageContent,
|
|
1845
2203
|
type JobStatus as JobStatus,
|
|
@@ -1859,6 +2217,7 @@ export declare namespace Messages {
|
|
|
1859
2217
|
type ReasoningMessage as ReasoningMessage,
|
|
1860
2218
|
type RedactedReasoningContent as RedactedReasoningContent,
|
|
1861
2219
|
type Run as Run,
|
|
2220
|
+
type SummaryMessage as SummaryMessage,
|
|
1862
2221
|
type SystemMessage as SystemMessage,
|
|
1863
2222
|
type TextContent as TextContent,
|
|
1864
2223
|
type ToolCall as ToolCall,
|
|
@@ -165,11 +165,6 @@ export namespace BatchCreateParams {
|
|
|
165
165
|
*/
|
|
166
166
|
agent_id: string;
|
|
167
167
|
|
|
168
|
-
/**
|
|
169
|
-
* The messages to be sent to the agent.
|
|
170
|
-
*/
|
|
171
|
-
messages: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate>;
|
|
172
|
-
|
|
173
168
|
/**
|
|
174
169
|
* @deprecated The name of the message argument in the designated message tool.
|
|
175
170
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -195,11 +190,34 @@ export namespace BatchCreateParams {
|
|
|
195
190
|
*/
|
|
196
191
|
include_return_message_types?: Array<MessagesAPI.MessageType> | null;
|
|
197
192
|
|
|
193
|
+
/**
|
|
194
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
195
|
+
* 'user', 'content': input}].
|
|
196
|
+
*/
|
|
197
|
+
input?:
|
|
198
|
+
| string
|
|
199
|
+
| Array<
|
|
200
|
+
| MessagesAPI.TextContent
|
|
201
|
+
| MessagesAPI.ImageContent
|
|
202
|
+
| MessagesAPI.ToolCallContent
|
|
203
|
+
| MessagesAPI.ToolReturnContent
|
|
204
|
+
| MessagesAPI.ReasoningContent
|
|
205
|
+
| MessagesAPI.RedactedReasoningContent
|
|
206
|
+
| MessagesAPI.OmittedReasoningContent
|
|
207
|
+
| Request.SummarizedReasoningContent
|
|
208
|
+
>
|
|
209
|
+
| null;
|
|
210
|
+
|
|
198
211
|
/**
|
|
199
212
|
* Maximum number of steps the agent should take to process the request.
|
|
200
213
|
*/
|
|
201
214
|
max_steps?: number;
|
|
202
215
|
|
|
216
|
+
/**
|
|
217
|
+
* The messages to be sent to the agent.
|
|
218
|
+
*/
|
|
219
|
+
messages?: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate> | null;
|
|
220
|
+
|
|
203
221
|
/**
|
|
204
222
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
205
223
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -207,6 +225,47 @@ export namespace BatchCreateParams {
|
|
|
207
225
|
*/
|
|
208
226
|
use_assistant_message?: boolean;
|
|
209
227
|
}
|
|
228
|
+
|
|
229
|
+
export namespace Request {
|
|
230
|
+
/**
|
|
231
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
232
|
+
*/
|
|
233
|
+
export interface SummarizedReasoningContent {
|
|
234
|
+
/**
|
|
235
|
+
* The unique identifier for this reasoning step.
|
|
236
|
+
*/
|
|
237
|
+
id: string;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Summaries of the reasoning content.
|
|
241
|
+
*/
|
|
242
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* The encrypted reasoning content.
|
|
246
|
+
*/
|
|
247
|
+
encrypted_content?: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Indicates this is a summarized reasoning step.
|
|
251
|
+
*/
|
|
252
|
+
type?: 'summarized_reasoning';
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export namespace SummarizedReasoningContent {
|
|
256
|
+
export interface Summary {
|
|
257
|
+
/**
|
|
258
|
+
* The index of the summary part.
|
|
259
|
+
*/
|
|
260
|
+
index: number;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* The text of the summary part.
|
|
264
|
+
*/
|
|
265
|
+
text: string;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
210
269
|
}
|
|
211
270
|
|
|
212
271
|
export interface BatchListParams {
|