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

@@ -24,7 +24,7 @@ class BaseClientWrapper:
24
24
  headers: typing.Dict[str, str] = {
25
25
  "X-Fern-Language": "Python",
26
26
  "X-Fern-SDK-Name": "letta-client",
27
- "X-Fern-SDK-Version": "0.1.200",
27
+ "X-Fern-SDK-Version": "0.1.202",
28
28
  }
29
29
  if self._project is not None:
30
30
  headers["X-Project"] = self._project
@@ -352,7 +352,10 @@ class SourcesClient:
352
352
  raise ApiError(status_code=_response.status_code, body=_response_json)
353
353
 
354
354
  def get_sources_metadata(
355
- self, *, request_options: typing.Optional[RequestOptions] = None
355
+ self,
356
+ *,
357
+ include_detailed_per_source_metadata: typing.Optional[bool] = None,
358
+ request_options: typing.Optional[RequestOptions] = None,
356
359
  ) -> OrganizationSourcesStats:
357
360
  """
358
361
  Get aggregated metadata for all sources in an organization.
@@ -361,10 +364,12 @@ class SourcesClient:
361
364
  - Total number of sources
362
365
  - Total number of files across all sources
363
366
  - Total size of all files
364
- - Per-source breakdown with file details (file_name, file_size per file)
367
+ - Per-source breakdown with file details (file_name, file_size per file) if include_detailed_per_source_metadata is True
365
368
 
366
369
  Parameters
367
370
  ----------
371
+ include_detailed_per_source_metadata : typing.Optional[bool]
372
+
368
373
  request_options : typing.Optional[RequestOptions]
369
374
  Request-specific configuration.
370
375
 
@@ -386,6 +391,9 @@ class SourcesClient:
386
391
  _response = self._client_wrapper.httpx_client.request(
387
392
  "v1/sources/metadata",
388
393
  method="GET",
394
+ params={
395
+ "include_detailed_per_source_metadata": include_detailed_per_source_metadata,
396
+ },
389
397
  request_options=request_options,
390
398
  )
391
399
  try:
@@ -1011,7 +1019,10 @@ class AsyncSourcesClient:
1011
1019
  raise ApiError(status_code=_response.status_code, body=_response_json)
1012
1020
 
1013
1021
  async def get_sources_metadata(
1014
- self, *, request_options: typing.Optional[RequestOptions] = None
1022
+ self,
1023
+ *,
1024
+ include_detailed_per_source_metadata: typing.Optional[bool] = None,
1025
+ request_options: typing.Optional[RequestOptions] = None,
1015
1026
  ) -> OrganizationSourcesStats:
1016
1027
  """
1017
1028
  Get aggregated metadata for all sources in an organization.
@@ -1020,10 +1031,12 @@ class AsyncSourcesClient:
1020
1031
  - Total number of sources
1021
1032
  - Total number of files across all sources
1022
1033
  - Total size of all files
1023
- - Per-source breakdown with file details (file_name, file_size per file)
1034
+ - Per-source breakdown with file details (file_name, file_size per file) if include_detailed_per_source_metadata is True
1024
1035
 
1025
1036
  Parameters
1026
1037
  ----------
1038
+ include_detailed_per_source_metadata : typing.Optional[bool]
1039
+
1027
1040
  request_options : typing.Optional[RequestOptions]
1028
1041
  Request-specific configuration.
1029
1042
 
@@ -1053,6 +1066,9 @@ class AsyncSourcesClient:
1053
1066
  _response = await self._client_wrapper.httpx_client.request(
1054
1067
  "v1/sources/metadata",
1055
1068
  method="GET",
1069
+ params={
1070
+ "include_detailed_per_source_metadata": include_detailed_per_source_metadata,
1071
+ },
1056
1072
  request_options=request_options,
1057
1073
  )
1058
1074
  try:
@@ -2,6 +2,17 @@
2
2
 
3
3
  from .types import TemplatesListResponse, TemplatesListResponseTemplatesItem
4
4
  from . import agents
5
- from .agents import AgentsCreateResponse
5
+ from .agents import (
6
+ AgentsCreateRequestInitialMessageSequenceItem,
7
+ AgentsCreateRequestInitialMessageSequenceItemRole,
8
+ AgentsCreateResponse,
9
+ )
6
10
 
7
- __all__ = ["AgentsCreateResponse", "TemplatesListResponse", "TemplatesListResponseTemplatesItem", "agents"]
11
+ __all__ = [
12
+ "AgentsCreateRequestInitialMessageSequenceItem",
13
+ "AgentsCreateRequestInitialMessageSequenceItemRole",
14
+ "AgentsCreateResponse",
15
+ "TemplatesListResponse",
16
+ "TemplatesListResponseTemplatesItem",
17
+ "agents",
18
+ ]
@@ -1,5 +1,13 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
- from .types import AgentsCreateResponse
3
+ from .types import (
4
+ AgentsCreateRequestInitialMessageSequenceItem,
5
+ AgentsCreateRequestInitialMessageSequenceItemRole,
6
+ AgentsCreateResponse,
7
+ )
4
8
 
5
- __all__ = ["AgentsCreateResponse"]
9
+ __all__ = [
10
+ "AgentsCreateRequestInitialMessageSequenceItem",
11
+ "AgentsCreateRequestInitialMessageSequenceItemRole",
12
+ "AgentsCreateResponse",
13
+ ]
@@ -2,9 +2,11 @@
2
2
 
3
3
  import typing
4
4
  from ...core.client_wrapper import SyncClientWrapper
5
+ from .types.agents_create_request_initial_message_sequence_item import AgentsCreateRequestInitialMessageSequenceItem
5
6
  from ...core.request_options import RequestOptions
6
7
  from .types.agents_create_response import AgentsCreateResponse
7
8
  from ...core.jsonable_encoder import jsonable_encoder
9
+ from ...core.serialization import convert_and_respect_annotation_metadata
8
10
  from ...core.unchecked_base_model import construct_type
9
11
  from ...errors.payment_required_error import PaymentRequiredError
10
12
  from ...types.payment_required_error_body import PaymentRequiredErrorBody
@@ -27,6 +29,9 @@ class AgentsClient:
27
29
  *,
28
30
  tags: typing.Optional[typing.Sequence[str]] = OMIT,
29
31
  agent_name: typing.Optional[str] = OMIT,
32
+ initial_message_sequence: typing.Optional[
33
+ typing.Sequence[AgentsCreateRequestInitialMessageSequenceItem]
34
+ ] = OMIT,
30
35
  memory_variables: typing.Optional[typing.Dict[str, str]] = OMIT,
31
36
  tool_variables: typing.Optional[typing.Dict[str, str]] = OMIT,
32
37
  identity_ids: typing.Optional[typing.Sequence[str]] = OMIT,
@@ -49,6 +54,9 @@ class AgentsClient:
49
54
  agent_name : typing.Optional[str]
50
55
  The name of the agent, optional otherwise a random one will be assigned
51
56
 
57
+ initial_message_sequence : typing.Optional[typing.Sequence[AgentsCreateRequestInitialMessageSequenceItem]]
58
+ Set an initial sequence of messages, if not provided, the agent will start with the default message sequence, if an empty array is provided, the agent will start with no messages
59
+
52
60
  memory_variables : typing.Optional[typing.Dict[str, str]]
53
61
  The memory variables to assign to the agent
54
62
 
@@ -85,6 +93,11 @@ class AgentsClient:
85
93
  json={
86
94
  "tags": tags,
87
95
  "agent_name": agent_name,
96
+ "initial_message_sequence": convert_and_respect_annotation_metadata(
97
+ object_=initial_message_sequence,
98
+ annotation=typing.Sequence[AgentsCreateRequestInitialMessageSequenceItem],
99
+ direction="write",
100
+ ),
88
101
  "memory_variables": memory_variables,
89
102
  "tool_variables": tool_variables,
90
103
  "identity_ids": identity_ids,
@@ -131,6 +144,9 @@ class AsyncAgentsClient:
131
144
  *,
132
145
  tags: typing.Optional[typing.Sequence[str]] = OMIT,
133
146
  agent_name: typing.Optional[str] = OMIT,
147
+ initial_message_sequence: typing.Optional[
148
+ typing.Sequence[AgentsCreateRequestInitialMessageSequenceItem]
149
+ ] = OMIT,
134
150
  memory_variables: typing.Optional[typing.Dict[str, str]] = OMIT,
135
151
  tool_variables: typing.Optional[typing.Dict[str, str]] = OMIT,
136
152
  identity_ids: typing.Optional[typing.Sequence[str]] = OMIT,
@@ -153,6 +169,9 @@ class AsyncAgentsClient:
153
169
  agent_name : typing.Optional[str]
154
170
  The name of the agent, optional otherwise a random one will be assigned
155
171
 
172
+ initial_message_sequence : typing.Optional[typing.Sequence[AgentsCreateRequestInitialMessageSequenceItem]]
173
+ Set an initial sequence of messages, if not provided, the agent will start with the default message sequence, if an empty array is provided, the agent will start with no messages
174
+
156
175
  memory_variables : typing.Optional[typing.Dict[str, str]]
157
176
  The memory variables to assign to the agent
158
177
 
@@ -197,6 +216,11 @@ class AsyncAgentsClient:
197
216
  json={
198
217
  "tags": tags,
199
218
  "agent_name": agent_name,
219
+ "initial_message_sequence": convert_and_respect_annotation_metadata(
220
+ object_=initial_message_sequence,
221
+ annotation=typing.Sequence[AgentsCreateRequestInitialMessageSequenceItem],
222
+ direction="write",
223
+ ),
200
224
  "memory_variables": memory_variables,
201
225
  "tool_variables": tool_variables,
202
226
  "identity_ids": identity_ids,
@@ -1,5 +1,11 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from .agents_create_request_initial_message_sequence_item import AgentsCreateRequestInitialMessageSequenceItem
4
+ from .agents_create_request_initial_message_sequence_item_role import AgentsCreateRequestInitialMessageSequenceItemRole
3
5
  from .agents_create_response import AgentsCreateResponse
4
6
 
5
- __all__ = ["AgentsCreateResponse"]
7
+ __all__ = [
8
+ "AgentsCreateRequestInitialMessageSequenceItem",
9
+ "AgentsCreateRequestInitialMessageSequenceItemRole",
10
+ "AgentsCreateResponse",
11
+ ]
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ....core.unchecked_base_model import UncheckedBaseModel
4
+ from .agents_create_request_initial_message_sequence_item_role import AgentsCreateRequestInitialMessageSequenceItemRole
5
+ import typing
6
+ from ....core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import pydantic
8
+
9
+
10
+ class AgentsCreateRequestInitialMessageSequenceItem(UncheckedBaseModel):
11
+ role: AgentsCreateRequestInitialMessageSequenceItemRole
12
+ content: str
13
+ name: typing.Optional[str] = None
14
+ otid: typing.Optional[str] = None
15
+ sender_id: typing.Optional[str] = None
16
+ batch_item_id: typing.Optional[str] = None
17
+ group_id: typing.Optional[str] = None
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AgentsCreateRequestInitialMessageSequenceItemRole = typing.Union[
6
+ typing.Literal["user", "system", "assistant"], typing.Any
7
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.200
3
+ Version: 0.1.202
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -66,7 +66,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_create_re
66
66
  letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item_access_item.py,sha256=R-H25IpNp9feSrW8Yj3h9O3UTMVvFniQJElogKxLuoE,254
67
67
  letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
68
68
  letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
69
- letta_client/core/client_wrapper.py,sha256=bNpmZuZ6wN_Yaj2H-kno_2GxTBk47MeuUVa2hcKrdPY,2336
69
+ letta_client/core/client_wrapper.py,sha256=bguwVun_a3_bfgHiQbhoLMjzQuKGsKB5YKQaKG1gRDU,2336
70
70
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
71
71
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
72
72
  letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
@@ -127,7 +127,7 @@ letta_client/runs/steps/client.py,sha256=KgpKM6tLn7CgnkUlUihLvxucw4PW4bb_8XPVaEb
127
127
  letta_client/runs/usage/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
128
128
  letta_client/runs/usage/client.py,sha256=LGJL8cPGaVfTG5OBi85KRbwvv3P_jQNehFq2Kg0xrC4,4738
129
129
  letta_client/sources/__init__.py,sha256=kswgCv4UdkSVk1Y4tsMM1HadOwvhh_Fr96VTSMV4Umc,128
130
- letta_client/sources/client.py,sha256=bN1cht7KPYgGhZFQCuPducOl78gMU154Vx4aqY21zT0,43008
130
+ letta_client/sources/client.py,sha256=Y2QaeTMQu8K3wVDBq__3xx9IxIrJ5WIwCVILobpTSck,43690
131
131
  letta_client/sources/files/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
132
132
  letta_client/sources/files/client.py,sha256=6RgAo1778b1o_BLUZKDbdrSvhsLCvK_TnwFXBEUISpM,14659
133
133
  letta_client/sources/passages/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
@@ -142,10 +142,12 @@ letta_client/tags/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw
142
142
  letta_client/tags/client.py,sha256=41ey1rZT5ff1zLQpV4D2pR-HAdvmmqRrtregv7xm-G4,5239
143
143
  letta_client/telemetry/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
144
144
  letta_client/telemetry/client.py,sha256=43lFVUNsA9kx9Di8fcJ4S3xU2ybu5KvoF-UGE6N_5ts,4715
145
- letta_client/templates/__init__.py,sha256=6kqaRnkWVngMoV08wPrkA6urr_lCnE6FRIVq4jj4z1M,313
146
- letta_client/templates/agents/__init__.py,sha256=1tdurb6H9iIIc-Lq68A1xpuidIej7LU1Lz9zCSO4seM,141
147
- letta_client/templates/agents/client.py,sha256=D43K2NVvaEknfxCM32r7b0CxRYzaPIpEmhL4a9KLbps,8113
148
- letta_client/templates/agents/types/__init__.py,sha256=oYK-SXvccx0ZCfsjUdDUYAQ5jZi2UQBkV3nx_DIJJC8,158
145
+ letta_client/templates/__init__.py,sha256=QuQSr63nihN-i_iDN8nRYye73EbutB_4Yfj9QAdWL-8,557
146
+ letta_client/templates/agents/__init__.py,sha256=92KhYgnrVvc0EHXXCqfx2bkD6ru1NISN2haiyOmUsgk,373
147
+ letta_client/templates/agents/client.py,sha256=mnSNe2VYjoLaIENKQf1-pe5Sg0lym8Vxa2AHqXMbdXs,9790
148
+ letta_client/templates/agents/types/__init__.py,sha256=gKrRq3eWX6edFu0WwOli98KEKzhfPGzDz7wyL234dJc,506
149
+ letta_client/templates/agents/types/agents_create_request_initial_message_sequence_item.py,sha256=KDBNZiySf6UGm_r0omZgYq5i5_4V7rDhTHaIwKo1Mug,985
150
+ letta_client/templates/agents/types/agents_create_request_initial_message_sequence_item_role.py,sha256=Xp6uU0_CfWtIBtHdwicF9b4yAcrCYXQyYvxtNKyq-K4,210
149
151
  letta_client/templates/agents/types/agents_create_response.py,sha256=FHjCM6NlichekqQ73bTuGEoYe8xyUle0hcNFv6gocJU,636
150
152
  letta_client/templates/client.py,sha256=wcidkaF0eRgKEYRrDTgKAS_A57MO7H2S_muzznEVmEg,4819
151
153
  letta_client/templates/types/__init__.py,sha256=dAr_dEh0BdwUxAcV1sJ9RM07Z8nCv4dCK6fmTltqQ6c,286
@@ -421,6 +423,6 @@ letta_client/types/web_search_options_user_location_approximate.py,sha256=Ywk01J
421
423
  letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
422
424
  letta_client/voice/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
423
425
  letta_client/voice/client.py,sha256=47iQYCuW_qpKI4hM3pYVxn3hw7kgQj3emU1_oRpkRMA,5811
424
- letta_client-0.1.200.dist-info/METADATA,sha256=38RDsGTsK7W2VSyxbqIbqFHLQvnkojP9XPJF0Xgbccg,5177
425
- letta_client-0.1.200.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
426
- letta_client-0.1.200.dist-info/RECORD,,
426
+ letta_client-0.1.202.dist-info/METADATA,sha256=aXfG8UePDVBTX1svHB1I3BG4h_Ti-hHqp41m6ZA04KU,5177
427
+ letta_client-0.1.202.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
428
+ letta_client-0.1.202.dist-info/RECORD,,