@letta-ai/letta-client 1.4.0 → 1.5.0
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 +14 -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 +54 -2
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +54 -2
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/agents/messages.js +2 -1
- package/resources/agents/messages.js.map +1 -1
- package/resources/agents/messages.mjs +2 -1
- package/resources/agents/messages.mjs.map +1 -1
- package/resources/messages.d.mts +24 -4
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +24 -4
- package/resources/messages.d.ts.map +1 -1
- package/src/resources/agents/agents.ts +2 -0
- package/src/resources/agents/index.ts +1 -0
- package/src/resources/agents/messages.ts +78 -1
- package/src/resources/messages.ts +28 -4
- 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
|
@@ -87,8 +87,13 @@ export class Messages extends APIResource {
|
|
|
87
87
|
/**
|
|
88
88
|
* Summarize an agent's conversation history.
|
|
89
89
|
*/
|
|
90
|
-
compact(
|
|
90
|
+
compact(
|
|
91
|
+
agentID: string,
|
|
92
|
+
body: MessageCompactParams | null | undefined = {},
|
|
93
|
+
options?: RequestOptions,
|
|
94
|
+
): APIPromise<void> {
|
|
91
95
|
return this._client.post(path`/v1/agents/${agentID}/summarize`, {
|
|
96
|
+
body,
|
|
92
97
|
...options,
|
|
93
98
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
94
99
|
});
|
|
@@ -1961,6 +1966,77 @@ export interface MessageCancelParams {
|
|
|
1961
1966
|
run_ids?: Array<string> | null;
|
|
1962
1967
|
}
|
|
1963
1968
|
|
|
1969
|
+
export interface MessageCompactParams {
|
|
1970
|
+
/**
|
|
1971
|
+
* Configuration for conversation compaction / summarization.
|
|
1972
|
+
*
|
|
1973
|
+
* `model` is the only required user-facing field – it specifies the summarizer
|
|
1974
|
+
* model handle (e.g. `"openai/gpt-4o-mini"`). Per-model settings (temperature, max
|
|
1975
|
+
* tokens, etc.) are derived from the default configuration for that handle.
|
|
1976
|
+
*/
|
|
1977
|
+
compaction_settings?: MessageCompactParams.CompactionSettings | null;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
export namespace MessageCompactParams {
|
|
1981
|
+
/**
|
|
1982
|
+
* Configuration for conversation compaction / summarization.
|
|
1983
|
+
*
|
|
1984
|
+
* `model` is the only required user-facing field – it specifies the summarizer
|
|
1985
|
+
* model handle (e.g. `"openai/gpt-4o-mini"`). Per-model settings (temperature, max
|
|
1986
|
+
* tokens, etc.) are derived from the default configuration for that handle.
|
|
1987
|
+
*/
|
|
1988
|
+
export interface CompactionSettings {
|
|
1989
|
+
/**
|
|
1990
|
+
* Model handle to use for summarization (format: provider/model-name).
|
|
1991
|
+
*/
|
|
1992
|
+
model: string;
|
|
1993
|
+
|
|
1994
|
+
/**
|
|
1995
|
+
* The maximum length of the summary in characters. If none, no clipping is
|
|
1996
|
+
* performed.
|
|
1997
|
+
*/
|
|
1998
|
+
clip_chars?: number | null;
|
|
1999
|
+
|
|
2000
|
+
/**
|
|
2001
|
+
* The type of summarization technique use.
|
|
2002
|
+
*/
|
|
2003
|
+
mode?: 'all' | 'sliding_window';
|
|
2004
|
+
|
|
2005
|
+
/**
|
|
2006
|
+
* Optional model settings used to override defaults for the summarizer model.
|
|
2007
|
+
*/
|
|
2008
|
+
model_settings?:
|
|
2009
|
+
| AgentsAPI.OpenAIModelSettings
|
|
2010
|
+
| AgentsAPI.AnthropicModelSettings
|
|
2011
|
+
| AgentsAPI.GoogleAIModelSettings
|
|
2012
|
+
| AgentsAPI.GoogleVertexModelSettings
|
|
2013
|
+
| AgentsAPI.AzureModelSettings
|
|
2014
|
+
| AgentsAPI.XaiModelSettings
|
|
2015
|
+
| AgentsAPI.GroqModelSettings
|
|
2016
|
+
| AgentsAPI.DeepseekModelSettings
|
|
2017
|
+
| AgentsAPI.TogetherModelSettings
|
|
2018
|
+
| AgentsAPI.BedrockModelSettings
|
|
2019
|
+
| null;
|
|
2020
|
+
|
|
2021
|
+
/**
|
|
2022
|
+
* The prompt to use for summarization.
|
|
2023
|
+
*/
|
|
2024
|
+
prompt?: string;
|
|
2025
|
+
|
|
2026
|
+
/**
|
|
2027
|
+
* Whether to include an acknowledgement post-prompt (helps prevent non-summary
|
|
2028
|
+
* outputs).
|
|
2029
|
+
*/
|
|
2030
|
+
prompt_acknowledgement?: boolean;
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* The percentage of the context window to keep post-summarization (only used in
|
|
2034
|
+
* sliding window mode).
|
|
2035
|
+
*/
|
|
2036
|
+
sliding_window_percentage?: number;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
|
|
1964
2040
|
export interface MessageCreateAsyncParams {
|
|
1965
2041
|
/**
|
|
1966
2042
|
* @deprecated The name of the message argument in the designated message tool.
|
|
@@ -2251,6 +2327,7 @@ export declare namespace Messages {
|
|
|
2251
2327
|
type MessageCreateParamsStreaming as MessageCreateParamsStreaming,
|
|
2252
2328
|
type MessageListParams as MessageListParams,
|
|
2253
2329
|
type MessageCancelParams as MessageCancelParams,
|
|
2330
|
+
type MessageCompactParams as MessageCompactParams,
|
|
2254
2331
|
type MessageCreateAsyncParams as MessageCreateAsyncParams,
|
|
2255
2332
|
type MessageResetParams as MessageResetParams,
|
|
2256
2333
|
type MessageStreamParams as MessageStreamParams,
|
|
@@ -97,7 +97,8 @@ export namespace MessageSearchResponse {
|
|
|
97
97
|
/**
|
|
98
98
|
* System message list result with agent context.
|
|
99
99
|
*
|
|
100
|
-
* Shape is identical to UpdateSystemMessage but includes the owning agent_id
|
|
100
|
+
* Shape is identical to UpdateSystemMessage but includes the owning agent_id and
|
|
101
|
+
* message id.
|
|
101
102
|
*/
|
|
102
103
|
export interface SystemMessageListResult {
|
|
103
104
|
/**
|
|
@@ -111,6 +112,11 @@ export namespace MessageSearchResponse {
|
|
|
111
112
|
*/
|
|
112
113
|
created_at: string;
|
|
113
114
|
|
|
115
|
+
/**
|
|
116
|
+
* The unique identifier of the message.
|
|
117
|
+
*/
|
|
118
|
+
message_id: string;
|
|
119
|
+
|
|
114
120
|
/**
|
|
115
121
|
* The unique identifier of the agent that owns the message.
|
|
116
122
|
*/
|
|
@@ -122,7 +128,8 @@ export namespace MessageSearchResponse {
|
|
|
122
128
|
/**
|
|
123
129
|
* User message list result with agent context.
|
|
124
130
|
*
|
|
125
|
-
* Shape is identical to UpdateUserMessage but includes the owning agent_id
|
|
131
|
+
* Shape is identical to UpdateUserMessage but includes the owning agent_id and
|
|
132
|
+
* message id.
|
|
126
133
|
*/
|
|
127
134
|
export interface UserMessageListResult {
|
|
128
135
|
/**
|
|
@@ -136,6 +143,11 @@ export namespace MessageSearchResponse {
|
|
|
136
143
|
*/
|
|
137
144
|
created_at: string;
|
|
138
145
|
|
|
146
|
+
/**
|
|
147
|
+
* The unique identifier of the message.
|
|
148
|
+
*/
|
|
149
|
+
message_id: string;
|
|
150
|
+
|
|
139
151
|
/**
|
|
140
152
|
* The unique identifier of the agent that owns the message.
|
|
141
153
|
*/
|
|
@@ -147,7 +159,8 @@ export namespace MessageSearchResponse {
|
|
|
147
159
|
/**
|
|
148
160
|
* Reasoning message list result with agent context.
|
|
149
161
|
*
|
|
150
|
-
* Shape is identical to UpdateReasoningMessage but includes the owning agent_id
|
|
162
|
+
* Shape is identical to UpdateReasoningMessage but includes the owning agent_id
|
|
163
|
+
* and message id.
|
|
151
164
|
*/
|
|
152
165
|
export interface ReasoningMessageListResult {
|
|
153
166
|
/**
|
|
@@ -155,6 +168,11 @@ export namespace MessageSearchResponse {
|
|
|
155
168
|
*/
|
|
156
169
|
created_at: string;
|
|
157
170
|
|
|
171
|
+
/**
|
|
172
|
+
* The unique identifier of the message.
|
|
173
|
+
*/
|
|
174
|
+
message_id: string;
|
|
175
|
+
|
|
158
176
|
reasoning: string;
|
|
159
177
|
|
|
160
178
|
/**
|
|
@@ -168,7 +186,8 @@ export namespace MessageSearchResponse {
|
|
|
168
186
|
/**
|
|
169
187
|
* Assistant message list result with agent context.
|
|
170
188
|
*
|
|
171
|
-
* Shape is identical to UpdateAssistantMessage but includes the owning agent_id
|
|
189
|
+
* Shape is identical to UpdateAssistantMessage but includes the owning agent_id
|
|
190
|
+
* and message id.
|
|
172
191
|
*/
|
|
173
192
|
export interface AssistantMessageListResult {
|
|
174
193
|
/**
|
|
@@ -182,6 +201,11 @@ export namespace MessageSearchResponse {
|
|
|
182
201
|
*/
|
|
183
202
|
created_at: string;
|
|
184
203
|
|
|
204
|
+
/**
|
|
205
|
+
* The unique identifier of the message.
|
|
206
|
+
*/
|
|
207
|
+
message_id: string;
|
|
208
|
+
|
|
185
209
|
/**
|
|
186
210
|
* The unique identifier of the agent that owns the message.
|
|
187
211
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.5.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.5.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.5.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.
|
|
1
|
+
export const VERSION = '1.5.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|