letta-client 1.0.0a10__py3-none-any.whl → 1.0.0a11__py3-none-any.whl
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.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- letta_client/_client.py +5 -1
- letta_client/_streaming.py +40 -2
- letta_client/_version.py +1 -1
- letta_client/resources/agents/blocks.py +15 -17
- letta_client/resources/agents/files.py +10 -13
- letta_client/resources/agents/folders.py +10 -13
- letta_client/resources/agents/messages.py +14 -4
- letta_client/resources/agents/tools.py +10 -13
- letta_client/resources/archives.py +10 -12
- letta_client/resources/batches/batches.py +10 -12
- letta_client/resources/batches/messages.py +11 -14
- letta_client/resources/blocks/blocks.py +19 -22
- letta_client/resources/folders/agents.py +10 -13
- letta_client/resources/folders/files.py +9 -12
- letta_client/resources/folders/folders.py +10 -12
- letta_client/resources/identities/blocks.py +7 -7
- letta_client/resources/identities/identities.py +10 -12
- letta_client/resources/runs/runs.py +11 -13
- letta_client/resources/tags.py +10 -13
- letta_client/resources/tools.py +10 -12
- letta_client/types/__init__.py +7 -4
- letta_client/types/agents/__init__.py +2 -3
- letta_client/types/agents/file_list_response.py +14 -3
- letta_client/types/agents/folder_list_response.py +7 -3
- letta_client/types/agents/letta_streaming_response.py +70 -0
- letta_client/types/agents/tool_list_response.py +10 -0
- letta_client/types/archive_list_response.py +10 -0
- letta_client/types/batch_list_response.py +10 -0
- letta_client/types/batches/__init__.py +1 -0
- letta_client/types/batches/message_list_response.py +12 -0
- letta_client/types/{block_list_response.py → block_response.py} +5 -5
- letta_client/types/folder_list_response.py +10 -0
- letta_client/types/folders/agent_list_response.py +2 -1
- letta_client/types/folders/file_list_response.py +7 -4
- letta_client/types/identities/__init__.py +0 -1
- letta_client/types/identity_list_response.py +10 -0
- letta_client/types/run_list_response.py +10 -0
- letta_client/types/tag_list_response.py +2 -1
- letta_client/types/tool.py +25 -25
- letta_client/types/tool_list_response.py +10 -0
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a11.dist-info}/METADATA +1 -1
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a11.dist-info}/RECORD +44 -42
- letta_client/types/agents/block_list_response.py +0 -63
- letta_client/types/agents/block_modify_response.py +0 -63
- letta_client/types/agents/block_retrieve_response.py +0 -63
- letta_client/types/block_create_response.py +0 -63
- letta_client/types/block_modify_response.py +0 -63
- letta_client/types/block_retrieve_response.py +0 -63
- letta_client/types/identities/block_list_response.py +0 -63
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a11.dist-info}/WHEEL +0 -0
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a11.dist-info}/licenses/LICENSE +0 -0
|
@@ -48,10 +48,10 @@ from ..._response import (
|
|
|
48
48
|
async_to_raw_response_wrapper,
|
|
49
49
|
async_to_streamed_response_wrapper,
|
|
50
50
|
)
|
|
51
|
-
from ...
|
|
52
|
-
from ..._base_client import AsyncPaginator, make_request_options
|
|
51
|
+
from ..._base_client import make_request_options
|
|
53
52
|
from ...types.identity import Identity
|
|
54
53
|
from ...types.identity_type import IdentityType
|
|
54
|
+
from ...types.identity_list_response import IdentityListResponse
|
|
55
55
|
from ...types.identity_count_response import IdentityCountResponse
|
|
56
56
|
from ...types.identity_property_param import IdentityPropertyParam
|
|
57
57
|
|
|
@@ -210,7 +210,7 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
210
210
|
extra_query: Query | None = None,
|
|
211
211
|
extra_body: Body | None = None,
|
|
212
212
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
213
|
-
) ->
|
|
213
|
+
) -> IdentityListResponse:
|
|
214
214
|
"""
|
|
215
215
|
Get a list of all identities in the database
|
|
216
216
|
|
|
@@ -238,9 +238,8 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
238
238
|
|
|
239
239
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
240
240
|
"""
|
|
241
|
-
return self.
|
|
241
|
+
return self._get(
|
|
242
242
|
"/v1/identities/",
|
|
243
|
-
page=SyncArrayPage[Identity],
|
|
244
243
|
options=make_request_options(
|
|
245
244
|
extra_headers=extra_headers,
|
|
246
245
|
extra_query=extra_query,
|
|
@@ -261,7 +260,7 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
261
260
|
identity_list_params.IdentityListParams,
|
|
262
261
|
),
|
|
263
262
|
),
|
|
264
|
-
|
|
263
|
+
cast_to=IdentityListResponse,
|
|
265
264
|
)
|
|
266
265
|
|
|
267
266
|
def delete(
|
|
@@ -584,7 +583,7 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
584
583
|
cast_to=Identity,
|
|
585
584
|
)
|
|
586
585
|
|
|
587
|
-
def list(
|
|
586
|
+
async def list(
|
|
588
587
|
self,
|
|
589
588
|
*,
|
|
590
589
|
after: Optional[str] | Omit = omit,
|
|
@@ -602,7 +601,7 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
602
601
|
extra_query: Query | None = None,
|
|
603
602
|
extra_body: Body | None = None,
|
|
604
603
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
605
|
-
) ->
|
|
604
|
+
) -> IdentityListResponse:
|
|
606
605
|
"""
|
|
607
606
|
Get a list of all identities in the database
|
|
608
607
|
|
|
@@ -630,15 +629,14 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
630
629
|
|
|
631
630
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
632
631
|
"""
|
|
633
|
-
return self.
|
|
632
|
+
return await self._get(
|
|
634
633
|
"/v1/identities/",
|
|
635
|
-
page=AsyncArrayPage[Identity],
|
|
636
634
|
options=make_request_options(
|
|
637
635
|
extra_headers=extra_headers,
|
|
638
636
|
extra_query=extra_query,
|
|
639
637
|
extra_body=extra_body,
|
|
640
638
|
timeout=timeout,
|
|
641
|
-
query=
|
|
639
|
+
query=await async_maybe_transform(
|
|
642
640
|
{
|
|
643
641
|
"after": after,
|
|
644
642
|
"before": before,
|
|
@@ -653,7 +651,7 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
653
651
|
identity_list_params.IdentityListParams,
|
|
654
652
|
),
|
|
655
653
|
),
|
|
656
|
-
|
|
654
|
+
cast_to=IdentityListResponse,
|
|
657
655
|
)
|
|
658
656
|
|
|
659
657
|
async def delete(
|
|
@@ -25,7 +25,7 @@ from .usage import (
|
|
|
25
25
|
)
|
|
26
26
|
from ...types import StopReasonType, run_list_params
|
|
27
27
|
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
28
|
-
from ..._utils import maybe_transform
|
|
28
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
29
29
|
from .messages import (
|
|
30
30
|
MessagesResource,
|
|
31
31
|
AsyncMessagesResource,
|
|
@@ -42,10 +42,10 @@ from ..._response import (
|
|
|
42
42
|
async_to_raw_response_wrapper,
|
|
43
43
|
async_to_streamed_response_wrapper,
|
|
44
44
|
)
|
|
45
|
-
from ...
|
|
46
|
-
from ..._base_client import AsyncPaginator, make_request_options
|
|
45
|
+
from ..._base_client import make_request_options
|
|
47
46
|
from ...types.agents.run import Run
|
|
48
47
|
from ...types.stop_reason_type import StopReasonType
|
|
48
|
+
from ...types.run_list_response import RunListResponse
|
|
49
49
|
|
|
50
50
|
__all__ = ["RunsResource", "AsyncRunsResource"]
|
|
51
51
|
|
|
@@ -136,7 +136,7 @@ class RunsResource(SyncAPIResource):
|
|
|
136
136
|
extra_query: Query | None = None,
|
|
137
137
|
extra_body: Body | None = None,
|
|
138
138
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
139
|
-
) ->
|
|
139
|
+
) -> RunListResponse:
|
|
140
140
|
"""
|
|
141
141
|
List all runs.
|
|
142
142
|
|
|
@@ -178,9 +178,8 @@ class RunsResource(SyncAPIResource):
|
|
|
178
178
|
|
|
179
179
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
180
180
|
"""
|
|
181
|
-
return self.
|
|
181
|
+
return self._get(
|
|
182
182
|
"/v1/runs/",
|
|
183
|
-
page=SyncArrayPage[Run],
|
|
184
183
|
options=make_request_options(
|
|
185
184
|
extra_headers=extra_headers,
|
|
186
185
|
extra_query=extra_query,
|
|
@@ -204,7 +203,7 @@ class RunsResource(SyncAPIResource):
|
|
|
204
203
|
run_list_params.RunListParams,
|
|
205
204
|
),
|
|
206
205
|
),
|
|
207
|
-
|
|
206
|
+
cast_to=RunListResponse,
|
|
208
207
|
)
|
|
209
208
|
|
|
210
209
|
|
|
@@ -273,7 +272,7 @@ class AsyncRunsResource(AsyncAPIResource):
|
|
|
273
272
|
cast_to=Run,
|
|
274
273
|
)
|
|
275
274
|
|
|
276
|
-
def list(
|
|
275
|
+
async def list(
|
|
277
276
|
self,
|
|
278
277
|
*,
|
|
279
278
|
active: bool | Omit = omit,
|
|
@@ -294,7 +293,7 @@ class AsyncRunsResource(AsyncAPIResource):
|
|
|
294
293
|
extra_query: Query | None = None,
|
|
295
294
|
extra_body: Body | None = None,
|
|
296
295
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
297
|
-
) ->
|
|
296
|
+
) -> RunListResponse:
|
|
298
297
|
"""
|
|
299
298
|
List all runs.
|
|
300
299
|
|
|
@@ -336,15 +335,14 @@ class AsyncRunsResource(AsyncAPIResource):
|
|
|
336
335
|
|
|
337
336
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
338
337
|
"""
|
|
339
|
-
return self.
|
|
338
|
+
return await self._get(
|
|
340
339
|
"/v1/runs/",
|
|
341
|
-
page=AsyncArrayPage[Run],
|
|
342
340
|
options=make_request_options(
|
|
343
341
|
extra_headers=extra_headers,
|
|
344
342
|
extra_query=extra_query,
|
|
345
343
|
extra_body=extra_body,
|
|
346
344
|
timeout=timeout,
|
|
347
|
-
query=
|
|
345
|
+
query=await async_maybe_transform(
|
|
348
346
|
{
|
|
349
347
|
"active": active,
|
|
350
348
|
"after": after,
|
|
@@ -362,7 +360,7 @@ class AsyncRunsResource(AsyncAPIResource):
|
|
|
362
360
|
run_list_params.RunListParams,
|
|
363
361
|
),
|
|
364
362
|
),
|
|
365
|
-
|
|
363
|
+
cast_to=RunListResponse,
|
|
366
364
|
)
|
|
367
365
|
|
|
368
366
|
|
letta_client/resources/tags.py
CHANGED
|
@@ -9,7 +9,7 @@ import httpx
|
|
|
9
9
|
|
|
10
10
|
from ..types import tag_list_params
|
|
11
11
|
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
12
|
-
from .._utils import maybe_transform
|
|
12
|
+
from .._utils import maybe_transform, async_maybe_transform
|
|
13
13
|
from .._compat import cached_property
|
|
14
14
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
15
15
|
from .._response import (
|
|
@@ -18,8 +18,7 @@ from .._response import (
|
|
|
18
18
|
async_to_raw_response_wrapper,
|
|
19
19
|
async_to_streamed_response_wrapper,
|
|
20
20
|
)
|
|
21
|
-
from ..
|
|
22
|
-
from .._base_client import AsyncPaginator, make_request_options
|
|
21
|
+
from .._base_client import make_request_options
|
|
23
22
|
from ..types.tag_list_response import TagListResponse
|
|
24
23
|
|
|
25
24
|
__all__ = ["TagsResource", "AsyncTagsResource"]
|
|
@@ -61,7 +60,7 @@ class TagsResource(SyncAPIResource):
|
|
|
61
60
|
extra_query: Query | None = None,
|
|
62
61
|
extra_body: Body | None = None,
|
|
63
62
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
64
|
-
) ->
|
|
63
|
+
) -> TagListResponse:
|
|
65
64
|
"""
|
|
66
65
|
Get the list of all agent tags that have been created.
|
|
67
66
|
|
|
@@ -91,9 +90,8 @@ class TagsResource(SyncAPIResource):
|
|
|
91
90
|
|
|
92
91
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
93
92
|
"""
|
|
94
|
-
return self.
|
|
93
|
+
return self._get(
|
|
95
94
|
"/v1/tags/",
|
|
96
|
-
page=SyncArrayPage[TagListResponse],
|
|
97
95
|
options=make_request_options(
|
|
98
96
|
extra_headers=extra_headers,
|
|
99
97
|
extra_query=extra_query,
|
|
@@ -112,7 +110,7 @@ class TagsResource(SyncAPIResource):
|
|
|
112
110
|
tag_list_params.TagListParams,
|
|
113
111
|
),
|
|
114
112
|
),
|
|
115
|
-
|
|
113
|
+
cast_to=TagListResponse,
|
|
116
114
|
)
|
|
117
115
|
|
|
118
116
|
|
|
@@ -136,7 +134,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
136
134
|
"""
|
|
137
135
|
return AsyncTagsResourceWithStreamingResponse(self)
|
|
138
136
|
|
|
139
|
-
def list(
|
|
137
|
+
async def list(
|
|
140
138
|
self,
|
|
141
139
|
*,
|
|
142
140
|
after: Optional[str] | Omit = omit,
|
|
@@ -152,7 +150,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
152
150
|
extra_query: Query | None = None,
|
|
153
151
|
extra_body: Body | None = None,
|
|
154
152
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
155
|
-
) ->
|
|
153
|
+
) -> TagListResponse:
|
|
156
154
|
"""
|
|
157
155
|
Get the list of all agent tags that have been created.
|
|
158
156
|
|
|
@@ -182,15 +180,14 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
182
180
|
|
|
183
181
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
184
182
|
"""
|
|
185
|
-
return self.
|
|
183
|
+
return await self._get(
|
|
186
184
|
"/v1/tags/",
|
|
187
|
-
page=AsyncArrayPage[TagListResponse],
|
|
188
185
|
options=make_request_options(
|
|
189
186
|
extra_headers=extra_headers,
|
|
190
187
|
extra_query=extra_query,
|
|
191
188
|
extra_body=extra_body,
|
|
192
189
|
timeout=timeout,
|
|
193
|
-
query=
|
|
190
|
+
query=await async_maybe_transform(
|
|
194
191
|
{
|
|
195
192
|
"after": after,
|
|
196
193
|
"before": before,
|
|
@@ -203,7 +200,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
203
200
|
tag_list_params.TagListParams,
|
|
204
201
|
),
|
|
205
202
|
),
|
|
206
|
-
|
|
203
|
+
cast_to=TagListResponse,
|
|
207
204
|
)
|
|
208
205
|
|
|
209
206
|
|
letta_client/resources/tools.py
CHANGED
|
@@ -18,9 +18,9 @@ from .._response import (
|
|
|
18
18
|
async_to_raw_response_wrapper,
|
|
19
19
|
async_to_streamed_response_wrapper,
|
|
20
20
|
)
|
|
21
|
-
from ..pagination import SyncArrayPage, AsyncArrayPage
|
|
22
21
|
from ..types.tool import Tool, BaseTool
|
|
23
|
-
from .._base_client import
|
|
22
|
+
from .._base_client import make_request_options
|
|
23
|
+
from ..types.tool_list_response import ToolListResponse
|
|
24
24
|
from ..types.tool_count_response import ToolCountResponse
|
|
25
25
|
from ..types.npm_requirement_param import NpmRequirementParam
|
|
26
26
|
from ..types.pip_requirement_param import PipRequirementParam
|
|
@@ -190,7 +190,7 @@ class ToolsResource(SyncAPIResource):
|
|
|
190
190
|
extra_query: Query | None = None,
|
|
191
191
|
extra_body: Body | None = None,
|
|
192
192
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
193
|
-
) ->
|
|
193
|
+
) -> ToolListResponse:
|
|
194
194
|
"""
|
|
195
195
|
Get a list of all tools available to agents.
|
|
196
196
|
|
|
@@ -230,9 +230,8 @@ class ToolsResource(SyncAPIResource):
|
|
|
230
230
|
|
|
231
231
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
232
232
|
"""
|
|
233
|
-
return self.
|
|
233
|
+
return self._get(
|
|
234
234
|
"/v1/tools/",
|
|
235
|
-
page=SyncArrayPage[Tool],
|
|
236
235
|
options=make_request_options(
|
|
237
236
|
extra_headers=extra_headers,
|
|
238
237
|
extra_query=extra_query,
|
|
@@ -256,7 +255,7 @@ class ToolsResource(SyncAPIResource):
|
|
|
256
255
|
tool_list_params.ToolListParams,
|
|
257
256
|
),
|
|
258
257
|
),
|
|
259
|
-
|
|
258
|
+
cast_to=ToolListResponse,
|
|
260
259
|
)
|
|
261
260
|
|
|
262
261
|
def delete(
|
|
@@ -986,7 +985,7 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
986
985
|
cast_to=Tool,
|
|
987
986
|
)
|
|
988
987
|
|
|
989
|
-
def list(
|
|
988
|
+
async def list(
|
|
990
989
|
self,
|
|
991
990
|
*,
|
|
992
991
|
after: Optional[str] | Omit = omit,
|
|
@@ -1007,7 +1006,7 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
1007
1006
|
extra_query: Query | None = None,
|
|
1008
1007
|
extra_body: Body | None = None,
|
|
1009
1008
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1010
|
-
) ->
|
|
1009
|
+
) -> ToolListResponse:
|
|
1011
1010
|
"""
|
|
1012
1011
|
Get a list of all tools available to agents.
|
|
1013
1012
|
|
|
@@ -1047,15 +1046,14 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
1047
1046
|
|
|
1048
1047
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
1049
1048
|
"""
|
|
1050
|
-
return self.
|
|
1049
|
+
return await self._get(
|
|
1051
1050
|
"/v1/tools/",
|
|
1052
|
-
page=AsyncArrayPage[Tool],
|
|
1053
1051
|
options=make_request_options(
|
|
1054
1052
|
extra_headers=extra_headers,
|
|
1055
1053
|
extra_query=extra_query,
|
|
1056
1054
|
extra_body=extra_body,
|
|
1057
1055
|
timeout=timeout,
|
|
1058
|
-
query=
|
|
1056
|
+
query=await async_maybe_transform(
|
|
1059
1057
|
{
|
|
1060
1058
|
"after": after,
|
|
1061
1059
|
"before": before,
|
|
@@ -1073,7 +1071,7 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
1073
1071
|
tool_list_params.ToolListParams,
|
|
1074
1072
|
),
|
|
1075
1073
|
),
|
|
1076
|
-
|
|
1074
|
+
cast_to=ToolListResponse,
|
|
1077
1075
|
)
|
|
1078
1076
|
|
|
1079
1077
|
async def delete(
|
letta_client/types/__init__.py
CHANGED
|
@@ -16,6 +16,7 @@ from .agent_state import AgentState as AgentState
|
|
|
16
16
|
from .manager_type import ManagerType as ManagerType
|
|
17
17
|
from .identity_type import IdentityType as IdentityType
|
|
18
18
|
from .provider_type import ProviderType as ProviderType
|
|
19
|
+
from .block_response import BlockResponse as BlockResponse
|
|
19
20
|
from .init_tool_rule import InitToolRule as InitToolRule
|
|
20
21
|
from .provider_trace import ProviderTrace as ProviderTrace
|
|
21
22
|
from .child_tool_rule import ChildToolRule as ChildToolRule
|
|
@@ -37,6 +38,7 @@ from .group_list_params import GroupListParams as GroupListParams
|
|
|
37
38
|
from .identity_property import IdentityProperty as IdentityProperty
|
|
38
39
|
from .model_list_params import ModelListParams as ModelListParams
|
|
39
40
|
from .provider_category import ProviderCategory as ProviderCategory
|
|
41
|
+
from .run_list_response import RunListResponse as RunListResponse
|
|
40
42
|
from .tag_list_response import TagListResponse as TagListResponse
|
|
41
43
|
from .tool_count_params import ToolCountParams as ToolCountParams
|
|
42
44
|
from .continue_tool_rule import ContinueToolRule as ContinueToolRule
|
|
@@ -44,6 +46,7 @@ from .create_block_param import CreateBlockParam as CreateBlockParam
|
|
|
44
46
|
from .folder_list_params import FolderListParams as FolderListParams
|
|
45
47
|
from .terminal_tool_rule import TerminalToolRule as TerminalToolRule
|
|
46
48
|
from .tool_create_params import ToolCreateParams as ToolCreateParams
|
|
49
|
+
from .tool_list_response import ToolListResponse as ToolListResponse
|
|
47
50
|
from .tool_modify_params import ToolModifyParams as ToolModifyParams
|
|
48
51
|
from .tool_upsert_params import ToolUpsertParams as ToolUpsertParams
|
|
49
52
|
from .vector_db_provider import VectorDBProvider as VectorDBProvider
|
|
@@ -51,8 +54,8 @@ from .agent_create_params import AgentCreateParams as AgentCreateParams
|
|
|
51
54
|
from .agent_modify_params import AgentModifyParams as AgentModifyParams
|
|
52
55
|
from .archive_list_params import ArchiveListParams as ArchiveListParams
|
|
53
56
|
from .batch_create_params import BatchCreateParams as BatchCreateParams
|
|
57
|
+
from .batch_list_response import BatchListResponse as BatchListResponse
|
|
54
58
|
from .block_create_params import BlockCreateParams as BlockCreateParams
|
|
55
|
-
from .block_list_response import BlockListResponse as BlockListResponse
|
|
56
59
|
from .block_modify_params import BlockModifyParams as BlockModifyParams
|
|
57
60
|
from .group_create_params import GroupCreateParams as GroupCreateParams
|
|
58
61
|
from .group_modify_params import GroupModifyParams as GroupModifyParams
|
|
@@ -62,6 +65,7 @@ from .tool_return_message import ToolReturnMessage as ToolReturnMessage
|
|
|
62
65
|
from .agent_count_response import AgentCountResponse as AgentCountResponse
|
|
63
66
|
from .block_count_response import BlockCountResponse as BlockCountResponse
|
|
64
67
|
from .folder_create_params import FolderCreateParams as FolderCreateParams
|
|
68
|
+
from .folder_list_response import FolderListResponse as FolderListResponse
|
|
65
69
|
from .folder_modify_params import FolderModifyParams as FolderModifyParams
|
|
66
70
|
from .group_count_response import GroupCountResponse as GroupCountResponse
|
|
67
71
|
from .identity_list_params import IdentityListParams as IdentityListParams
|
|
@@ -70,9 +74,8 @@ from .message_create_param import MessageCreateParam as MessageCreateParam
|
|
|
70
74
|
from .text_response_format import TextResponseFormat as TextResponseFormat
|
|
71
75
|
from .agent_retrieve_params import AgentRetrieveParams as AgentRetrieveParams
|
|
72
76
|
from .archive_create_params import ArchiveCreateParams as ArchiveCreateParams
|
|
77
|
+
from .archive_list_response import ArchiveListResponse as ArchiveListResponse
|
|
73
78
|
from .archive_modify_params import ArchiveModifyParams as ArchiveModifyParams
|
|
74
|
-
from .block_create_response import BlockCreateResponse as BlockCreateResponse
|
|
75
|
-
from .block_modify_response import BlockModifyResponse as BlockModifyResponse
|
|
76
79
|
from .child_tool_rule_param import ChildToolRuleParam as ChildToolRuleParam
|
|
77
80
|
from .conditional_tool_rule import ConditionalToolRule as ConditionalToolRule
|
|
78
81
|
from .dynamic_manager_param import DynamicManagerParam as DynamicManagerParam
|
|
@@ -81,10 +84,10 @@ from .npm_requirement_param import NpmRequirementParam as NpmRequirementParam
|
|
|
81
84
|
from .pip_requirement_param import PipRequirementParam as PipRequirementParam
|
|
82
85
|
from .embedding_config_param import EmbeddingConfigParam as EmbeddingConfigParam
|
|
83
86
|
from .identity_create_params import IdentityCreateParams as IdentityCreateParams
|
|
87
|
+
from .identity_list_response import IdentityListResponse as IdentityListResponse
|
|
84
88
|
from .identity_modify_params import IdentityModifyParams as IdentityModifyParams
|
|
85
89
|
from .identity_upsert_params import IdentityUpsertParams as IdentityUpsertParams
|
|
86
90
|
from .parent_tool_rule_param import ParentToolRuleParam as ParentToolRuleParam
|
|
87
|
-
from .block_retrieve_response import BlockRetrieveResponse as BlockRetrieveResponse
|
|
88
91
|
from .identity_count_response import IdentityCountResponse as IdentityCountResponse
|
|
89
92
|
from .identity_property_param import IdentityPropertyParam as IdentityPropertyParam
|
|
90
93
|
from .sleeptime_manager_param import SleeptimeManagerParam as SleeptimeManagerParam
|
|
@@ -31,7 +31,7 @@ from .file_list_response import FileListResponse as FileListResponse
|
|
|
31
31
|
from .file_open_response import FileOpenResponse as FileOpenResponse
|
|
32
32
|
from .folder_list_params import FolderListParams as FolderListParams
|
|
33
33
|
from .text_content_param import TextContentParam as TextContentParam
|
|
34
|
-
from .
|
|
34
|
+
from .tool_list_response import ToolListResponse as ToolListResponse
|
|
35
35
|
from .block_modify_params import BlockModifyParams as BlockModifyParams
|
|
36
36
|
from .image_content_param import ImageContentParam as ImageContentParam
|
|
37
37
|
from .letta_message_union import LettaMessageUnion as LettaMessageUnion
|
|
@@ -41,11 +41,9 @@ from .tool_return_content import ToolReturnContent as ToolReturnContent
|
|
|
41
41
|
from .folder_list_response import FolderListResponse as FolderListResponse
|
|
42
42
|
from .message_reset_params import MessageResetParams as MessageResetParams
|
|
43
43
|
from .approval_create_param import ApprovalCreateParam as ApprovalCreateParam
|
|
44
|
-
from .block_modify_response import BlockModifyResponse as BlockModifyResponse
|
|
45
44
|
from .message_cancel_params import MessageCancelParams as MessageCancelParams
|
|
46
45
|
from .message_modify_params import MessageModifyParams as MessageModifyParams
|
|
47
46
|
from .message_stream_params import MessageStreamParams as MessageStreamParams
|
|
48
|
-
from .block_retrieve_response import BlockRetrieveResponse as BlockRetrieveResponse
|
|
49
47
|
from .file_close_all_response import FileCloseAllResponse as FileCloseAllResponse
|
|
50
48
|
from .message_cancel_response import MessageCancelResponse as MessageCancelResponse
|
|
51
49
|
from .message_modify_response import MessageModifyResponse as MessageModifyResponse
|
|
@@ -53,6 +51,7 @@ from .reasoning_content_param import ReasoningContentParam as ReasoningContentPa
|
|
|
53
51
|
from .tool_call_content_param import ToolCallContentParam as ToolCallContentParam
|
|
54
52
|
from .approval_request_message import ApprovalRequestMessage as ApprovalRequestMessage
|
|
55
53
|
from .hidden_reasoning_message import HiddenReasoningMessage as HiddenReasoningMessage
|
|
54
|
+
from .letta_streaming_response import LettaStreamingResponse as LettaStreamingResponse
|
|
56
55
|
from .approval_response_message import ApprovalResponseMessage as ApprovalResponseMessage
|
|
57
56
|
from .message_send_async_params import MessageSendAsyncParams as MessageSendAsyncParams
|
|
58
57
|
from .omitted_reasoning_content import OmittedReasoningContent as OmittedReasoningContent
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import Optional
|
|
3
|
+
from typing import List, Optional
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
|
|
6
6
|
from ..._models import BaseModel
|
|
7
7
|
|
|
8
|
-
__all__ = ["FileListResponse"]
|
|
8
|
+
__all__ = ["FileListResponse", "File"]
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class File(BaseModel):
|
|
12
12
|
id: str
|
|
13
13
|
"""Unique identifier of the file-agent relationship"""
|
|
14
14
|
|
|
@@ -38,3 +38,14 @@ class FileListResponse(BaseModel):
|
|
|
38
38
|
|
|
39
39
|
visible_content: Optional[str] = None
|
|
40
40
|
"""Portion of the file visible to the agent if open"""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class FileListResponse(BaseModel):
|
|
44
|
+
files: List[File]
|
|
45
|
+
"""List of file attachments for the agent"""
|
|
46
|
+
|
|
47
|
+
has_more: bool
|
|
48
|
+
"""Whether more results exist after this page"""
|
|
49
|
+
|
|
50
|
+
next_cursor: Optional[str] = None
|
|
51
|
+
"""Cursor for fetching the next page (file-agent relationship ID)"""
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import Dict, Optional
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
4
|
from datetime import datetime
|
|
5
|
+
from typing_extensions import TypeAlias
|
|
5
6
|
|
|
6
7
|
from ..._models import BaseModel
|
|
7
8
|
from ..embedding_config import EmbeddingConfig
|
|
8
9
|
from ..vector_db_provider import VectorDBProvider
|
|
9
10
|
|
|
10
|
-
__all__ = ["FolderListResponse"]
|
|
11
|
+
__all__ = ["FolderListResponse", "FolderListResponseItem"]
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
class
|
|
14
|
+
class FolderListResponseItem(BaseModel):
|
|
14
15
|
embedding_config: EmbeddingConfig
|
|
15
16
|
"""The embedding configuration used by the source."""
|
|
16
17
|
|
|
@@ -43,3 +44,6 @@ class FolderListResponse(BaseModel):
|
|
|
43
44
|
|
|
44
45
|
vector_db_provider: Optional[VectorDBProvider] = None
|
|
45
46
|
"""The vector database provider used for this source's passages"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
FolderListResponse: TypeAlias = List[FolderListResponseItem]
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal, Annotated, TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..._utils import PropertyInfo
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
from .user_message import UserMessage
|
|
9
|
+
from .system_message import SystemMessage
|
|
10
|
+
from ..stop_reason_type import StopReasonType
|
|
11
|
+
from .assistant_message import AssistantMessage
|
|
12
|
+
from .reasoning_message import ReasoningMessage
|
|
13
|
+
from .tool_call_message import ToolCallMessage
|
|
14
|
+
from ..tool_return_message import ToolReturnMessage
|
|
15
|
+
from .approval_request_message import ApprovalRequestMessage
|
|
16
|
+
from .hidden_reasoning_message import HiddenReasoningMessage
|
|
17
|
+
from .approval_response_message import ApprovalResponseMessage
|
|
18
|
+
|
|
19
|
+
__all__ = ["LettaStreamingResponse", "LettaPing", "LettaStopReason", "LettaUsageStatistics"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class LettaPing(BaseModel):
|
|
23
|
+
message_type: Literal["ping"]
|
|
24
|
+
"""The type of the message."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class LettaStopReason(BaseModel):
|
|
28
|
+
stop_reason: StopReasonType
|
|
29
|
+
"""The reason why execution stopped."""
|
|
30
|
+
|
|
31
|
+
message_type: Optional[Literal["stop_reason"]] = None
|
|
32
|
+
"""The type of the message."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class LettaUsageStatistics(BaseModel):
|
|
36
|
+
completion_tokens: Optional[int] = None
|
|
37
|
+
"""The number of tokens generated by the agent."""
|
|
38
|
+
|
|
39
|
+
message_type: Optional[Literal["usage_statistics"]] = None
|
|
40
|
+
|
|
41
|
+
prompt_tokens: Optional[int] = None
|
|
42
|
+
"""The number of tokens in the prompt."""
|
|
43
|
+
|
|
44
|
+
run_ids: Optional[List[str]] = None
|
|
45
|
+
"""The background task run IDs associated with the agent interaction"""
|
|
46
|
+
|
|
47
|
+
step_count: Optional[int] = None
|
|
48
|
+
"""The number of steps taken by the agent."""
|
|
49
|
+
|
|
50
|
+
total_tokens: Optional[int] = None
|
|
51
|
+
"""The total number of tokens processed by the agent."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
LettaStreamingResponse: TypeAlias = Annotated[
|
|
55
|
+
Union[
|
|
56
|
+
SystemMessage,
|
|
57
|
+
UserMessage,
|
|
58
|
+
ReasoningMessage,
|
|
59
|
+
HiddenReasoningMessage,
|
|
60
|
+
ToolCallMessage,
|
|
61
|
+
ToolReturnMessage,
|
|
62
|
+
AssistantMessage,
|
|
63
|
+
ApprovalRequestMessage,
|
|
64
|
+
ApprovalResponseMessage,
|
|
65
|
+
LettaPing,
|
|
66
|
+
LettaStopReason,
|
|
67
|
+
LettaUsageStatistics,
|
|
68
|
+
],
|
|
69
|
+
PropertyInfo(discriminator="message_type"),
|
|
70
|
+
]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..tool import Tool
|
|
7
|
+
|
|
8
|
+
__all__ = ["ToolListResponse"]
|
|
9
|
+
|
|
10
|
+
ToolListResponse: TypeAlias = List[Tool]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .archive import Archive
|
|
7
|
+
|
|
8
|
+
__all__ = ["ArchiveListResponse"]
|
|
9
|
+
|
|
10
|
+
ArchiveListResponse: TypeAlias = List[Archive]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .batch_job import BatchJob
|
|
7
|
+
|
|
8
|
+
__all__ = ["BatchListResponse"]
|
|
9
|
+
|
|
10
|
+
BatchListResponse: TypeAlias = List[BatchJob]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
from ..agents.message import Message
|
|
7
|
+
|
|
8
|
+
__all__ = ["MessageListResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MessageListResponse(BaseModel):
|
|
12
|
+
messages: List[Message]
|
|
@@ -4,16 +4,16 @@ from typing import Dict, Optional
|
|
|
4
4
|
|
|
5
5
|
from .._models import BaseModel
|
|
6
6
|
|
|
7
|
-
__all__ = ["
|
|
7
|
+
__all__ = ["BlockResponse"]
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class BlockResponse(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""The id of the block."""
|
|
13
|
+
|
|
11
14
|
value: str
|
|
12
15
|
"""Value of the block."""
|
|
13
16
|
|
|
14
|
-
id: Optional[str] = None
|
|
15
|
-
"""The human-friendly ID of the Block"""
|
|
16
|
-
|
|
17
17
|
base_template_id: Optional[str] = None
|
|
18
18
|
"""(Deprecated) The base template id of the block."""
|
|
19
19
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .folder import Folder
|
|
7
|
+
|
|
8
|
+
__all__ = ["FolderListResponse"]
|
|
9
|
+
|
|
10
|
+
FolderListResponse: TypeAlias = List[Folder]
|