letta-client 1.0.0a9__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/resources/agents/agents.py +396 -396
- letta_client/resources/agents/blocks.py +200 -190
- letta_client/resources/agents/messages.py +367 -367
- letta_client/resources/archives.py +101 -101
- 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 -7
- 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/{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_update_params.py → archive_modify_params.py} +2 -2
- 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.0a9.dist-info → letta_client-1.0.0a10.dist-info}/METADATA +1 -1
- {letta_client-1.0.0a9.dist-info → letta_client-1.0.0a10.dist-info}/RECORD +45 -37
- {letta_client-1.0.0a9.dist-info → letta_client-1.0.0a10.dist-info}/WHEEL +0 -0
- {letta_client-1.0.0a9.dist-info → letta_client-1.0.0a10.dist-info}/licenses/LICENSE +0 -0
|
@@ -27,7 +27,7 @@ from ...types import (
|
|
|
27
27
|
IdentityType,
|
|
28
28
|
identity_list_params,
|
|
29
29
|
identity_create_params,
|
|
30
|
-
|
|
30
|
+
identity_modify_params,
|
|
31
31
|
identity_upsert_params,
|
|
32
32
|
)
|
|
33
33
|
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
@@ -192,70 +192,6 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
192
192
|
cast_to=Identity,
|
|
193
193
|
)
|
|
194
194
|
|
|
195
|
-
def update(
|
|
196
|
-
self,
|
|
197
|
-
identity_id: str,
|
|
198
|
-
*,
|
|
199
|
-
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
200
|
-
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
201
|
-
identifier_key: Optional[str] | Omit = omit,
|
|
202
|
-
identity_type: Optional[IdentityType] | Omit = omit,
|
|
203
|
-
name: Optional[str] | Omit = omit,
|
|
204
|
-
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
205
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
206
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
207
|
-
extra_headers: Headers | None = None,
|
|
208
|
-
extra_query: Query | None = None,
|
|
209
|
-
extra_body: Body | None = None,
|
|
210
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
211
|
-
) -> Identity:
|
|
212
|
-
"""
|
|
213
|
-
Modify Identity
|
|
214
|
-
|
|
215
|
-
Args:
|
|
216
|
-
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
217
|
-
|
|
218
|
-
agent_ids: The agent ids that are associated with the identity.
|
|
219
|
-
|
|
220
|
-
block_ids: The IDs of the blocks associated with the identity.
|
|
221
|
-
|
|
222
|
-
identifier_key: External, user-generated identifier key of the identity.
|
|
223
|
-
|
|
224
|
-
identity_type: Enum to represent the type of the identity.
|
|
225
|
-
|
|
226
|
-
name: The name of the identity.
|
|
227
|
-
|
|
228
|
-
properties: List of properties associated with the identity.
|
|
229
|
-
|
|
230
|
-
extra_headers: Send extra headers
|
|
231
|
-
|
|
232
|
-
extra_query: Add additional query parameters to the request
|
|
233
|
-
|
|
234
|
-
extra_body: Add additional JSON properties to the request
|
|
235
|
-
|
|
236
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
237
|
-
"""
|
|
238
|
-
if not identity_id:
|
|
239
|
-
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
240
|
-
return self._patch(
|
|
241
|
-
f"/v1/identities/{identity_id}",
|
|
242
|
-
body=maybe_transform(
|
|
243
|
-
{
|
|
244
|
-
"agent_ids": agent_ids,
|
|
245
|
-
"block_ids": block_ids,
|
|
246
|
-
"identifier_key": identifier_key,
|
|
247
|
-
"identity_type": identity_type,
|
|
248
|
-
"name": name,
|
|
249
|
-
"properties": properties,
|
|
250
|
-
},
|
|
251
|
-
identity_update_params.IdentityUpdateParams,
|
|
252
|
-
),
|
|
253
|
-
options=make_request_options(
|
|
254
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
255
|
-
),
|
|
256
|
-
cast_to=Identity,
|
|
257
|
-
)
|
|
258
|
-
|
|
259
195
|
def list(
|
|
260
196
|
self,
|
|
261
197
|
*,
|
|
@@ -382,6 +318,70 @@ class IdentitiesResource(SyncAPIResource):
|
|
|
382
318
|
cast_to=int,
|
|
383
319
|
)
|
|
384
320
|
|
|
321
|
+
def modify(
|
|
322
|
+
self,
|
|
323
|
+
identity_id: str,
|
|
324
|
+
*,
|
|
325
|
+
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
326
|
+
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
327
|
+
identifier_key: Optional[str] | Omit = omit,
|
|
328
|
+
identity_type: Optional[IdentityType] | Omit = omit,
|
|
329
|
+
name: Optional[str] | Omit = omit,
|
|
330
|
+
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
331
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
332
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
333
|
+
extra_headers: Headers | None = None,
|
|
334
|
+
extra_query: Query | None = None,
|
|
335
|
+
extra_body: Body | None = None,
|
|
336
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
337
|
+
) -> Identity:
|
|
338
|
+
"""
|
|
339
|
+
Modify Identity
|
|
340
|
+
|
|
341
|
+
Args:
|
|
342
|
+
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
343
|
+
|
|
344
|
+
agent_ids: The agent ids that are associated with the identity.
|
|
345
|
+
|
|
346
|
+
block_ids: The IDs of the blocks associated with the identity.
|
|
347
|
+
|
|
348
|
+
identifier_key: External, user-generated identifier key of the identity.
|
|
349
|
+
|
|
350
|
+
identity_type: Enum to represent the type of the identity.
|
|
351
|
+
|
|
352
|
+
name: The name of the identity.
|
|
353
|
+
|
|
354
|
+
properties: List of properties associated with the identity.
|
|
355
|
+
|
|
356
|
+
extra_headers: Send extra headers
|
|
357
|
+
|
|
358
|
+
extra_query: Add additional query parameters to the request
|
|
359
|
+
|
|
360
|
+
extra_body: Add additional JSON properties to the request
|
|
361
|
+
|
|
362
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
363
|
+
"""
|
|
364
|
+
if not identity_id:
|
|
365
|
+
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
366
|
+
return self._patch(
|
|
367
|
+
f"/v1/identities/{identity_id}",
|
|
368
|
+
body=maybe_transform(
|
|
369
|
+
{
|
|
370
|
+
"agent_ids": agent_ids,
|
|
371
|
+
"block_ids": block_ids,
|
|
372
|
+
"identifier_key": identifier_key,
|
|
373
|
+
"identity_type": identity_type,
|
|
374
|
+
"name": name,
|
|
375
|
+
"properties": properties,
|
|
376
|
+
},
|
|
377
|
+
identity_modify_params.IdentityModifyParams,
|
|
378
|
+
),
|
|
379
|
+
options=make_request_options(
|
|
380
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
381
|
+
),
|
|
382
|
+
cast_to=Identity,
|
|
383
|
+
)
|
|
384
|
+
|
|
385
385
|
def upsert(
|
|
386
386
|
self,
|
|
387
387
|
*,
|
|
@@ -584,70 +584,6 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
584
584
|
cast_to=Identity,
|
|
585
585
|
)
|
|
586
586
|
|
|
587
|
-
async def update(
|
|
588
|
-
self,
|
|
589
|
-
identity_id: str,
|
|
590
|
-
*,
|
|
591
|
-
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
592
|
-
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
593
|
-
identifier_key: Optional[str] | Omit = omit,
|
|
594
|
-
identity_type: Optional[IdentityType] | Omit = omit,
|
|
595
|
-
name: Optional[str] | Omit = omit,
|
|
596
|
-
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
597
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
598
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
599
|
-
extra_headers: Headers | None = None,
|
|
600
|
-
extra_query: Query | None = None,
|
|
601
|
-
extra_body: Body | None = None,
|
|
602
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
603
|
-
) -> Identity:
|
|
604
|
-
"""
|
|
605
|
-
Modify Identity
|
|
606
|
-
|
|
607
|
-
Args:
|
|
608
|
-
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
609
|
-
|
|
610
|
-
agent_ids: The agent ids that are associated with the identity.
|
|
611
|
-
|
|
612
|
-
block_ids: The IDs of the blocks associated with the identity.
|
|
613
|
-
|
|
614
|
-
identifier_key: External, user-generated identifier key of the identity.
|
|
615
|
-
|
|
616
|
-
identity_type: Enum to represent the type of the identity.
|
|
617
|
-
|
|
618
|
-
name: The name of the identity.
|
|
619
|
-
|
|
620
|
-
properties: List of properties associated with the identity.
|
|
621
|
-
|
|
622
|
-
extra_headers: Send extra headers
|
|
623
|
-
|
|
624
|
-
extra_query: Add additional query parameters to the request
|
|
625
|
-
|
|
626
|
-
extra_body: Add additional JSON properties to the request
|
|
627
|
-
|
|
628
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
629
|
-
"""
|
|
630
|
-
if not identity_id:
|
|
631
|
-
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
632
|
-
return await self._patch(
|
|
633
|
-
f"/v1/identities/{identity_id}",
|
|
634
|
-
body=await async_maybe_transform(
|
|
635
|
-
{
|
|
636
|
-
"agent_ids": agent_ids,
|
|
637
|
-
"block_ids": block_ids,
|
|
638
|
-
"identifier_key": identifier_key,
|
|
639
|
-
"identity_type": identity_type,
|
|
640
|
-
"name": name,
|
|
641
|
-
"properties": properties,
|
|
642
|
-
},
|
|
643
|
-
identity_update_params.IdentityUpdateParams,
|
|
644
|
-
),
|
|
645
|
-
options=make_request_options(
|
|
646
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
647
|
-
),
|
|
648
|
-
cast_to=Identity,
|
|
649
|
-
)
|
|
650
|
-
|
|
651
587
|
def list(
|
|
652
588
|
self,
|
|
653
589
|
*,
|
|
@@ -774,6 +710,70 @@ class AsyncIdentitiesResource(AsyncAPIResource):
|
|
|
774
710
|
cast_to=int,
|
|
775
711
|
)
|
|
776
712
|
|
|
713
|
+
async def modify(
|
|
714
|
+
self,
|
|
715
|
+
identity_id: str,
|
|
716
|
+
*,
|
|
717
|
+
agent_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
718
|
+
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
719
|
+
identifier_key: Optional[str] | Omit = omit,
|
|
720
|
+
identity_type: Optional[IdentityType] | Omit = omit,
|
|
721
|
+
name: Optional[str] | Omit = omit,
|
|
722
|
+
properties: Optional[Iterable[IdentityPropertyParam]] | Omit = omit,
|
|
723
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
724
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
725
|
+
extra_headers: Headers | None = None,
|
|
726
|
+
extra_query: Query | None = None,
|
|
727
|
+
extra_body: Body | None = None,
|
|
728
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
729
|
+
) -> Identity:
|
|
730
|
+
"""
|
|
731
|
+
Modify Identity
|
|
732
|
+
|
|
733
|
+
Args:
|
|
734
|
+
identity_id: The ID of the identity in the format 'identity-<uuid4>'
|
|
735
|
+
|
|
736
|
+
agent_ids: The agent ids that are associated with the identity.
|
|
737
|
+
|
|
738
|
+
block_ids: The IDs of the blocks associated with the identity.
|
|
739
|
+
|
|
740
|
+
identifier_key: External, user-generated identifier key of the identity.
|
|
741
|
+
|
|
742
|
+
identity_type: Enum to represent the type of the identity.
|
|
743
|
+
|
|
744
|
+
name: The name of the identity.
|
|
745
|
+
|
|
746
|
+
properties: List of properties associated with the identity.
|
|
747
|
+
|
|
748
|
+
extra_headers: Send extra headers
|
|
749
|
+
|
|
750
|
+
extra_query: Add additional query parameters to the request
|
|
751
|
+
|
|
752
|
+
extra_body: Add additional JSON properties to the request
|
|
753
|
+
|
|
754
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
755
|
+
"""
|
|
756
|
+
if not identity_id:
|
|
757
|
+
raise ValueError(f"Expected a non-empty value for `identity_id` but received {identity_id!r}")
|
|
758
|
+
return await self._patch(
|
|
759
|
+
f"/v1/identities/{identity_id}",
|
|
760
|
+
body=await async_maybe_transform(
|
|
761
|
+
{
|
|
762
|
+
"agent_ids": agent_ids,
|
|
763
|
+
"block_ids": block_ids,
|
|
764
|
+
"identifier_key": identifier_key,
|
|
765
|
+
"identity_type": identity_type,
|
|
766
|
+
"name": name,
|
|
767
|
+
"properties": properties,
|
|
768
|
+
},
|
|
769
|
+
identity_modify_params.IdentityModifyParams,
|
|
770
|
+
),
|
|
771
|
+
options=make_request_options(
|
|
772
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
773
|
+
),
|
|
774
|
+
cast_to=Identity,
|
|
775
|
+
)
|
|
776
|
+
|
|
777
777
|
async def upsert(
|
|
778
778
|
self,
|
|
779
779
|
*,
|
|
@@ -852,9 +852,6 @@ class IdentitiesResourceWithRawResponse:
|
|
|
852
852
|
self.retrieve = to_raw_response_wrapper(
|
|
853
853
|
identities.retrieve,
|
|
854
854
|
)
|
|
855
|
-
self.update = to_raw_response_wrapper(
|
|
856
|
-
identities.update,
|
|
857
|
-
)
|
|
858
855
|
self.list = to_raw_response_wrapper(
|
|
859
856
|
identities.list,
|
|
860
857
|
)
|
|
@@ -864,6 +861,9 @@ class IdentitiesResourceWithRawResponse:
|
|
|
864
861
|
self.count = to_raw_response_wrapper(
|
|
865
862
|
identities.count,
|
|
866
863
|
)
|
|
864
|
+
self.modify = to_raw_response_wrapper(
|
|
865
|
+
identities.modify,
|
|
866
|
+
)
|
|
867
867
|
self.upsert = to_raw_response_wrapper(
|
|
868
868
|
identities.upsert,
|
|
869
869
|
)
|
|
@@ -891,9 +891,6 @@ class AsyncIdentitiesResourceWithRawResponse:
|
|
|
891
891
|
self.retrieve = async_to_raw_response_wrapper(
|
|
892
892
|
identities.retrieve,
|
|
893
893
|
)
|
|
894
|
-
self.update = async_to_raw_response_wrapper(
|
|
895
|
-
identities.update,
|
|
896
|
-
)
|
|
897
894
|
self.list = async_to_raw_response_wrapper(
|
|
898
895
|
identities.list,
|
|
899
896
|
)
|
|
@@ -903,6 +900,9 @@ class AsyncIdentitiesResourceWithRawResponse:
|
|
|
903
900
|
self.count = async_to_raw_response_wrapper(
|
|
904
901
|
identities.count,
|
|
905
902
|
)
|
|
903
|
+
self.modify = async_to_raw_response_wrapper(
|
|
904
|
+
identities.modify,
|
|
905
|
+
)
|
|
906
906
|
self.upsert = async_to_raw_response_wrapper(
|
|
907
907
|
identities.upsert,
|
|
908
908
|
)
|
|
@@ -930,9 +930,6 @@ class IdentitiesResourceWithStreamingResponse:
|
|
|
930
930
|
self.retrieve = to_streamed_response_wrapper(
|
|
931
931
|
identities.retrieve,
|
|
932
932
|
)
|
|
933
|
-
self.update = to_streamed_response_wrapper(
|
|
934
|
-
identities.update,
|
|
935
|
-
)
|
|
936
933
|
self.list = to_streamed_response_wrapper(
|
|
937
934
|
identities.list,
|
|
938
935
|
)
|
|
@@ -942,6 +939,9 @@ class IdentitiesResourceWithStreamingResponse:
|
|
|
942
939
|
self.count = to_streamed_response_wrapper(
|
|
943
940
|
identities.count,
|
|
944
941
|
)
|
|
942
|
+
self.modify = to_streamed_response_wrapper(
|
|
943
|
+
identities.modify,
|
|
944
|
+
)
|
|
945
945
|
self.upsert = to_streamed_response_wrapper(
|
|
946
946
|
identities.upsert,
|
|
947
947
|
)
|
|
@@ -969,9 +969,6 @@ class AsyncIdentitiesResourceWithStreamingResponse:
|
|
|
969
969
|
self.retrieve = async_to_streamed_response_wrapper(
|
|
970
970
|
identities.retrieve,
|
|
971
971
|
)
|
|
972
|
-
self.update = async_to_streamed_response_wrapper(
|
|
973
|
-
identities.update,
|
|
974
|
-
)
|
|
975
972
|
self.list = async_to_streamed_response_wrapper(
|
|
976
973
|
identities.list,
|
|
977
974
|
)
|
|
@@ -981,6 +978,9 @@ class AsyncIdentitiesResourceWithStreamingResponse:
|
|
|
981
978
|
self.count = async_to_streamed_response_wrapper(
|
|
982
979
|
identities.count,
|
|
983
980
|
)
|
|
981
|
+
self.modify = async_to_streamed_response_wrapper(
|
|
982
|
+
identities.modify,
|
|
983
|
+
)
|
|
984
984
|
self.upsert = async_to_streamed_response_wrapper(
|
|
985
985
|
identities.upsert,
|
|
986
986
|
)
|