letta-client 1.0.0a8__py3-none-any.whl → 1.0.0a10__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/_version.py +1 -1
- letta_client/pagination.py +174 -1
- letta_client/resources/agents/agents.py +396 -396
- letta_client/resources/agents/blocks.py +200 -190
- letta_client/resources/agents/files.py +13 -10
- letta_client/resources/agents/messages.py +367 -367
- letta_client/resources/agents/tools.py +6 -6
- letta_client/resources/archives.py +121 -111
- letta_client/resources/batches/messages.py +14 -11
- letta_client/resources/blocks/blocks.py +241 -222
- letta_client/resources/folders/folders.py +133 -133
- letta_client/resources/groups/groups.py +141 -141
- letta_client/resources/groups/messages.py +198 -198
- letta_client/resources/identities/blocks.py +7 -7
- letta_client/resources/identities/identities.py +141 -141
- letta_client/resources/tools.py +794 -194
- letta_client/types/__init__.py +11 -8
- letta_client/types/{agent_update_params.py → agent_modify_params.py} +2 -2
- letta_client/types/agent_state.py +6 -3
- letta_client/types/agents/__init__.py +6 -3
- letta_client/types/agents/block.py +6 -3
- letta_client/types/agents/block_list_response.py +63 -0
- letta_client/types/agents/{block_update_params.py → block_modify_params.py} +8 -5
- letta_client/types/agents/block_modify_response.py +63 -0
- letta_client/types/agents/block_retrieve_response.py +63 -0
- letta_client/types/agents/file_list_response.py +3 -14
- letta_client/types/agents/{message_update_params.py → message_modify_params.py} +2 -2
- letta_client/types/agents/{message_update_response.py → message_modify_response.py} +2 -2
- letta_client/types/archive_list_params.py +3 -0
- letta_client/types/{archive_update_params.py → archive_modify_params.py} +2 -2
- letta_client/types/batches/__init__.py +0 -1
- letta_client/types/block_create_params.py +6 -3
- letta_client/types/block_create_response.py +63 -0
- letta_client/types/block_list_response.py +63 -0
- letta_client/types/{block_update_params.py → block_modify_params.py} +8 -5
- letta_client/types/block_modify_response.py +63 -0
- letta_client/types/block_retrieve_response.py +63 -0
- letta_client/types/create_block_param.py +6 -3
- letta_client/types/{folder_update_params.py → folder_modify_params.py} +2 -2
- letta_client/types/{group_update_params.py → group_modify_params.py} +2 -2
- letta_client/types/groups/__init__.py +2 -2
- letta_client/types/groups/{message_update_params.py → message_modify_params.py} +2 -2
- letta_client/types/groups/{message_update_response.py → message_modify_response.py} +2 -2
- letta_client/types/identities/__init__.py +1 -0
- letta_client/types/identities/block_list_response.py +63 -0
- letta_client/types/{identity_update_params.py → identity_modify_params.py} +2 -2
- letta_client/types/tool.py +106 -2
- letta_client/types/{tool_update_params.py → tool_modify_params.py} +2 -2
- {letta_client-1.0.0a8.dist-info → letta_client-1.0.0a10.dist-info}/METADATA +1 -1
- {letta_client-1.0.0a8.dist-info → letta_client-1.0.0a10.dist-info}/RECORD +52 -46
- letta_client/types/archive_list_response.py +0 -10
- letta_client/types/batches/message_list_response.py +0 -12
- {letta_client-1.0.0a8.dist-info → letta_client-1.0.0a10.dist-info}/WHEEL +0 -0
- {letta_client-1.0.0a8.dist-info → letta_client-1.0.0a10.dist-info}/licenses/LICENSE +0 -0
|
@@ -7,7 +7,7 @@ from typing_extensions import Literal
|
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
9
9
|
|
|
10
|
-
from ...types import ManagerType, group_list_params, group_create_params,
|
|
10
|
+
from ...types import ManagerType, group_list_params, group_create_params, group_modify_params
|
|
11
11
|
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
12
12
|
from ..._utils import maybe_transform, strip_not_given, async_maybe_transform
|
|
13
13
|
from .messages import (
|
|
@@ -157,70 +157,6 @@ class GroupsResource(SyncAPIResource):
|
|
|
157
157
|
cast_to=Group,
|
|
158
158
|
)
|
|
159
159
|
|
|
160
|
-
def update(
|
|
161
|
-
self,
|
|
162
|
-
group_id: str,
|
|
163
|
-
*,
|
|
164
|
-
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
165
|
-
description: Optional[str] | Omit = omit,
|
|
166
|
-
manager_config: Optional[group_update_params.ManagerConfig] | Omit = omit,
|
|
167
|
-
project_id: Optional[str] | Omit = omit,
|
|
168
|
-
shared_block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
169
|
-
x_project: str | Omit = omit,
|
|
170
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
171
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
172
|
-
extra_headers: Headers | None = None,
|
|
173
|
-
extra_query: Query | None = None,
|
|
174
|
-
extra_body: Body | None = None,
|
|
175
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
176
|
-
) -> Group:
|
|
177
|
-
"""
|
|
178
|
-
Create a new multi-agent group with the specified configuration.
|
|
179
|
-
|
|
180
|
-
Args:
|
|
181
|
-
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
182
|
-
|
|
183
|
-
agent_ids
|
|
184
|
-
|
|
185
|
-
description
|
|
186
|
-
|
|
187
|
-
manager_config
|
|
188
|
-
|
|
189
|
-
project_id: The associated project id.
|
|
190
|
-
|
|
191
|
-
shared_block_ids
|
|
192
|
-
|
|
193
|
-
x_project: The project slug to associate with the group (cloud only).
|
|
194
|
-
|
|
195
|
-
extra_headers: Send extra headers
|
|
196
|
-
|
|
197
|
-
extra_query: Add additional query parameters to the request
|
|
198
|
-
|
|
199
|
-
extra_body: Add additional JSON properties to the request
|
|
200
|
-
|
|
201
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
202
|
-
"""
|
|
203
|
-
if not group_id:
|
|
204
|
-
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
205
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
206
|
-
return self._patch(
|
|
207
|
-
f"/v1/groups/{group_id}",
|
|
208
|
-
body=maybe_transform(
|
|
209
|
-
{
|
|
210
|
-
"agent_ids": agent_ids,
|
|
211
|
-
"description": description,
|
|
212
|
-
"manager_config": manager_config,
|
|
213
|
-
"project_id": project_id,
|
|
214
|
-
"shared_block_ids": shared_block_ids,
|
|
215
|
-
},
|
|
216
|
-
group_update_params.GroupUpdateParams,
|
|
217
|
-
),
|
|
218
|
-
options=make_request_options(
|
|
219
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
220
|
-
),
|
|
221
|
-
cast_to=Group,
|
|
222
|
-
)
|
|
223
|
-
|
|
224
160
|
def list(
|
|
225
161
|
self,
|
|
226
162
|
*,
|
|
@@ -345,6 +281,70 @@ class GroupsResource(SyncAPIResource):
|
|
|
345
281
|
cast_to=int,
|
|
346
282
|
)
|
|
347
283
|
|
|
284
|
+
def modify(
|
|
285
|
+
self,
|
|
286
|
+
group_id: str,
|
|
287
|
+
*,
|
|
288
|
+
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
289
|
+
description: Optional[str] | Omit = omit,
|
|
290
|
+
manager_config: Optional[group_modify_params.ManagerConfig] | Omit = omit,
|
|
291
|
+
project_id: Optional[str] | Omit = omit,
|
|
292
|
+
shared_block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
293
|
+
x_project: str | Omit = omit,
|
|
294
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
295
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
296
|
+
extra_headers: Headers | None = None,
|
|
297
|
+
extra_query: Query | None = None,
|
|
298
|
+
extra_body: Body | None = None,
|
|
299
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
300
|
+
) -> Group:
|
|
301
|
+
"""
|
|
302
|
+
Create a new multi-agent group with the specified configuration.
|
|
303
|
+
|
|
304
|
+
Args:
|
|
305
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
306
|
+
|
|
307
|
+
agent_ids
|
|
308
|
+
|
|
309
|
+
description
|
|
310
|
+
|
|
311
|
+
manager_config
|
|
312
|
+
|
|
313
|
+
project_id: The associated project id.
|
|
314
|
+
|
|
315
|
+
shared_block_ids
|
|
316
|
+
|
|
317
|
+
x_project: The project slug to associate with the group (cloud only).
|
|
318
|
+
|
|
319
|
+
extra_headers: Send extra headers
|
|
320
|
+
|
|
321
|
+
extra_query: Add additional query parameters to the request
|
|
322
|
+
|
|
323
|
+
extra_body: Add additional JSON properties to the request
|
|
324
|
+
|
|
325
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
326
|
+
"""
|
|
327
|
+
if not group_id:
|
|
328
|
+
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
329
|
+
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
330
|
+
return self._patch(
|
|
331
|
+
f"/v1/groups/{group_id}",
|
|
332
|
+
body=maybe_transform(
|
|
333
|
+
{
|
|
334
|
+
"agent_ids": agent_ids,
|
|
335
|
+
"description": description,
|
|
336
|
+
"manager_config": manager_config,
|
|
337
|
+
"project_id": project_id,
|
|
338
|
+
"shared_block_ids": shared_block_ids,
|
|
339
|
+
},
|
|
340
|
+
group_modify_params.GroupModifyParams,
|
|
341
|
+
),
|
|
342
|
+
options=make_request_options(
|
|
343
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
344
|
+
),
|
|
345
|
+
cast_to=Group,
|
|
346
|
+
)
|
|
347
|
+
|
|
348
348
|
|
|
349
349
|
class AsyncGroupsResource(AsyncAPIResource):
|
|
350
350
|
@cached_property
|
|
@@ -468,70 +468,6 @@ class AsyncGroupsResource(AsyncAPIResource):
|
|
|
468
468
|
cast_to=Group,
|
|
469
469
|
)
|
|
470
470
|
|
|
471
|
-
async def update(
|
|
472
|
-
self,
|
|
473
|
-
group_id: str,
|
|
474
|
-
*,
|
|
475
|
-
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
476
|
-
description: Optional[str] | Omit = omit,
|
|
477
|
-
manager_config: Optional[group_update_params.ManagerConfig] | Omit = omit,
|
|
478
|
-
project_id: Optional[str] | Omit = omit,
|
|
479
|
-
shared_block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
480
|
-
x_project: str | Omit = omit,
|
|
481
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
482
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
483
|
-
extra_headers: Headers | None = None,
|
|
484
|
-
extra_query: Query | None = None,
|
|
485
|
-
extra_body: Body | None = None,
|
|
486
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
487
|
-
) -> Group:
|
|
488
|
-
"""
|
|
489
|
-
Create a new multi-agent group with the specified configuration.
|
|
490
|
-
|
|
491
|
-
Args:
|
|
492
|
-
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
493
|
-
|
|
494
|
-
agent_ids
|
|
495
|
-
|
|
496
|
-
description
|
|
497
|
-
|
|
498
|
-
manager_config
|
|
499
|
-
|
|
500
|
-
project_id: The associated project id.
|
|
501
|
-
|
|
502
|
-
shared_block_ids
|
|
503
|
-
|
|
504
|
-
x_project: The project slug to associate with the group (cloud only).
|
|
505
|
-
|
|
506
|
-
extra_headers: Send extra headers
|
|
507
|
-
|
|
508
|
-
extra_query: Add additional query parameters to the request
|
|
509
|
-
|
|
510
|
-
extra_body: Add additional JSON properties to the request
|
|
511
|
-
|
|
512
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
513
|
-
"""
|
|
514
|
-
if not group_id:
|
|
515
|
-
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
516
|
-
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
517
|
-
return await self._patch(
|
|
518
|
-
f"/v1/groups/{group_id}",
|
|
519
|
-
body=await async_maybe_transform(
|
|
520
|
-
{
|
|
521
|
-
"agent_ids": agent_ids,
|
|
522
|
-
"description": description,
|
|
523
|
-
"manager_config": manager_config,
|
|
524
|
-
"project_id": project_id,
|
|
525
|
-
"shared_block_ids": shared_block_ids,
|
|
526
|
-
},
|
|
527
|
-
group_update_params.GroupUpdateParams,
|
|
528
|
-
),
|
|
529
|
-
options=make_request_options(
|
|
530
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
531
|
-
),
|
|
532
|
-
cast_to=Group,
|
|
533
|
-
)
|
|
534
|
-
|
|
535
471
|
def list(
|
|
536
472
|
self,
|
|
537
473
|
*,
|
|
@@ -656,6 +592,70 @@ class AsyncGroupsResource(AsyncAPIResource):
|
|
|
656
592
|
cast_to=int,
|
|
657
593
|
)
|
|
658
594
|
|
|
595
|
+
async def modify(
|
|
596
|
+
self,
|
|
597
|
+
group_id: str,
|
|
598
|
+
*,
|
|
599
|
+
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
600
|
+
description: Optional[str] | Omit = omit,
|
|
601
|
+
manager_config: Optional[group_modify_params.ManagerConfig] | Omit = omit,
|
|
602
|
+
project_id: Optional[str] | Omit = omit,
|
|
603
|
+
shared_block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
604
|
+
x_project: str | Omit = omit,
|
|
605
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
606
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
607
|
+
extra_headers: Headers | None = None,
|
|
608
|
+
extra_query: Query | None = None,
|
|
609
|
+
extra_body: Body | None = None,
|
|
610
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
611
|
+
) -> Group:
|
|
612
|
+
"""
|
|
613
|
+
Create a new multi-agent group with the specified configuration.
|
|
614
|
+
|
|
615
|
+
Args:
|
|
616
|
+
group_id: The ID of the group in the format 'group-<uuid4>'
|
|
617
|
+
|
|
618
|
+
agent_ids
|
|
619
|
+
|
|
620
|
+
description
|
|
621
|
+
|
|
622
|
+
manager_config
|
|
623
|
+
|
|
624
|
+
project_id: The associated project id.
|
|
625
|
+
|
|
626
|
+
shared_block_ids
|
|
627
|
+
|
|
628
|
+
x_project: The project slug to associate with the group (cloud only).
|
|
629
|
+
|
|
630
|
+
extra_headers: Send extra headers
|
|
631
|
+
|
|
632
|
+
extra_query: Add additional query parameters to the request
|
|
633
|
+
|
|
634
|
+
extra_body: Add additional JSON properties to the request
|
|
635
|
+
|
|
636
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
637
|
+
"""
|
|
638
|
+
if not group_id:
|
|
639
|
+
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
|
|
640
|
+
extra_headers = {**strip_not_given({"X-Project": x_project}), **(extra_headers or {})}
|
|
641
|
+
return await self._patch(
|
|
642
|
+
f"/v1/groups/{group_id}",
|
|
643
|
+
body=await async_maybe_transform(
|
|
644
|
+
{
|
|
645
|
+
"agent_ids": agent_ids,
|
|
646
|
+
"description": description,
|
|
647
|
+
"manager_config": manager_config,
|
|
648
|
+
"project_id": project_id,
|
|
649
|
+
"shared_block_ids": shared_block_ids,
|
|
650
|
+
},
|
|
651
|
+
group_modify_params.GroupModifyParams,
|
|
652
|
+
),
|
|
653
|
+
options=make_request_options(
|
|
654
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
655
|
+
),
|
|
656
|
+
cast_to=Group,
|
|
657
|
+
)
|
|
658
|
+
|
|
659
659
|
|
|
660
660
|
class GroupsResourceWithRawResponse:
|
|
661
661
|
def __init__(self, groups: GroupsResource) -> None:
|
|
@@ -667,9 +667,6 @@ class GroupsResourceWithRawResponse:
|
|
|
667
667
|
self.retrieve = to_raw_response_wrapper(
|
|
668
668
|
groups.retrieve,
|
|
669
669
|
)
|
|
670
|
-
self.update = to_raw_response_wrapper(
|
|
671
|
-
groups.update,
|
|
672
|
-
)
|
|
673
670
|
self.list = to_raw_response_wrapper(
|
|
674
671
|
groups.list,
|
|
675
672
|
)
|
|
@@ -679,6 +676,9 @@ class GroupsResourceWithRawResponse:
|
|
|
679
676
|
self.count = to_raw_response_wrapper(
|
|
680
677
|
groups.count,
|
|
681
678
|
)
|
|
679
|
+
self.modify = to_raw_response_wrapper(
|
|
680
|
+
groups.modify,
|
|
681
|
+
)
|
|
682
682
|
|
|
683
683
|
@cached_property
|
|
684
684
|
def messages(self) -> MessagesResourceWithRawResponse:
|
|
@@ -695,9 +695,6 @@ class AsyncGroupsResourceWithRawResponse:
|
|
|
695
695
|
self.retrieve = async_to_raw_response_wrapper(
|
|
696
696
|
groups.retrieve,
|
|
697
697
|
)
|
|
698
|
-
self.update = async_to_raw_response_wrapper(
|
|
699
|
-
groups.update,
|
|
700
|
-
)
|
|
701
698
|
self.list = async_to_raw_response_wrapper(
|
|
702
699
|
groups.list,
|
|
703
700
|
)
|
|
@@ -707,6 +704,9 @@ class AsyncGroupsResourceWithRawResponse:
|
|
|
707
704
|
self.count = async_to_raw_response_wrapper(
|
|
708
705
|
groups.count,
|
|
709
706
|
)
|
|
707
|
+
self.modify = async_to_raw_response_wrapper(
|
|
708
|
+
groups.modify,
|
|
709
|
+
)
|
|
710
710
|
|
|
711
711
|
@cached_property
|
|
712
712
|
def messages(self) -> AsyncMessagesResourceWithRawResponse:
|
|
@@ -723,9 +723,6 @@ class GroupsResourceWithStreamingResponse:
|
|
|
723
723
|
self.retrieve = to_streamed_response_wrapper(
|
|
724
724
|
groups.retrieve,
|
|
725
725
|
)
|
|
726
|
-
self.update = to_streamed_response_wrapper(
|
|
727
|
-
groups.update,
|
|
728
|
-
)
|
|
729
726
|
self.list = to_streamed_response_wrapper(
|
|
730
727
|
groups.list,
|
|
731
728
|
)
|
|
@@ -735,6 +732,9 @@ class GroupsResourceWithStreamingResponse:
|
|
|
735
732
|
self.count = to_streamed_response_wrapper(
|
|
736
733
|
groups.count,
|
|
737
734
|
)
|
|
735
|
+
self.modify = to_streamed_response_wrapper(
|
|
736
|
+
groups.modify,
|
|
737
|
+
)
|
|
738
738
|
|
|
739
739
|
@cached_property
|
|
740
740
|
def messages(self) -> MessagesResourceWithStreamingResponse:
|
|
@@ -751,9 +751,6 @@ class AsyncGroupsResourceWithStreamingResponse:
|
|
|
751
751
|
self.retrieve = async_to_streamed_response_wrapper(
|
|
752
752
|
groups.retrieve,
|
|
753
753
|
)
|
|
754
|
-
self.update = async_to_streamed_response_wrapper(
|
|
755
|
-
groups.update,
|
|
756
|
-
)
|
|
757
754
|
self.list = async_to_streamed_response_wrapper(
|
|
758
755
|
groups.list,
|
|
759
756
|
)
|
|
@@ -763,6 +760,9 @@ class AsyncGroupsResourceWithStreamingResponse:
|
|
|
763
760
|
self.count = async_to_streamed_response_wrapper(
|
|
764
761
|
groups.count,
|
|
765
762
|
)
|
|
763
|
+
self.modify = async_to_streamed_response_wrapper(
|
|
764
|
+
groups.modify,
|
|
765
|
+
)
|
|
766
766
|
|
|
767
767
|
@cached_property
|
|
768
768
|
def messages(self) -> AsyncMessagesResourceWithStreamingResponse:
|