@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
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
5
6
|
import { type Uploadable } from '../../core/uploads';
|
|
6
7
|
import { buildHeaders } from '../../internal/headers';
|
|
7
8
|
import { RequestOptions } from '../../internal/request-options';
|
|
@@ -16,8 +17,11 @@ export class Files extends APIResource {
|
|
|
16
17
|
folderID: string,
|
|
17
18
|
query: FileListParams | null | undefined = {},
|
|
18
19
|
options?: RequestOptions,
|
|
19
|
-
):
|
|
20
|
-
return this._client.
|
|
20
|
+
): PagePromise<FileListResponsesArrayPage, FileListResponse> {
|
|
21
|
+
return this._client.getAPIList(path`/v1/folders/${folderID}/files`, ArrayPage<FileListResponse>, {
|
|
22
|
+
query,
|
|
23
|
+
...options,
|
|
24
|
+
});
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
/**
|
|
@@ -47,110 +51,21 @@ export class Files extends APIResource {
|
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
export type
|
|
51
|
-
|
|
52
|
-
export namespace FileListResponse {
|
|
53
|
-
/**
|
|
54
|
-
* Representation of a single FileMetadata
|
|
55
|
-
*/
|
|
56
|
-
export interface FileListResponseItem {
|
|
57
|
-
/**
|
|
58
|
-
* The unique identifier of the source associated with the document.
|
|
59
|
-
*/
|
|
60
|
-
source_id: string;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* The human-friendly ID of the File
|
|
64
|
-
*/
|
|
65
|
-
id?: string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Number of chunks that have been embedded.
|
|
69
|
-
*/
|
|
70
|
-
chunks_embedded?: number | null;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Optional full-text content of the file; only populated on demand due to its
|
|
74
|
-
* size.
|
|
75
|
-
*/
|
|
76
|
-
content?: string | null;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* The creation date of the file.
|
|
80
|
-
*/
|
|
81
|
-
created_at?: string | null;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Optional error message if the file failed processing.
|
|
85
|
-
*/
|
|
86
|
-
error_message?: string | null;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* The creation date of the file.
|
|
90
|
-
*/
|
|
91
|
-
file_creation_date?: string | null;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* The last modified date of the file.
|
|
95
|
-
*/
|
|
96
|
-
file_last_modified_date?: string | null;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* The name of the file.
|
|
100
|
-
*/
|
|
101
|
-
file_name?: string | null;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* The path to the file.
|
|
105
|
-
*/
|
|
106
|
-
file_path?: string | null;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* The size of the file in bytes.
|
|
110
|
-
*/
|
|
111
|
-
file_size?: number | null;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* The type of the file (MIME type).
|
|
115
|
-
*/
|
|
116
|
-
file_type?: string | null;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* The original name of the file as uploaded.
|
|
120
|
-
*/
|
|
121
|
-
original_file_name?: string | null;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The current processing status of the file (e.g. pending, parsing, embedding,
|
|
125
|
-
* completed, error).
|
|
126
|
-
*/
|
|
127
|
-
processing_status?: 'pending' | 'parsing' | 'embedding' | 'completed' | 'error';
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Total number of chunks for the file.
|
|
131
|
-
*/
|
|
132
|
-
total_chunks?: number | null;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* The update date of the file.
|
|
136
|
-
*/
|
|
137
|
-
updated_at?: string | null;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
54
|
+
export type FileListResponsesArrayPage = ArrayPage<FileListResponse>;
|
|
140
55
|
|
|
141
56
|
/**
|
|
142
57
|
* Representation of a single FileMetadata
|
|
143
58
|
*/
|
|
144
|
-
export interface
|
|
59
|
+
export interface FileListResponse {
|
|
145
60
|
/**
|
|
146
|
-
* The
|
|
61
|
+
* The human-friendly ID of the File
|
|
147
62
|
*/
|
|
148
|
-
|
|
63
|
+
id: string;
|
|
149
64
|
|
|
150
65
|
/**
|
|
151
|
-
* The
|
|
66
|
+
* The unique identifier of the source associated with the document.
|
|
152
67
|
*/
|
|
153
|
-
|
|
68
|
+
source_id: string;
|
|
154
69
|
|
|
155
70
|
/**
|
|
156
71
|
* Number of chunks that have been embedded.
|
|
@@ -225,39 +140,98 @@ export interface FileUploadResponse {
|
|
|
225
140
|
updated_at?: string | null;
|
|
226
141
|
}
|
|
227
142
|
|
|
228
|
-
|
|
143
|
+
/**
|
|
144
|
+
* Representation of a single FileMetadata
|
|
145
|
+
*/
|
|
146
|
+
export interface FileUploadResponse {
|
|
229
147
|
/**
|
|
230
|
-
*
|
|
231
|
-
* specified sort order
|
|
148
|
+
* The human-friendly ID of the File
|
|
232
149
|
*/
|
|
233
|
-
|
|
150
|
+
id: string;
|
|
234
151
|
|
|
235
152
|
/**
|
|
236
|
-
*
|
|
237
|
-
* the specified sort order
|
|
153
|
+
* The unique identifier of the source associated with the document.
|
|
238
154
|
*/
|
|
239
|
-
|
|
155
|
+
source_id: string;
|
|
240
156
|
|
|
241
157
|
/**
|
|
242
|
-
*
|
|
158
|
+
* Number of chunks that have been embedded.
|
|
243
159
|
*/
|
|
244
|
-
|
|
160
|
+
chunks_embedded?: number | null;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Optional full-text content of the file; only populated on demand due to its
|
|
164
|
+
* size.
|
|
165
|
+
*/
|
|
166
|
+
content?: string | null;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The creation date of the file.
|
|
170
|
+
*/
|
|
171
|
+
created_at?: string | null;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Optional error message if the file failed processing.
|
|
175
|
+
*/
|
|
176
|
+
error_message?: string | null;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The creation date of the file.
|
|
180
|
+
*/
|
|
181
|
+
file_creation_date?: string | null;
|
|
245
182
|
|
|
246
183
|
/**
|
|
247
|
-
*
|
|
184
|
+
* The last modified date of the file.
|
|
185
|
+
*/
|
|
186
|
+
file_last_modified_date?: string | null;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The name of the file.
|
|
190
|
+
*/
|
|
191
|
+
file_name?: string | null;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The path to the file.
|
|
248
195
|
*/
|
|
249
|
-
|
|
196
|
+
file_path?: string | null;
|
|
250
197
|
|
|
251
198
|
/**
|
|
252
|
-
*
|
|
253
|
-
* first
|
|
199
|
+
* The size of the file in bytes.
|
|
254
200
|
*/
|
|
255
|
-
|
|
201
|
+
file_size?: number | null;
|
|
256
202
|
|
|
257
203
|
/**
|
|
258
|
-
*
|
|
204
|
+
* The type of the file (MIME type).
|
|
259
205
|
*/
|
|
260
|
-
|
|
206
|
+
file_type?: string | null;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The original name of the file as uploaded.
|
|
210
|
+
*/
|
|
211
|
+
original_file_name?: string | null;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The current processing status of the file (e.g. pending, parsing, embedding,
|
|
215
|
+
* completed, error).
|
|
216
|
+
*/
|
|
217
|
+
processing_status?: 'pending' | 'parsing' | 'embedding' | 'completed' | 'error';
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Total number of chunks for the file.
|
|
221
|
+
*/
|
|
222
|
+
total_chunks?: number | null;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The update date of the file.
|
|
226
|
+
*/
|
|
227
|
+
updated_at?: string | null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface FileListParams extends ArrayPageParams {
|
|
231
|
+
/**
|
|
232
|
+
* Whether to include full file content
|
|
233
|
+
*/
|
|
234
|
+
include_content?: boolean;
|
|
261
235
|
}
|
|
262
236
|
|
|
263
237
|
export interface FileDeleteParams {
|
|
@@ -288,6 +262,7 @@ export declare namespace Files {
|
|
|
288
262
|
export {
|
|
289
263
|
type FileListResponse as FileListResponse,
|
|
290
264
|
type FileUploadResponse as FileUploadResponse,
|
|
265
|
+
type FileListResponsesArrayPage as FileListResponsesArrayPage,
|
|
291
266
|
type FileListParams as FileListParams,
|
|
292
267
|
type FileDeleteParams as FileDeleteParams,
|
|
293
268
|
type FileUploadParams as FileUploadParams,
|
|
@@ -8,12 +8,14 @@ import {
|
|
|
8
8
|
FileDeleteParams,
|
|
9
9
|
FileListParams,
|
|
10
10
|
FileListResponse,
|
|
11
|
+
FileListResponsesArrayPage,
|
|
11
12
|
FileUploadParams,
|
|
12
13
|
FileUploadResponse,
|
|
13
14
|
Files,
|
|
14
15
|
} from './files';
|
|
15
16
|
import * as ModelsAPI from '../models/models';
|
|
16
17
|
import { APIPromise } from '../../core/api-promise';
|
|
18
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
17
19
|
import { RequestOptions } from '../../internal/request-options';
|
|
18
20
|
import { path } from '../../internal/utils/path';
|
|
19
21
|
|
|
@@ -41,8 +43,8 @@ export class Folders extends APIResource {
|
|
|
41
43
|
list(
|
|
42
44
|
query: FolderListParams | null | undefined = {},
|
|
43
45
|
options?: RequestOptions,
|
|
44
|
-
):
|
|
45
|
-
return this._client.
|
|
46
|
+
): PagePromise<FoldersArrayPage, Folder> {
|
|
47
|
+
return this._client.getAPIList('/v1/folders/', ArrayPage<Folder>, { query, ...options });
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
/**
|
|
@@ -52,13 +54,6 @@ export class Folders extends APIResource {
|
|
|
52
54
|
return this._client.delete(path`/v1/folders/${folderID}`, options);
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
/**
|
|
56
|
-
* Count all data folders created by a user.
|
|
57
|
-
*/
|
|
58
|
-
count(options?: RequestOptions): APIPromise<FolderCountResponse> {
|
|
59
|
-
return this._client.get('/v1/folders/count', options);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
57
|
/**
|
|
63
58
|
* Update the name or documentation of an existing data folder.
|
|
64
59
|
*/
|
|
@@ -67,6 +62,8 @@ export class Folders extends APIResource {
|
|
|
67
62
|
}
|
|
68
63
|
}
|
|
69
64
|
|
|
65
|
+
export type FoldersArrayPage = ArrayPage<Folder>;
|
|
66
|
+
|
|
70
67
|
/**
|
|
71
68
|
* Representation of a folder, which is a collection of files and passages.
|
|
72
69
|
*
|
|
@@ -77,6 +74,11 @@ export class Folders extends APIResource {
|
|
|
77
74
|
* of the folder.
|
|
78
75
|
*/
|
|
79
76
|
export interface Folder {
|
|
77
|
+
/**
|
|
78
|
+
* The human-friendly ID of the Source
|
|
79
|
+
*/
|
|
80
|
+
id: string;
|
|
81
|
+
|
|
80
82
|
/**
|
|
81
83
|
* The embedding configuration used by the folder.
|
|
82
84
|
*/
|
|
@@ -87,11 +89,6 @@ export interface Folder {
|
|
|
87
89
|
*/
|
|
88
90
|
name: string;
|
|
89
91
|
|
|
90
|
-
/**
|
|
91
|
-
* The human-friendly ID of the Source
|
|
92
|
-
*/
|
|
93
|
-
id?: string;
|
|
94
|
-
|
|
95
92
|
/**
|
|
96
93
|
* The timestamp when the folder was created.
|
|
97
94
|
*/
|
|
@@ -128,12 +125,8 @@ export interface Folder {
|
|
|
128
125
|
updated_at?: string | null;
|
|
129
126
|
}
|
|
130
127
|
|
|
131
|
-
export type FolderListResponse = Array<Folder>;
|
|
132
|
-
|
|
133
128
|
export type FolderDeleteResponse = unknown;
|
|
134
129
|
|
|
135
|
-
export type FolderCountResponse = number;
|
|
136
|
-
|
|
137
130
|
export interface FolderCreateParams {
|
|
138
131
|
/**
|
|
139
132
|
* The name of the source.
|
|
@@ -171,39 +164,11 @@ export interface FolderCreateParams {
|
|
|
171
164
|
metadata?: { [key: string]: unknown } | null;
|
|
172
165
|
}
|
|
173
166
|
|
|
174
|
-
export interface FolderListParams {
|
|
175
|
-
/**
|
|
176
|
-
* Folder ID cursor for pagination. Returns folders that come after this folder ID
|
|
177
|
-
* in the specified sort order
|
|
178
|
-
*/
|
|
179
|
-
after?: string | null;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Folder ID cursor for pagination. Returns folders that come before this folder ID
|
|
183
|
-
* in the specified sort order
|
|
184
|
-
*/
|
|
185
|
-
before?: string | null;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Maximum number of folders to return
|
|
189
|
-
*/
|
|
190
|
-
limit?: number | null;
|
|
191
|
-
|
|
167
|
+
export interface FolderListParams extends ArrayPageParams {
|
|
192
168
|
/**
|
|
193
169
|
* Folder name to filter by
|
|
194
170
|
*/
|
|
195
171
|
name?: string | null;
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Sort order for folders by creation time. 'asc' for oldest first, 'desc' for
|
|
199
|
-
* newest first
|
|
200
|
-
*/
|
|
201
|
-
order?: 'asc' | 'desc';
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Field to sort by
|
|
205
|
-
*/
|
|
206
|
-
order_by?: 'created_at';
|
|
207
172
|
}
|
|
208
173
|
|
|
209
174
|
export interface FolderModifyParams {
|
|
@@ -239,9 +204,8 @@ Folders.Agents = Agents;
|
|
|
239
204
|
export declare namespace Folders {
|
|
240
205
|
export {
|
|
241
206
|
type Folder as Folder,
|
|
242
|
-
type FolderListResponse as FolderListResponse,
|
|
243
207
|
type FolderDeleteResponse as FolderDeleteResponse,
|
|
244
|
-
type
|
|
208
|
+
type FoldersArrayPage as FoldersArrayPage,
|
|
245
209
|
type FolderCreateParams as FolderCreateParams,
|
|
246
210
|
type FolderListParams as FolderListParams,
|
|
247
211
|
type FolderModifyParams as FolderModifyParams,
|
|
@@ -251,6 +215,7 @@ export declare namespace Folders {
|
|
|
251
215
|
Files as Files,
|
|
252
216
|
type FileListResponse as FileListResponse,
|
|
253
217
|
type FileUploadResponse as FileUploadResponse,
|
|
218
|
+
type FileListResponsesArrayPage as FileListResponsesArrayPage,
|
|
254
219
|
type FileListParams as FileListParams,
|
|
255
220
|
type FileDeleteParams as FileDeleteParams,
|
|
256
221
|
type FileUploadParams as FileUploadParams,
|
|
@@ -8,14 +8,14 @@ export {
|
|
|
8
8
|
type FileListParams,
|
|
9
9
|
type FileDeleteParams,
|
|
10
10
|
type FileUploadParams,
|
|
11
|
+
type FileListResponsesArrayPage,
|
|
11
12
|
} from './files';
|
|
12
13
|
export {
|
|
13
14
|
Folders,
|
|
14
15
|
type Folder,
|
|
15
|
-
type FolderListResponse,
|
|
16
16
|
type FolderDeleteResponse,
|
|
17
|
-
type FolderCountResponse,
|
|
18
17
|
type FolderCreateParams,
|
|
19
18
|
type FolderListParams,
|
|
20
19
|
type FolderModifyParams,
|
|
20
|
+
type FoldersArrayPage,
|
|
21
21
|
} from './folders';
|
|
@@ -51,13 +51,6 @@ export class Groups extends APIResource {
|
|
|
51
51
|
return this._client.delete(path`/v1/groups/${groupID}`, options);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
/**
|
|
55
|
-
* Get the count of all groups associated with a given user.
|
|
56
|
-
*/
|
|
57
|
-
count(options?: RequestOptions): APIPromise<GroupCountResponse> {
|
|
58
|
-
return this._client.get('/v1/groups/count', options);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
54
|
/**
|
|
62
55
|
* Create a new multi-agent group with the specified configuration.
|
|
63
56
|
*/
|
|
@@ -195,8 +188,6 @@ export interface VoiceSleeptimeManager {
|
|
|
195
188
|
|
|
196
189
|
export type GroupDeleteResponse = unknown;
|
|
197
190
|
|
|
198
|
-
export type GroupCountResponse = number;
|
|
199
|
-
|
|
200
191
|
export interface GroupCreateParams {
|
|
201
192
|
agent_ids: Array<string>;
|
|
202
193
|
|
|
@@ -324,7 +315,6 @@ export declare namespace Groups {
|
|
|
324
315
|
type SupervisorManager as SupervisorManager,
|
|
325
316
|
type VoiceSleeptimeManager as VoiceSleeptimeManager,
|
|
326
317
|
type GroupDeleteResponse as GroupDeleteResponse,
|
|
327
|
-
type GroupCountResponse as GroupCountResponse,
|
|
328
318
|
type GroupsArrayPage as GroupsArrayPage,
|
|
329
319
|
type GroupCreateParams as GroupCreateParams,
|
|
330
320
|
type GroupListParams as GroupListParams,
|
|
@@ -95,7 +95,9 @@ export type MessageModifyResponse =
|
|
|
95
95
|
| ToolsAPI.ToolReturnMessage
|
|
96
96
|
| MessagesAPI.AssistantMessage
|
|
97
97
|
| MessagesAPI.ApprovalRequestMessage
|
|
98
|
-
| MessagesAPI.ApprovalResponseMessage
|
|
98
|
+
| MessagesAPI.ApprovalResponseMessage
|
|
99
|
+
| MessagesAPI.SummaryMessage
|
|
100
|
+
| MessagesAPI.EventMessage;
|
|
99
101
|
|
|
100
102
|
export type MessageResetResponse = unknown;
|
|
101
103
|
|
|
@@ -198,11 +200,6 @@ export declare namespace MessageModifyParams {
|
|
|
198
200
|
}
|
|
199
201
|
|
|
200
202
|
export interface MessageSendParams {
|
|
201
|
-
/**
|
|
202
|
-
* The messages to be sent to the agent.
|
|
203
|
-
*/
|
|
204
|
-
messages: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate>;
|
|
205
|
-
|
|
206
203
|
/**
|
|
207
204
|
* @deprecated The name of the message argument in the designated message tool.
|
|
208
205
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -228,11 +225,34 @@ export interface MessageSendParams {
|
|
|
228
225
|
*/
|
|
229
226
|
include_return_message_types?: Array<MessagesAPI.MessageType> | null;
|
|
230
227
|
|
|
228
|
+
/**
|
|
229
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
230
|
+
* 'user', 'content': input}].
|
|
231
|
+
*/
|
|
232
|
+
input?:
|
|
233
|
+
| string
|
|
234
|
+
| Array<
|
|
235
|
+
| MessagesAPI.TextContent
|
|
236
|
+
| MessagesAPI.ImageContent
|
|
237
|
+
| MessagesAPI.ToolCallContent
|
|
238
|
+
| MessagesAPI.ToolReturnContent
|
|
239
|
+
| MessagesAPI.ReasoningContent
|
|
240
|
+
| MessagesAPI.RedactedReasoningContent
|
|
241
|
+
| MessagesAPI.OmittedReasoningContent
|
|
242
|
+
| MessageSendParams.SummarizedReasoningContent
|
|
243
|
+
>
|
|
244
|
+
| null;
|
|
245
|
+
|
|
231
246
|
/**
|
|
232
247
|
* Maximum number of steps the agent should take to process the request.
|
|
233
248
|
*/
|
|
234
249
|
max_steps?: number;
|
|
235
250
|
|
|
251
|
+
/**
|
|
252
|
+
* The messages to be sent to the agent.
|
|
253
|
+
*/
|
|
254
|
+
messages?: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate> | null;
|
|
255
|
+
|
|
236
256
|
/**
|
|
237
257
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
238
258
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -241,12 +261,48 @@ export interface MessageSendParams {
|
|
|
241
261
|
use_assistant_message?: boolean;
|
|
242
262
|
}
|
|
243
263
|
|
|
244
|
-
export
|
|
264
|
+
export namespace MessageSendParams {
|
|
245
265
|
/**
|
|
246
|
-
* The
|
|
266
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
247
267
|
*/
|
|
248
|
-
|
|
268
|
+
export interface SummarizedReasoningContent {
|
|
269
|
+
/**
|
|
270
|
+
* The unique identifier for this reasoning step.
|
|
271
|
+
*/
|
|
272
|
+
id: string;
|
|
249
273
|
|
|
274
|
+
/**
|
|
275
|
+
* Summaries of the reasoning content.
|
|
276
|
+
*/
|
|
277
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* The encrypted reasoning content.
|
|
281
|
+
*/
|
|
282
|
+
encrypted_content?: string;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Indicates this is a summarized reasoning step.
|
|
286
|
+
*/
|
|
287
|
+
type?: 'summarized_reasoning';
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export namespace SummarizedReasoningContent {
|
|
291
|
+
export interface Summary {
|
|
292
|
+
/**
|
|
293
|
+
* The index of the summary part.
|
|
294
|
+
*/
|
|
295
|
+
index: number;
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* The text of the summary part.
|
|
299
|
+
*/
|
|
300
|
+
text: string;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export interface MessageStreamParams {
|
|
250
306
|
/**
|
|
251
307
|
* @deprecated The name of the message argument in the designated message tool.
|
|
252
308
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -261,7 +317,8 @@ export interface MessageStreamParams {
|
|
|
261
317
|
assistant_message_tool_name?: string;
|
|
262
318
|
|
|
263
319
|
/**
|
|
264
|
-
* Whether to process the request in the background
|
|
320
|
+
* Whether to process the request in the background (only used when
|
|
321
|
+
* streaming=true).
|
|
265
322
|
*/
|
|
266
323
|
background?: boolean;
|
|
267
324
|
|
|
@@ -273,7 +330,7 @@ export interface MessageStreamParams {
|
|
|
273
330
|
|
|
274
331
|
/**
|
|
275
332
|
* Whether to include periodic keepalive ping messages in the stream to prevent
|
|
276
|
-
* connection timeouts.
|
|
333
|
+
* connection timeouts (only used when streaming=true).
|
|
277
334
|
*/
|
|
278
335
|
include_pings?: boolean;
|
|
279
336
|
|
|
@@ -283,17 +340,46 @@ export interface MessageStreamParams {
|
|
|
283
340
|
*/
|
|
284
341
|
include_return_message_types?: Array<MessagesAPI.MessageType> | null;
|
|
285
342
|
|
|
343
|
+
/**
|
|
344
|
+
* Syntactic sugar for a single user message. Equivalent to messages=[{'role':
|
|
345
|
+
* 'user', 'content': input}].
|
|
346
|
+
*/
|
|
347
|
+
input?:
|
|
348
|
+
| string
|
|
349
|
+
| Array<
|
|
350
|
+
| MessagesAPI.TextContent
|
|
351
|
+
| MessagesAPI.ImageContent
|
|
352
|
+
| MessagesAPI.ToolCallContent
|
|
353
|
+
| MessagesAPI.ToolReturnContent
|
|
354
|
+
| MessagesAPI.ReasoningContent
|
|
355
|
+
| MessagesAPI.RedactedReasoningContent
|
|
356
|
+
| MessagesAPI.OmittedReasoningContent
|
|
357
|
+
| MessageStreamParams.SummarizedReasoningContent
|
|
358
|
+
>
|
|
359
|
+
| null;
|
|
360
|
+
|
|
286
361
|
/**
|
|
287
362
|
* Maximum number of steps the agent should take to process the request.
|
|
288
363
|
*/
|
|
289
364
|
max_steps?: number;
|
|
290
365
|
|
|
366
|
+
/**
|
|
367
|
+
* The messages to be sent to the agent.
|
|
368
|
+
*/
|
|
369
|
+
messages?: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate> | null;
|
|
370
|
+
|
|
291
371
|
/**
|
|
292
372
|
* Flag to determine if individual tokens should be streamed, rather than streaming
|
|
293
|
-
* per step.
|
|
373
|
+
* per step (only used when streaming=true).
|
|
294
374
|
*/
|
|
295
375
|
stream_tokens?: boolean;
|
|
296
376
|
|
|
377
|
+
/**
|
|
378
|
+
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
379
|
+
* returns a complete response.
|
|
380
|
+
*/
|
|
381
|
+
streaming?: boolean;
|
|
382
|
+
|
|
297
383
|
/**
|
|
298
384
|
* @deprecated Whether the server should parse specific tool call arguments
|
|
299
385
|
* (default `send_message`) as `AssistantMessage` objects. Still supported for
|
|
@@ -302,6 +388,47 @@ export interface MessageStreamParams {
|
|
|
302
388
|
use_assistant_message?: boolean;
|
|
303
389
|
}
|
|
304
390
|
|
|
391
|
+
export namespace MessageStreamParams {
|
|
392
|
+
/**
|
|
393
|
+
* The style of reasoning content returned by the OpenAI Responses API
|
|
394
|
+
*/
|
|
395
|
+
export interface SummarizedReasoningContent {
|
|
396
|
+
/**
|
|
397
|
+
* The unique identifier for this reasoning step.
|
|
398
|
+
*/
|
|
399
|
+
id: string;
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Summaries of the reasoning content.
|
|
403
|
+
*/
|
|
404
|
+
summary: Array<SummarizedReasoningContent.Summary>;
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* The encrypted reasoning content.
|
|
408
|
+
*/
|
|
409
|
+
encrypted_content?: string;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Indicates this is a summarized reasoning step.
|
|
413
|
+
*/
|
|
414
|
+
type?: 'summarized_reasoning';
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export namespace SummarizedReasoningContent {
|
|
418
|
+
export interface Summary {
|
|
419
|
+
/**
|
|
420
|
+
* The index of the summary part.
|
|
421
|
+
*/
|
|
422
|
+
index: number;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* The text of the summary part.
|
|
426
|
+
*/
|
|
427
|
+
text: string;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
305
432
|
export declare namespace Messages {
|
|
306
433
|
export {
|
|
307
434
|
type MessageModifyResponse as MessageModifyResponse,
|