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.

Files changed (54) hide show
  1. letta_client/_version.py +1 -1
  2. letta_client/pagination.py +174 -1
  3. letta_client/resources/agents/agents.py +396 -396
  4. letta_client/resources/agents/blocks.py +200 -190
  5. letta_client/resources/agents/files.py +13 -10
  6. letta_client/resources/agents/messages.py +367 -367
  7. letta_client/resources/agents/tools.py +6 -6
  8. letta_client/resources/archives.py +121 -111
  9. letta_client/resources/batches/messages.py +14 -11
  10. letta_client/resources/blocks/blocks.py +241 -222
  11. letta_client/resources/folders/folders.py +133 -133
  12. letta_client/resources/groups/groups.py +141 -141
  13. letta_client/resources/groups/messages.py +198 -198
  14. letta_client/resources/identities/blocks.py +7 -7
  15. letta_client/resources/identities/identities.py +141 -141
  16. letta_client/resources/tools.py +794 -194
  17. letta_client/types/__init__.py +11 -8
  18. letta_client/types/{agent_update_params.py → agent_modify_params.py} +2 -2
  19. letta_client/types/agent_state.py +6 -3
  20. letta_client/types/agents/__init__.py +6 -3
  21. letta_client/types/agents/block.py +6 -3
  22. letta_client/types/agents/block_list_response.py +63 -0
  23. letta_client/types/agents/{block_update_params.py → block_modify_params.py} +8 -5
  24. letta_client/types/agents/block_modify_response.py +63 -0
  25. letta_client/types/agents/block_retrieve_response.py +63 -0
  26. letta_client/types/agents/file_list_response.py +3 -14
  27. letta_client/types/agents/{message_update_params.py → message_modify_params.py} +2 -2
  28. letta_client/types/agents/{message_update_response.py → message_modify_response.py} +2 -2
  29. letta_client/types/archive_list_params.py +3 -0
  30. letta_client/types/{archive_update_params.py → archive_modify_params.py} +2 -2
  31. letta_client/types/batches/__init__.py +0 -1
  32. letta_client/types/block_create_params.py +6 -3
  33. letta_client/types/block_create_response.py +63 -0
  34. letta_client/types/block_list_response.py +63 -0
  35. letta_client/types/{block_update_params.py → block_modify_params.py} +8 -5
  36. letta_client/types/block_modify_response.py +63 -0
  37. letta_client/types/block_retrieve_response.py +63 -0
  38. letta_client/types/create_block_param.py +6 -3
  39. letta_client/types/{folder_update_params.py → folder_modify_params.py} +2 -2
  40. letta_client/types/{group_update_params.py → group_modify_params.py} +2 -2
  41. letta_client/types/groups/__init__.py +2 -2
  42. letta_client/types/groups/{message_update_params.py → message_modify_params.py} +2 -2
  43. letta_client/types/groups/{message_update_response.py → message_modify_response.py} +2 -2
  44. letta_client/types/identities/__init__.py +1 -0
  45. letta_client/types/identities/block_list_response.py +63 -0
  46. letta_client/types/{identity_update_params.py → identity_modify_params.py} +2 -2
  47. letta_client/types/tool.py +106 -2
  48. letta_client/types/{tool_update_params.py → tool_modify_params.py} +2 -2
  49. {letta_client-1.0.0a8.dist-info → letta_client-1.0.0a10.dist-info}/METADATA +1 -1
  50. {letta_client-1.0.0a8.dist-info → letta_client-1.0.0a10.dist-info}/RECORD +52 -46
  51. letta_client/types/archive_list_response.py +0 -10
  52. letta_client/types/batches/message_list_response.py +0 -12
  53. {letta_client-1.0.0a8.dist-info → letta_client-1.0.0a10.dist-info}/WHEEL +0 -0
  54. {letta_client-1.0.0a8.dist-info → letta_client-1.0.0a10.dist-info}/licenses/LICENSE +0 -0
@@ -23,7 +23,7 @@ from .agents import (
23
23
  AgentsResourceWithStreamingResponse,
24
24
  AsyncAgentsResourceWithStreamingResponse,
25
25
  )
26
- from ...types import folder_list_params, folder_create_params, folder_update_params
26
+ from ...types import folder_list_params, folder_create_params, folder_modify_params
27
27
  from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
28
28
  from ..._utils import maybe_transform, async_maybe_transform
29
29
  from ..._compat import cached_property
@@ -169,66 +169,6 @@ class FoldersResource(SyncAPIResource):
169
169
  cast_to=Folder,
170
170
  )
171
171
 
172
- def update(
173
- self,
174
- folder_id: str,
175
- *,
176
- description: Optional[str] | Omit = omit,
177
- embedding_config: Optional[EmbeddingConfigParam] | Omit = omit,
178
- instructions: Optional[str] | Omit = omit,
179
- metadata: Optional[Dict[str, object]] | Omit = omit,
180
- name: Optional[str] | Omit = omit,
181
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
182
- # The extra values given here take precedence over values defined on the client or passed to this method.
183
- extra_headers: Headers | None = None,
184
- extra_query: Query | None = None,
185
- extra_body: Body | None = None,
186
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
187
- ) -> Folder:
188
- """
189
- Update the name or documentation of an existing data folder.
190
-
191
- Args:
192
- folder_id: The ID of the source in the format 'source-<uuid4>'
193
-
194
- description: The description of the source.
195
-
196
- embedding_config: Configuration for embedding model connection and processing parameters.
197
-
198
- instructions: Instructions for how to use the source.
199
-
200
- metadata: Metadata associated with the source.
201
-
202
- name: The name of the source.
203
-
204
- extra_headers: Send extra headers
205
-
206
- extra_query: Add additional query parameters to the request
207
-
208
- extra_body: Add additional JSON properties to the request
209
-
210
- timeout: Override the client-level default timeout for this request, in seconds
211
- """
212
- if not folder_id:
213
- raise ValueError(f"Expected a non-empty value for `folder_id` but received {folder_id!r}")
214
- return self._patch(
215
- f"/v1/folders/{folder_id}",
216
- body=maybe_transform(
217
- {
218
- "description": description,
219
- "embedding_config": embedding_config,
220
- "instructions": instructions,
221
- "metadata": metadata,
222
- "name": name,
223
- },
224
- folder_update_params.FolderUpdateParams,
225
- ),
226
- options=make_request_options(
227
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
228
- ),
229
- cast_to=Folder,
230
- )
231
-
232
172
  def list(
233
173
  self,
234
174
  *,
@@ -349,6 +289,66 @@ class FoldersResource(SyncAPIResource):
349
289
  cast_to=int,
350
290
  )
351
291
 
292
+ def modify(
293
+ self,
294
+ folder_id: str,
295
+ *,
296
+ description: Optional[str] | Omit = omit,
297
+ embedding_config: Optional[EmbeddingConfigParam] | Omit = omit,
298
+ instructions: Optional[str] | Omit = omit,
299
+ metadata: Optional[Dict[str, object]] | Omit = omit,
300
+ name: Optional[str] | Omit = omit,
301
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
302
+ # The extra values given here take precedence over values defined on the client or passed to this method.
303
+ extra_headers: Headers | None = None,
304
+ extra_query: Query | None = None,
305
+ extra_body: Body | None = None,
306
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
307
+ ) -> Folder:
308
+ """
309
+ Update the name or documentation of an existing data folder.
310
+
311
+ Args:
312
+ folder_id: The ID of the source in the format 'source-<uuid4>'
313
+
314
+ description: The description of the source.
315
+
316
+ embedding_config: Configuration for embedding model connection and processing parameters.
317
+
318
+ instructions: Instructions for how to use the source.
319
+
320
+ metadata: Metadata associated with the source.
321
+
322
+ name: The name of the source.
323
+
324
+ extra_headers: Send extra headers
325
+
326
+ extra_query: Add additional query parameters to the request
327
+
328
+ extra_body: Add additional JSON properties to the request
329
+
330
+ timeout: Override the client-level default timeout for this request, in seconds
331
+ """
332
+ if not folder_id:
333
+ raise ValueError(f"Expected a non-empty value for `folder_id` but received {folder_id!r}")
334
+ return self._patch(
335
+ f"/v1/folders/{folder_id}",
336
+ body=maybe_transform(
337
+ {
338
+ "description": description,
339
+ "embedding_config": embedding_config,
340
+ "instructions": instructions,
341
+ "metadata": metadata,
342
+ "name": name,
343
+ },
344
+ folder_modify_params.FolderModifyParams,
345
+ ),
346
+ options=make_request_options(
347
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
348
+ ),
349
+ cast_to=Folder,
350
+ )
351
+
352
352
 
353
353
  class AsyncFoldersResource(AsyncAPIResource):
354
354
  @cached_property
@@ -476,66 +476,6 @@ class AsyncFoldersResource(AsyncAPIResource):
476
476
  cast_to=Folder,
477
477
  )
478
478
 
479
- async def update(
480
- self,
481
- folder_id: str,
482
- *,
483
- description: Optional[str] | Omit = omit,
484
- embedding_config: Optional[EmbeddingConfigParam] | Omit = omit,
485
- instructions: Optional[str] | Omit = omit,
486
- metadata: Optional[Dict[str, object]] | Omit = omit,
487
- name: Optional[str] | Omit = omit,
488
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
489
- # The extra values given here take precedence over values defined on the client or passed to this method.
490
- extra_headers: Headers | None = None,
491
- extra_query: Query | None = None,
492
- extra_body: Body | None = None,
493
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
494
- ) -> Folder:
495
- """
496
- Update the name or documentation of an existing data folder.
497
-
498
- Args:
499
- folder_id: The ID of the source in the format 'source-<uuid4>'
500
-
501
- description: The description of the source.
502
-
503
- embedding_config: Configuration for embedding model connection and processing parameters.
504
-
505
- instructions: Instructions for how to use the source.
506
-
507
- metadata: Metadata associated with the source.
508
-
509
- name: The name of the source.
510
-
511
- extra_headers: Send extra headers
512
-
513
- extra_query: Add additional query parameters to the request
514
-
515
- extra_body: Add additional JSON properties to the request
516
-
517
- timeout: Override the client-level default timeout for this request, in seconds
518
- """
519
- if not folder_id:
520
- raise ValueError(f"Expected a non-empty value for `folder_id` but received {folder_id!r}")
521
- return await self._patch(
522
- f"/v1/folders/{folder_id}",
523
- body=await async_maybe_transform(
524
- {
525
- "description": description,
526
- "embedding_config": embedding_config,
527
- "instructions": instructions,
528
- "metadata": metadata,
529
- "name": name,
530
- },
531
- folder_update_params.FolderUpdateParams,
532
- ),
533
- options=make_request_options(
534
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
535
- ),
536
- cast_to=Folder,
537
- )
538
-
539
479
  def list(
540
480
  self,
541
481
  *,
@@ -656,6 +596,66 @@ class AsyncFoldersResource(AsyncAPIResource):
656
596
  cast_to=int,
657
597
  )
658
598
 
599
+ async def modify(
600
+ self,
601
+ folder_id: str,
602
+ *,
603
+ description: Optional[str] | Omit = omit,
604
+ embedding_config: Optional[EmbeddingConfigParam] | Omit = omit,
605
+ instructions: Optional[str] | Omit = omit,
606
+ metadata: Optional[Dict[str, object]] | Omit = omit,
607
+ name: Optional[str] | Omit = omit,
608
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
609
+ # The extra values given here take precedence over values defined on the client or passed to this method.
610
+ extra_headers: Headers | None = None,
611
+ extra_query: Query | None = None,
612
+ extra_body: Body | None = None,
613
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
614
+ ) -> Folder:
615
+ """
616
+ Update the name or documentation of an existing data folder.
617
+
618
+ Args:
619
+ folder_id: The ID of the source in the format 'source-<uuid4>'
620
+
621
+ description: The description of the source.
622
+
623
+ embedding_config: Configuration for embedding model connection and processing parameters.
624
+
625
+ instructions: Instructions for how to use the source.
626
+
627
+ metadata: Metadata associated with the source.
628
+
629
+ name: The name of the source.
630
+
631
+ extra_headers: Send extra headers
632
+
633
+ extra_query: Add additional query parameters to the request
634
+
635
+ extra_body: Add additional JSON properties to the request
636
+
637
+ timeout: Override the client-level default timeout for this request, in seconds
638
+ """
639
+ if not folder_id:
640
+ raise ValueError(f"Expected a non-empty value for `folder_id` but received {folder_id!r}")
641
+ return await self._patch(
642
+ f"/v1/folders/{folder_id}",
643
+ body=await async_maybe_transform(
644
+ {
645
+ "description": description,
646
+ "embedding_config": embedding_config,
647
+ "instructions": instructions,
648
+ "metadata": metadata,
649
+ "name": name,
650
+ },
651
+ folder_modify_params.FolderModifyParams,
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=Folder,
657
+ )
658
+
659
659
 
660
660
  class FoldersResourceWithRawResponse:
661
661
  def __init__(self, folders: FoldersResource) -> None:
@@ -667,9 +667,6 @@ class FoldersResourceWithRawResponse:
667
667
  self.retrieve = to_raw_response_wrapper(
668
668
  folders.retrieve,
669
669
  )
670
- self.update = to_raw_response_wrapper(
671
- folders.update,
672
- )
673
670
  self.list = to_raw_response_wrapper(
674
671
  folders.list,
675
672
  )
@@ -679,6 +676,9 @@ class FoldersResourceWithRawResponse:
679
676
  self.count = to_raw_response_wrapper(
680
677
  folders.count,
681
678
  )
679
+ self.modify = to_raw_response_wrapper(
680
+ folders.modify,
681
+ )
682
682
 
683
683
  @cached_property
684
684
  def files(self) -> FilesResourceWithRawResponse:
@@ -699,9 +699,6 @@ class AsyncFoldersResourceWithRawResponse:
699
699
  self.retrieve = async_to_raw_response_wrapper(
700
700
  folders.retrieve,
701
701
  )
702
- self.update = async_to_raw_response_wrapper(
703
- folders.update,
704
- )
705
702
  self.list = async_to_raw_response_wrapper(
706
703
  folders.list,
707
704
  )
@@ -711,6 +708,9 @@ class AsyncFoldersResourceWithRawResponse:
711
708
  self.count = async_to_raw_response_wrapper(
712
709
  folders.count,
713
710
  )
711
+ self.modify = async_to_raw_response_wrapper(
712
+ folders.modify,
713
+ )
714
714
 
715
715
  @cached_property
716
716
  def files(self) -> AsyncFilesResourceWithRawResponse:
@@ -731,9 +731,6 @@ class FoldersResourceWithStreamingResponse:
731
731
  self.retrieve = to_streamed_response_wrapper(
732
732
  folders.retrieve,
733
733
  )
734
- self.update = to_streamed_response_wrapper(
735
- folders.update,
736
- )
737
734
  self.list = to_streamed_response_wrapper(
738
735
  folders.list,
739
736
  )
@@ -743,6 +740,9 @@ class FoldersResourceWithStreamingResponse:
743
740
  self.count = to_streamed_response_wrapper(
744
741
  folders.count,
745
742
  )
743
+ self.modify = to_streamed_response_wrapper(
744
+ folders.modify,
745
+ )
746
746
 
747
747
  @cached_property
748
748
  def files(self) -> FilesResourceWithStreamingResponse:
@@ -763,9 +763,6 @@ class AsyncFoldersResourceWithStreamingResponse:
763
763
  self.retrieve = async_to_streamed_response_wrapper(
764
764
  folders.retrieve,
765
765
  )
766
- self.update = async_to_streamed_response_wrapper(
767
- folders.update,
768
- )
769
766
  self.list = async_to_streamed_response_wrapper(
770
767
  folders.list,
771
768
  )
@@ -775,6 +772,9 @@ class AsyncFoldersResourceWithStreamingResponse:
775
772
  self.count = async_to_streamed_response_wrapper(
776
773
  folders.count,
777
774
  )
775
+ self.modify = async_to_streamed_response_wrapper(
776
+ folders.modify,
777
+ )
778
778
 
779
779
  @cached_property
780
780
  def files(self) -> AsyncFilesResourceWithStreamingResponse: