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

@@ -438,12 +438,12 @@ class MessagesClient:
438
438
  agent_id: str,
439
439
  *,
440
440
  messages: typing.Sequence[MessageCreate],
441
- callback_url: typing.Optional[str] = None,
442
441
  max_steps: typing.Optional[int] = OMIT,
443
442
  use_assistant_message: typing.Optional[bool] = OMIT,
444
443
  assistant_message_tool_name: typing.Optional[str] = OMIT,
445
444
  assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
446
445
  include_return_message_types: typing.Optional[typing.Sequence[MessageType]] = OMIT,
446
+ callback_url: typing.Optional[str] = OMIT,
447
447
  request_options: typing.Optional[RequestOptions] = None,
448
448
  ) -> Run:
449
449
  """
@@ -457,9 +457,6 @@ class MessagesClient:
457
457
  messages : typing.Sequence[MessageCreate]
458
458
  The messages to be sent to the agent.
459
459
 
460
- callback_url : typing.Optional[str]
461
- Optional callback URL to POST to when the job completes
462
-
463
460
  max_steps : typing.Optional[int]
464
461
  Maximum number of steps the agent should take to process the request.
465
462
 
@@ -475,6 +472,9 @@ class MessagesClient:
475
472
  include_return_message_types : typing.Optional[typing.Sequence[MessageType]]
476
473
  Only return specified message types in the response. If `None` (default) returns all messages.
477
474
 
475
+ callback_url : typing.Optional[str]
476
+ Optional callback URL to POST to when the job completes
477
+
478
478
  request_options : typing.Optional[RequestOptions]
479
479
  Request-specific configuration.
480
480
 
@@ -507,9 +507,6 @@ class MessagesClient:
507
507
  _response = self._client_wrapper.httpx_client.request(
508
508
  f"v1/agents/{jsonable_encoder(agent_id)}/messages/async",
509
509
  method="POST",
510
- params={
511
- "callback_url": callback_url,
512
- },
513
510
  json={
514
511
  "messages": convert_and_respect_annotation_metadata(
515
512
  object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
@@ -519,6 +516,10 @@ class MessagesClient:
519
516
  "assistant_message_tool_name": assistant_message_tool_name,
520
517
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
521
518
  "include_return_message_types": include_return_message_types,
519
+ "callback_url": callback_url,
520
+ },
521
+ headers={
522
+ "content-type": "application/json",
522
523
  },
523
524
  request_options=request_options,
524
525
  omit=OMIT,
@@ -1059,12 +1060,12 @@ class AsyncMessagesClient:
1059
1060
  agent_id: str,
1060
1061
  *,
1061
1062
  messages: typing.Sequence[MessageCreate],
1062
- callback_url: typing.Optional[str] = None,
1063
1063
  max_steps: typing.Optional[int] = OMIT,
1064
1064
  use_assistant_message: typing.Optional[bool] = OMIT,
1065
1065
  assistant_message_tool_name: typing.Optional[str] = OMIT,
1066
1066
  assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
1067
1067
  include_return_message_types: typing.Optional[typing.Sequence[MessageType]] = OMIT,
1068
+ callback_url: typing.Optional[str] = OMIT,
1068
1069
  request_options: typing.Optional[RequestOptions] = None,
1069
1070
  ) -> Run:
1070
1071
  """
@@ -1078,9 +1079,6 @@ class AsyncMessagesClient:
1078
1079
  messages : typing.Sequence[MessageCreate]
1079
1080
  The messages to be sent to the agent.
1080
1081
 
1081
- callback_url : typing.Optional[str]
1082
- Optional callback URL to POST to when the job completes
1083
-
1084
1082
  max_steps : typing.Optional[int]
1085
1083
  Maximum number of steps the agent should take to process the request.
1086
1084
 
@@ -1096,6 +1094,9 @@ class AsyncMessagesClient:
1096
1094
  include_return_message_types : typing.Optional[typing.Sequence[MessageType]]
1097
1095
  Only return specified message types in the response. If `None` (default) returns all messages.
1098
1096
 
1097
+ callback_url : typing.Optional[str]
1098
+ Optional callback URL to POST to when the job completes
1099
+
1099
1100
  request_options : typing.Optional[RequestOptions]
1100
1101
  Request-specific configuration.
1101
1102
 
@@ -1136,9 +1137,6 @@ class AsyncMessagesClient:
1136
1137
  _response = await self._client_wrapper.httpx_client.request(
1137
1138
  f"v1/agents/{jsonable_encoder(agent_id)}/messages/async",
1138
1139
  method="POST",
1139
- params={
1140
- "callback_url": callback_url,
1141
- },
1142
1140
  json={
1143
1141
  "messages": convert_and_respect_annotation_metadata(
1144
1142
  object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
@@ -1148,6 +1146,10 @@ class AsyncMessagesClient:
1148
1146
  "assistant_message_tool_name": assistant_message_tool_name,
1149
1147
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
1150
1148
  "include_return_message_types": include_return_message_types,
1149
+ "callback_url": callback_url,
1150
+ },
1151
+ headers={
1152
+ "content-type": "application/json",
1151
1153
  },
1152
1154
  request_options=request_options,
1153
1155
  omit=OMIT,
@@ -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.165",
19
+ "X-Fern-SDK-Version": "0.1.166",
20
20
  }
21
21
  if self.token is not None:
22
22
  headers["Authorization"] = f"Bearer {self.token}"
@@ -3,6 +3,7 @@
3
3
  from ..core.unchecked_base_model import UncheckedBaseModel
4
4
  import typing
5
5
  import pydantic
6
+ from .message_type import MessageType
6
7
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
8
 
8
9
 
@@ -22,6 +23,11 @@ class LettaRequestConfig(UncheckedBaseModel):
22
23
  The name of the message argument in the designated message tool.
23
24
  """
24
25
 
26
+ include_return_message_types: typing.Optional[typing.List[MessageType]] = pydantic.Field(default=None)
27
+ """
28
+ Only return specified message types in the response. If `None` (default) returns all messages.
29
+ """
30
+
25
31
  if IS_PYDANTIC_V2:
26
32
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
33
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.165
3
+ Version: 0.1.166
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -14,7 +14,7 @@ letta_client/agents/memory_variables/client.py,sha256=6qFVbR_tdfqj4HQ1h1HXR8DZCV
14
14
  letta_client/agents/memory_variables/types/__init__.py,sha256=EoznK0WvhCyFYd4KDdU-cGDQWpSXmq79BSkqVHN-j7A,180
15
15
  letta_client/agents/memory_variables/types/memory_variables_list_response.py,sha256=bsF__n_B4ZXEHzg--OVD6tHHXt_aM-FjHm2x1ZXPnL0,599
16
16
  letta_client/agents/messages/__init__.py,sha256=M7Ar6Rmb8we4dfYE6jj3FCL9UvVFy1bNQIPflUXMWHA,243
17
- letta_client/agents/messages/client.py,sha256=4aSoniRmqmAOpi1bvGPm6Uj5QNuUqDIeIJe4LGDoELk,45579
17
+ letta_client/agents/messages/client.py,sha256=lxfPYFeBOvY3MWhWMDIth5uZEpir9KDg-9D3fT5cPMY,45685
18
18
  letta_client/agents/messages/types/__init__.py,sha256=Oc2j0oGOs96IEFf9xsJIkjBjoq3OMtse64YwWv3F9Io,335
19
19
  letta_client/agents/messages/types/letta_streaming_response.py,sha256=8VR2F32xjoPFXL4YBvBbAZclaJG4ENPTjk7BrlZkmtw,742
20
20
  letta_client/agents/messages/types/messages_modify_request.py,sha256=7C2X3BKye-YDSXOkdEmxxt34seI4jkLK0-govtc4nhg,475
@@ -63,7 +63,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_create_re
63
63
  letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item_access_item.py,sha256=R-H25IpNp9feSrW8Yj3h9O3UTMVvFniQJElogKxLuoE,254
64
64
  letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
65
65
  letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
66
- letta_client/core/client_wrapper.py,sha256=dSomxhm2N6ZppvWcTyP1WFdUcaKze16CLsu_9Tjp6eM,1998
66
+ letta_client/core/client_wrapper.py,sha256=1io5EC0XVl9a_u9hK7JRI6n6eaQi57VLwe_lYLMrLm4,1998
67
67
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
68
68
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
69
69
  letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
@@ -281,7 +281,7 @@ letta_client/types/letta_image.py,sha256=HA__0Gq0BpKHeUUxIT2TmEfyY18F2DrauiGlijW
281
281
  letta_client/types/letta_message_content_union.py,sha256=ypGyeR8PGqPGaAWtLWjDkWwG9oa4AWcL44y-RfLJVvw,540
282
282
  letta_client/types/letta_message_union.py,sha256=TTQwlur2CZNdZ466Nb_2TFcSFXrgoMliaNzD33t7Ktw,603
283
283
  letta_client/types/letta_request.py,sha256=vhS3qQYxNN2dlE_kXWPW3BJekBDMTSRp1MXmj4-ztfQ,1659
284
- letta_client/types/letta_request_config.py,sha256=b6K4QtDdHjcZKfBb1fugUuoPrT2N4d5TTB0PIRNI2SU,1085
284
+ letta_client/types/letta_request_config.py,sha256=OW5TNyTfbBMfRcWp5Aje_-7vjS0zVzYCmQGKLUtJezU,1346
285
285
  letta_client/types/letta_response.py,sha256=5brJ39B8PxTBpm5_clL9XGP1SQ1pox-G0gxMDkitMlw,1395
286
286
  letta_client/types/letta_stop_reason.py,sha256=5uqJibhaT6LFTj6Sf6m0VJKS1FJzIIgymjZTvu2a0Zk,931
287
287
  letta_client/types/letta_streaming_request.py,sha256=YJ_6ge5xrzQjOs2UTY3FxwhTv6QoCi9XWv5Rod01W1E,1884
@@ -404,6 +404,6 @@ letta_client/types/web_search_options_user_location_approximate.py,sha256=Ywk01J
404
404
  letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
405
405
  letta_client/voice/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
406
406
  letta_client/voice/client.py,sha256=EX79F2D5bieXNP8g1ZPw8xwAzqE1A3hshCHUSlTV1kw,5739
407
- letta_client-0.1.165.dist-info/METADATA,sha256=3a_wwcOwnbwLhFoUkiH1tKgWl1AuZ0zjjzkOzFiv-_k,5093
408
- letta_client-0.1.165.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
409
- letta_client-0.1.165.dist-info/RECORD,,
407
+ letta_client-0.1.166.dist-info/METADATA,sha256=OR2XseWvQ0fEA5jXRuDYQSynQMoloDe-4fHWcU8p2Vg,5093
408
+ letta_client-0.1.166.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
409
+ letta_client-0.1.166.dist-info/RECORD,,