letta-client 0.1.103__py3-none-any.whl → 0.1.104__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.

@@ -16,7 +16,7 @@ class BaseClientWrapper:
16
16
  headers: typing.Dict[str, str] = {
17
17
  "X-Fern-Language": "Python",
18
18
  "X-Fern-SDK-Name": "letta-client",
19
- "X-Fern-SDK-Version": "0.1.103",
19
+ "X-Fern-SDK-Version": "0.1.104",
20
20
  }
21
21
  if self.token is not None:
22
22
  headers["Authorization"] = f"Bearer {self.token}"
@@ -257,44 +257,22 @@ class GroupsClient:
257
257
  raise ApiError(status_code=_response.status_code, body=_response.text)
258
258
  raise ApiError(status_code=_response.status_code, body=_response_json)
259
259
 
260
- def modify_group(
261
- self,
262
- group_id: str,
263
- *,
264
- project: typing.Optional[str] = None,
265
- agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
266
- description: typing.Optional[str] = OMIT,
267
- manager_config: typing.Optional[GroupUpdateManagerConfig] = OMIT,
268
- shared_block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
269
- request_options: typing.Optional[RequestOptions] = None,
270
- ) -> Group:
260
+ def delete(
261
+ self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
262
+ ) -> typing.Optional[typing.Any]:
271
263
  """
272
- Create a new multi-agent group with the specified configuration.
264
+ Delete a multi-agent group.
273
265
 
274
266
  Parameters
275
267
  ----------
276
268
  group_id : str
277
269
 
278
- project : typing.Optional[str]
279
-
280
- agent_ids : typing.Optional[typing.Sequence[str]]
281
-
282
-
283
- description : typing.Optional[str]
284
-
285
-
286
- manager_config : typing.Optional[GroupUpdateManagerConfig]
287
-
288
-
289
- shared_block_ids : typing.Optional[typing.Sequence[str]]
290
-
291
-
292
270
  request_options : typing.Optional[RequestOptions]
293
271
  Request-specific configuration.
294
272
 
295
273
  Returns
296
274
  -------
297
- Group
275
+ typing.Optional[typing.Any]
298
276
  Successful Response
299
277
 
300
278
  Examples
@@ -304,34 +282,21 @@ class GroupsClient:
304
282
  client = Letta(
305
283
  token="YOUR_TOKEN",
306
284
  )
307
- client.groups.modify_group(
285
+ client.groups.delete(
308
286
  group_id="group_id",
309
287
  )
310
288
  """
311
289
  _response = self._client_wrapper.httpx_client.request(
312
290
  f"v1/groups/{jsonable_encoder(group_id)}",
313
- method="PUT",
314
- json={
315
- "agent_ids": agent_ids,
316
- "description": description,
317
- "manager_config": convert_and_respect_annotation_metadata(
318
- object_=manager_config, annotation=GroupUpdateManagerConfig, direction="write"
319
- ),
320
- "shared_block_ids": shared_block_ids,
321
- },
322
- headers={
323
- "content-type": "application/json",
324
- "X-Project": str(project) if project is not None else None,
325
- },
291
+ method="DELETE",
326
292
  request_options=request_options,
327
- omit=OMIT,
328
293
  )
329
294
  try:
330
295
  if 200 <= _response.status_code < 300:
331
296
  return typing.cast(
332
- Group,
297
+ typing.Optional[typing.Any],
333
298
  construct_type(
334
- type_=Group, # type: ignore
299
+ type_=typing.Optional[typing.Any], # type: ignore
335
300
  object_=_response.json(),
336
301
  ),
337
302
  )
@@ -350,22 +315,44 @@ class GroupsClient:
350
315
  raise ApiError(status_code=_response.status_code, body=_response.text)
351
316
  raise ApiError(status_code=_response.status_code, body=_response_json)
352
317
 
353
- def delete(
354
- self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
355
- ) -> typing.Optional[typing.Any]:
318
+ def modify(
319
+ self,
320
+ group_id: str,
321
+ *,
322
+ project: typing.Optional[str] = None,
323
+ agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
324
+ description: typing.Optional[str] = OMIT,
325
+ manager_config: typing.Optional[GroupUpdateManagerConfig] = OMIT,
326
+ shared_block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
327
+ request_options: typing.Optional[RequestOptions] = None,
328
+ ) -> Group:
356
329
  """
357
- Delete a multi-agent group.
330
+ Create a new multi-agent group with the specified configuration.
358
331
 
359
332
  Parameters
360
333
  ----------
361
334
  group_id : str
362
335
 
336
+ project : typing.Optional[str]
337
+
338
+ agent_ids : typing.Optional[typing.Sequence[str]]
339
+
340
+
341
+ description : typing.Optional[str]
342
+
343
+
344
+ manager_config : typing.Optional[GroupUpdateManagerConfig]
345
+
346
+
347
+ shared_block_ids : typing.Optional[typing.Sequence[str]]
348
+
349
+
363
350
  request_options : typing.Optional[RequestOptions]
364
351
  Request-specific configuration.
365
352
 
366
353
  Returns
367
354
  -------
368
- typing.Optional[typing.Any]
355
+ Group
369
356
  Successful Response
370
357
 
371
358
  Examples
@@ -375,21 +362,34 @@ class GroupsClient:
375
362
  client = Letta(
376
363
  token="YOUR_TOKEN",
377
364
  )
378
- client.groups.delete(
365
+ client.groups.modify(
379
366
  group_id="group_id",
380
367
  )
381
368
  """
382
369
  _response = self._client_wrapper.httpx_client.request(
383
370
  f"v1/groups/{jsonable_encoder(group_id)}",
384
- method="DELETE",
371
+ method="PATCH",
372
+ json={
373
+ "agent_ids": agent_ids,
374
+ "description": description,
375
+ "manager_config": convert_and_respect_annotation_metadata(
376
+ object_=manager_config, annotation=GroupUpdateManagerConfig, direction="write"
377
+ ),
378
+ "shared_block_ids": shared_block_ids,
379
+ },
380
+ headers={
381
+ "content-type": "application/json",
382
+ "X-Project": str(project) if project is not None else None,
383
+ },
385
384
  request_options=request_options,
385
+ omit=OMIT,
386
386
  )
387
387
  try:
388
388
  if 200 <= _response.status_code < 300:
389
389
  return typing.cast(
390
- typing.Optional[typing.Any],
390
+ Group,
391
391
  construct_type(
392
- type_=typing.Optional[typing.Any], # type: ignore
392
+ type_=Group, # type: ignore
393
393
  object_=_response.json(),
394
394
  ),
395
395
  )
@@ -408,43 +408,6 @@ class GroupsClient:
408
408
  raise ApiError(status_code=_response.status_code, body=_response.text)
409
409
  raise ApiError(status_code=_response.status_code, body=_response_json)
410
410
 
411
- def modify(self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
412
- """
413
- Parameters
414
- ----------
415
- group_id : str
416
-
417
- request_options : typing.Optional[RequestOptions]
418
- Request-specific configuration.
419
-
420
- Returns
421
- -------
422
- None
423
-
424
- Examples
425
- --------
426
- from letta_client import Letta
427
-
428
- client = Letta(
429
- token="YOUR_TOKEN",
430
- )
431
- client.groups.modify(
432
- group_id="group_id",
433
- )
434
- """
435
- _response = self._client_wrapper.httpx_client.request(
436
- f"v1/groups/{jsonable_encoder(group_id)}",
437
- method="PATCH",
438
- request_options=request_options,
439
- )
440
- try:
441
- if 200 <= _response.status_code < 300:
442
- return
443
- _response_json = _response.json()
444
- except JSONDecodeError:
445
- raise ApiError(status_code=_response.status_code, body=_response.text)
446
- raise ApiError(status_code=_response.status_code, body=_response_json)
447
-
448
411
  def reset_messages(
449
412
  self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
450
413
  ) -> typing.Optional[typing.Any]:
@@ -763,44 +726,22 @@ class AsyncGroupsClient:
763
726
  raise ApiError(status_code=_response.status_code, body=_response.text)
764
727
  raise ApiError(status_code=_response.status_code, body=_response_json)
765
728
 
766
- async def modify_group(
767
- self,
768
- group_id: str,
769
- *,
770
- project: typing.Optional[str] = None,
771
- agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
772
- description: typing.Optional[str] = OMIT,
773
- manager_config: typing.Optional[GroupUpdateManagerConfig] = OMIT,
774
- shared_block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
775
- request_options: typing.Optional[RequestOptions] = None,
776
- ) -> Group:
729
+ async def delete(
730
+ self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
731
+ ) -> typing.Optional[typing.Any]:
777
732
  """
778
- Create a new multi-agent group with the specified configuration.
733
+ Delete a multi-agent group.
779
734
 
780
735
  Parameters
781
736
  ----------
782
737
  group_id : str
783
738
 
784
- project : typing.Optional[str]
785
-
786
- agent_ids : typing.Optional[typing.Sequence[str]]
787
-
788
-
789
- description : typing.Optional[str]
790
-
791
-
792
- manager_config : typing.Optional[GroupUpdateManagerConfig]
793
-
794
-
795
- shared_block_ids : typing.Optional[typing.Sequence[str]]
796
-
797
-
798
739
  request_options : typing.Optional[RequestOptions]
799
740
  Request-specific configuration.
800
741
 
801
742
  Returns
802
743
  -------
803
- Group
744
+ typing.Optional[typing.Any]
804
745
  Successful Response
805
746
 
806
747
  Examples
@@ -815,7 +756,7 @@ class AsyncGroupsClient:
815
756
 
816
757
 
817
758
  async def main() -> None:
818
- await client.groups.modify_group(
759
+ await client.groups.delete(
819
760
  group_id="group_id",
820
761
  )
821
762
 
@@ -824,28 +765,15 @@ class AsyncGroupsClient:
824
765
  """
825
766
  _response = await self._client_wrapper.httpx_client.request(
826
767
  f"v1/groups/{jsonable_encoder(group_id)}",
827
- method="PUT",
828
- json={
829
- "agent_ids": agent_ids,
830
- "description": description,
831
- "manager_config": convert_and_respect_annotation_metadata(
832
- object_=manager_config, annotation=GroupUpdateManagerConfig, direction="write"
833
- ),
834
- "shared_block_ids": shared_block_ids,
835
- },
836
- headers={
837
- "content-type": "application/json",
838
- "X-Project": str(project) if project is not None else None,
839
- },
768
+ method="DELETE",
840
769
  request_options=request_options,
841
- omit=OMIT,
842
770
  )
843
771
  try:
844
772
  if 200 <= _response.status_code < 300:
845
773
  return typing.cast(
846
- Group,
774
+ typing.Optional[typing.Any],
847
775
  construct_type(
848
- type_=Group, # type: ignore
776
+ type_=typing.Optional[typing.Any], # type: ignore
849
777
  object_=_response.json(),
850
778
  ),
851
779
  )
@@ -864,22 +792,44 @@ class AsyncGroupsClient:
864
792
  raise ApiError(status_code=_response.status_code, body=_response.text)
865
793
  raise ApiError(status_code=_response.status_code, body=_response_json)
866
794
 
867
- async def delete(
868
- self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
869
- ) -> typing.Optional[typing.Any]:
795
+ async def modify(
796
+ self,
797
+ group_id: str,
798
+ *,
799
+ project: typing.Optional[str] = None,
800
+ agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
801
+ description: typing.Optional[str] = OMIT,
802
+ manager_config: typing.Optional[GroupUpdateManagerConfig] = OMIT,
803
+ shared_block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
804
+ request_options: typing.Optional[RequestOptions] = None,
805
+ ) -> Group:
870
806
  """
871
- Delete a multi-agent group.
807
+ Create a new multi-agent group with the specified configuration.
872
808
 
873
809
  Parameters
874
810
  ----------
875
811
  group_id : str
876
812
 
813
+ project : typing.Optional[str]
814
+
815
+ agent_ids : typing.Optional[typing.Sequence[str]]
816
+
817
+
818
+ description : typing.Optional[str]
819
+
820
+
821
+ manager_config : typing.Optional[GroupUpdateManagerConfig]
822
+
823
+
824
+ shared_block_ids : typing.Optional[typing.Sequence[str]]
825
+
826
+
877
827
  request_options : typing.Optional[RequestOptions]
878
828
  Request-specific configuration.
879
829
 
880
830
  Returns
881
831
  -------
882
- typing.Optional[typing.Any]
832
+ Group
883
833
  Successful Response
884
834
 
885
835
  Examples
@@ -894,7 +844,7 @@ class AsyncGroupsClient:
894
844
 
895
845
 
896
846
  async def main() -> None:
897
- await client.groups.delete(
847
+ await client.groups.modify(
898
848
  group_id="group_id",
899
849
  )
900
850
 
@@ -903,15 +853,28 @@ class AsyncGroupsClient:
903
853
  """
904
854
  _response = await self._client_wrapper.httpx_client.request(
905
855
  f"v1/groups/{jsonable_encoder(group_id)}",
906
- method="DELETE",
856
+ method="PATCH",
857
+ json={
858
+ "agent_ids": agent_ids,
859
+ "description": description,
860
+ "manager_config": convert_and_respect_annotation_metadata(
861
+ object_=manager_config, annotation=GroupUpdateManagerConfig, direction="write"
862
+ ),
863
+ "shared_block_ids": shared_block_ids,
864
+ },
865
+ headers={
866
+ "content-type": "application/json",
867
+ "X-Project": str(project) if project is not None else None,
868
+ },
907
869
  request_options=request_options,
870
+ omit=OMIT,
908
871
  )
909
872
  try:
910
873
  if 200 <= _response.status_code < 300:
911
874
  return typing.cast(
912
- typing.Optional[typing.Any],
875
+ Group,
913
876
  construct_type(
914
- type_=typing.Optional[typing.Any], # type: ignore
877
+ type_=Group, # type: ignore
915
878
  object_=_response.json(),
916
879
  ),
917
880
  )
@@ -930,51 +893,6 @@ class AsyncGroupsClient:
930
893
  raise ApiError(status_code=_response.status_code, body=_response.text)
931
894
  raise ApiError(status_code=_response.status_code, body=_response_json)
932
895
 
933
- async def modify(self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
934
- """
935
- Parameters
936
- ----------
937
- group_id : str
938
-
939
- request_options : typing.Optional[RequestOptions]
940
- Request-specific configuration.
941
-
942
- Returns
943
- -------
944
- None
945
-
946
- Examples
947
- --------
948
- import asyncio
949
-
950
- from letta_client import AsyncLetta
951
-
952
- client = AsyncLetta(
953
- token="YOUR_TOKEN",
954
- )
955
-
956
-
957
- async def main() -> None:
958
- await client.groups.modify(
959
- group_id="group_id",
960
- )
961
-
962
-
963
- asyncio.run(main())
964
- """
965
- _response = await self._client_wrapper.httpx_client.request(
966
- f"v1/groups/{jsonable_encoder(group_id)}",
967
- method="PATCH",
968
- request_options=request_options,
969
- )
970
- try:
971
- if 200 <= _response.status_code < 300:
972
- return
973
- _response_json = _response.json()
974
- except JSONDecodeError:
975
- raise ApiError(status_code=_response.status_code, body=_response.text)
976
- raise ApiError(status_code=_response.status_code, body=_response_json)
977
-
978
896
  async def reset_messages(
979
897
  self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
980
898
  ) -> typing.Optional[typing.Any]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.103
3
+ Version: 0.1.104
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -44,7 +44,7 @@ letta_client/blocks/client.py,sha256=LE9dsHaBxFLC3G035f0VpNDG7XKWRK8y9OXpeFCMvUw
44
44
  letta_client/client.py,sha256=k2mZqqEWciVmEQHgipjCK4kQILk74hpSqzcdNwdql9A,21212
45
45
  letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
46
46
  letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
47
- letta_client/core/client_wrapper.py,sha256=m0uPjA6pG-uu3TgcKmh8NXZ8mIlmqgaArwoT2w5bJ5I,1998
47
+ letta_client/core/client_wrapper.py,sha256=B7vt266a3GogaLzku8AJkTxYRR5sGmq5oRZ2hHlsabo,1998
48
48
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
49
49
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
50
50
  letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
@@ -62,7 +62,7 @@ letta_client/errors/internal_server_error.py,sha256=8USCagXyJJ1MOm9snpcXIUt6eNXv
62
62
  letta_client/errors/not_found_error.py,sha256=tBVCeBC8n3C811WHRj_n-hs3h8MqwR5gp0vLiobk7W8,262
63
63
  letta_client/errors/unprocessable_entity_error.py,sha256=FvR7XPlV3Xx5nu8HNlmLhBRdk4so_gCHjYT5PyZe6sM,313
64
64
  letta_client/groups/__init__.py,sha256=WzkNp5Q_5zQj_NHv4hJCOKvW6ftM9EuNxw8hkPRRbko,434
65
- letta_client/groups/client.py,sha256=xLzVug9u7wKJh0sfQln9Ybi58q__G97mJ8u_LE2z0r8,32761
65
+ letta_client/groups/client.py,sha256=atIHiSTR_nvOVWMZYAcBh1j9tjTnMxaYK7l7F7SzYS0,30447
66
66
  letta_client/groups/messages/__init__.py,sha256=M7Ar6Rmb8we4dfYE6jj3FCL9UvVFy1bNQIPflUXMWHA,243
67
67
  letta_client/groups/messages/client.py,sha256=qI2l8wT_qZ1Ou_ZweOjduTKcLbpbpMg1P0s4lfnWXlE,29644
68
68
  letta_client/groups/messages/types/__init__.py,sha256=Oc2j0oGOs96IEFf9xsJIkjBjoq3OMtse64YwWv3F9Io,335
@@ -324,6 +324,6 @@ letta_client/voice/__init__.py,sha256=7hX85553PiRMtIMM12a0DSoFzsglNiUziYR2ekS84Q
324
324
  letta_client/voice/client.py,sha256=STjswa5oOLoP59QwTJvQwi73kgn0UzKOaXc2CsTRI4k,6912
325
325
  letta_client/voice/types/__init__.py,sha256=FRc3iKRTONE4N8Lf1IqvnqWZ2kXdrFFvkL7PxVcR8Ew,212
326
326
  letta_client/voice/types/create_voice_chat_completions_request_body.py,sha256=ZLfKgNK1T6IAwLEvaBVFfy7jEAoPUXP28n-nfmHkklc,391
327
- letta_client-0.1.103.dist-info/METADATA,sha256=36aPlWz1YkjObMMVpgSzluiNvuVJU2ZyxBJ8Ei5O-Ss,5042
328
- letta_client-0.1.103.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
329
- letta_client-0.1.103.dist-info/RECORD,,
327
+ letta_client-0.1.104.dist-info/METADATA,sha256=hSEHa7e85qXoliBmEz2_RTAHaFvZN94_uxjz4uZ5fCw,5042
328
+ letta_client-0.1.104.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
329
+ letta_client-0.1.104.dist-info/RECORD,,