letta-client 0.1.128__py3-none-any.whl → 0.1.129__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/__init__.py CHANGED
@@ -233,6 +233,7 @@ from . import (
233
233
  batches,
234
234
  blocks,
235
235
  client_side_access_tokens,
236
+ embedding_models,
236
237
  embeddings,
237
238
  groups,
238
239
  health,
@@ -551,6 +552,7 @@ __all__ = [
551
552
  "batches",
552
553
  "blocks",
553
554
  "client_side_access_tokens",
555
+ "embedding_models",
554
556
  "embeddings",
555
557
  "groups",
556
558
  "health",
@@ -10,7 +10,7 @@ from .agents.client import AgentsClient
10
10
  from .groups.client import GroupsClient
11
11
  from .identities.client import IdentitiesClient
12
12
  from .models.client import ModelsClient
13
- from .embeddings.client import EmbeddingsClient
13
+ from .embedding_models.client import EmbeddingModelsClient
14
14
  from .blocks.client import BlocksClient
15
15
  from .jobs.client import JobsClient
16
16
  from .health.client import HealthClient
@@ -20,6 +20,7 @@ from .steps.client import StepsClient
20
20
  from .tags.client import TagsClient
21
21
  from .batches.client import BatchesClient
22
22
  from .voice.client import VoiceClient
23
+ from .embeddings.client import EmbeddingsClient
23
24
  from .templates.client import TemplatesClient
24
25
  from .client_side_access_tokens.client import ClientSideAccessTokensClient
25
26
  from .projects.client import ProjectsClient
@@ -30,7 +31,7 @@ from .agents.client import AsyncAgentsClient
30
31
  from .groups.client import AsyncGroupsClient
31
32
  from .identities.client import AsyncIdentitiesClient
32
33
  from .models.client import AsyncModelsClient
33
- from .embeddings.client import AsyncEmbeddingsClient
34
+ from .embedding_models.client import AsyncEmbeddingModelsClient
34
35
  from .blocks.client import AsyncBlocksClient
35
36
  from .jobs.client import AsyncJobsClient
36
37
  from .health.client import AsyncHealthClient
@@ -40,6 +41,7 @@ from .steps.client import AsyncStepsClient
40
41
  from .tags.client import AsyncTagsClient
41
42
  from .batches.client import AsyncBatchesClient
42
43
  from .voice.client import AsyncVoiceClient
44
+ from .embeddings.client import AsyncEmbeddingsClient
43
45
  from .templates.client import AsyncTemplatesClient
44
46
  from .client_side_access_tokens.client import AsyncClientSideAccessTokensClient
45
47
  from .projects.client import AsyncProjectsClient
@@ -109,7 +111,7 @@ class LettaBase:
109
111
  self.groups = GroupsClient(client_wrapper=self._client_wrapper)
110
112
  self.identities = IdentitiesClient(client_wrapper=self._client_wrapper)
111
113
  self.models = ModelsClient(client_wrapper=self._client_wrapper)
112
- self.embeddings = EmbeddingsClient(client_wrapper=self._client_wrapper)
114
+ self.embedding_models = EmbeddingModelsClient(client_wrapper=self._client_wrapper)
113
115
  self.blocks = BlocksClient(client_wrapper=self._client_wrapper)
114
116
  self.jobs = JobsClient(client_wrapper=self._client_wrapper)
115
117
  self.health = HealthClient(client_wrapper=self._client_wrapper)
@@ -119,6 +121,7 @@ class LettaBase:
119
121
  self.tags = TagsClient(client_wrapper=self._client_wrapper)
120
122
  self.batches = BatchesClient(client_wrapper=self._client_wrapper)
121
123
  self.voice = VoiceClient(client_wrapper=self._client_wrapper)
124
+ self.embeddings = EmbeddingsClient(client_wrapper=self._client_wrapper)
122
125
  self.templates = TemplatesClient(client_wrapper=self._client_wrapper)
123
126
  self.client_side_access_tokens = ClientSideAccessTokensClient(client_wrapper=self._client_wrapper)
124
127
  self.projects = ProjectsClient(client_wrapper=self._client_wrapper)
@@ -188,7 +191,7 @@ class AsyncLettaBase:
188
191
  self.groups = AsyncGroupsClient(client_wrapper=self._client_wrapper)
189
192
  self.identities = AsyncIdentitiesClient(client_wrapper=self._client_wrapper)
190
193
  self.models = AsyncModelsClient(client_wrapper=self._client_wrapper)
191
- self.embeddings = AsyncEmbeddingsClient(client_wrapper=self._client_wrapper)
194
+ self.embedding_models = AsyncEmbeddingModelsClient(client_wrapper=self._client_wrapper)
192
195
  self.blocks = AsyncBlocksClient(client_wrapper=self._client_wrapper)
193
196
  self.jobs = AsyncJobsClient(client_wrapper=self._client_wrapper)
194
197
  self.health = AsyncHealthClient(client_wrapper=self._client_wrapper)
@@ -198,6 +201,7 @@ class AsyncLettaBase:
198
201
  self.tags = AsyncTagsClient(client_wrapper=self._client_wrapper)
199
202
  self.batches = AsyncBatchesClient(client_wrapper=self._client_wrapper)
200
203
  self.voice = AsyncVoiceClient(client_wrapper=self._client_wrapper)
204
+ self.embeddings = AsyncEmbeddingsClient(client_wrapper=self._client_wrapper)
201
205
  self.templates = AsyncTemplatesClient(client_wrapper=self._client_wrapper)
202
206
  self.client_side_access_tokens = AsyncClientSideAccessTokensClient(client_wrapper=self._client_wrapper)
203
207
  self.projects = AsyncProjectsClient(client_wrapper=self._client_wrapper)
@@ -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.128",
19
+ "X-Fern-SDK-Version": "0.1.129",
20
20
  }
21
21
  if self.token is not None:
22
22
  headers["Authorization"] = f"Bearer {self.token}"
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,108 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.client_wrapper import SyncClientWrapper
4
+ import typing
5
+ from ..core.request_options import RequestOptions
6
+ from ..types.embedding_config import EmbeddingConfig
7
+ from ..core.unchecked_base_model import construct_type
8
+ from json.decoder import JSONDecodeError
9
+ from ..core.api_error import ApiError
10
+ from ..core.client_wrapper import AsyncClientWrapper
11
+
12
+
13
+ class EmbeddingModelsClient:
14
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
15
+ self._client_wrapper = client_wrapper
16
+
17
+ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.List[EmbeddingConfig]:
18
+ """
19
+ Parameters
20
+ ----------
21
+ request_options : typing.Optional[RequestOptions]
22
+ Request-specific configuration.
23
+
24
+ Returns
25
+ -------
26
+ typing.List[EmbeddingConfig]
27
+ Successful Response
28
+
29
+ Examples
30
+ --------
31
+ from letta_client import Letta
32
+
33
+ client = Letta(
34
+ token="YOUR_TOKEN",
35
+ )
36
+ client.embedding_models.list()
37
+ """
38
+ _response = self._client_wrapper.httpx_client.request(
39
+ "v1/models/embedding",
40
+ method="GET",
41
+ request_options=request_options,
42
+ )
43
+ try:
44
+ if 200 <= _response.status_code < 300:
45
+ return typing.cast(
46
+ typing.List[EmbeddingConfig],
47
+ construct_type(
48
+ type_=typing.List[EmbeddingConfig], # type: ignore
49
+ object_=_response.json(),
50
+ ),
51
+ )
52
+ _response_json = _response.json()
53
+ except JSONDecodeError:
54
+ raise ApiError(status_code=_response.status_code, body=_response.text)
55
+ raise ApiError(status_code=_response.status_code, body=_response_json)
56
+
57
+
58
+ class AsyncEmbeddingModelsClient:
59
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
60
+ self._client_wrapper = client_wrapper
61
+
62
+ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.List[EmbeddingConfig]:
63
+ """
64
+ Parameters
65
+ ----------
66
+ request_options : typing.Optional[RequestOptions]
67
+ Request-specific configuration.
68
+
69
+ Returns
70
+ -------
71
+ typing.List[EmbeddingConfig]
72
+ Successful Response
73
+
74
+ Examples
75
+ --------
76
+ import asyncio
77
+
78
+ from letta_client import AsyncLetta
79
+
80
+ client = AsyncLetta(
81
+ token="YOUR_TOKEN",
82
+ )
83
+
84
+
85
+ async def main() -> None:
86
+ await client.embedding_models.list()
87
+
88
+
89
+ asyncio.run(main())
90
+ """
91
+ _response = await self._client_wrapper.httpx_client.request(
92
+ "v1/models/embedding",
93
+ method="GET",
94
+ request_options=request_options,
95
+ )
96
+ try:
97
+ if 200 <= _response.status_code < 300:
98
+ return typing.cast(
99
+ typing.List[EmbeddingConfig],
100
+ construct_type(
101
+ type_=typing.List[EmbeddingConfig], # type: ignore
102
+ object_=_response.json(),
103
+ ),
104
+ )
105
+ _response_json = _response.json()
106
+ except JSONDecodeError:
107
+ raise ApiError(status_code=_response.status_code, body=_response.text)
108
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -3,8 +3,6 @@
3
3
  from ..core.client_wrapper import SyncClientWrapper
4
4
  import typing
5
5
  from ..core.request_options import RequestOptions
6
- from ..types.embedding_config import EmbeddingConfig
7
- from ..core.unchecked_base_model import construct_type
8
6
  from json.decoder import JSONDecodeError
9
7
  from ..core.api_error import ApiError
10
8
  from ..core.client_wrapper import AsyncClientWrapper
@@ -14,7 +12,7 @@ class EmbeddingsClient:
14
12
  def __init__(self, *, client_wrapper: SyncClientWrapper):
15
13
  self._client_wrapper = client_wrapper
16
14
 
17
- def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.List[EmbeddingConfig]:
15
+ def get_total_storage_size(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
18
16
  """
19
17
  Parameters
20
18
  ----------
@@ -23,8 +21,7 @@ class EmbeddingsClient:
23
21
 
24
22
  Returns
25
23
  -------
26
- typing.List[EmbeddingConfig]
27
- Successful Response
24
+ None
28
25
 
29
26
  Examples
30
27
  --------
@@ -33,22 +30,16 @@ class EmbeddingsClient:
33
30
  client = Letta(
34
31
  token="YOUR_TOKEN",
35
32
  )
36
- client.embeddings.list()
33
+ client.embeddings.get_total_storage_size()
37
34
  """
38
35
  _response = self._client_wrapper.httpx_client.request(
39
- "v1/models/embedding",
36
+ "v1/embeddings/get_total_storage_size",
40
37
  method="GET",
41
38
  request_options=request_options,
42
39
  )
43
40
  try:
44
41
  if 200 <= _response.status_code < 300:
45
- return typing.cast(
46
- typing.List[EmbeddingConfig],
47
- construct_type(
48
- type_=typing.List[EmbeddingConfig], # type: ignore
49
- object_=_response.json(),
50
- ),
51
- )
42
+ return
52
43
  _response_json = _response.json()
53
44
  except JSONDecodeError:
54
45
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -59,7 +50,7 @@ class AsyncEmbeddingsClient:
59
50
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
60
51
  self._client_wrapper = client_wrapper
61
52
 
62
- async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.List[EmbeddingConfig]:
53
+ async def get_total_storage_size(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
63
54
  """
64
55
  Parameters
65
56
  ----------
@@ -68,8 +59,7 @@ class AsyncEmbeddingsClient:
68
59
 
69
60
  Returns
70
61
  -------
71
- typing.List[EmbeddingConfig]
72
- Successful Response
62
+ None
73
63
 
74
64
  Examples
75
65
  --------
@@ -83,25 +73,19 @@ class AsyncEmbeddingsClient:
83
73
 
84
74
 
85
75
  async def main() -> None:
86
- await client.embeddings.list()
76
+ await client.embeddings.get_total_storage_size()
87
77
 
88
78
 
89
79
  asyncio.run(main())
90
80
  """
91
81
  _response = await self._client_wrapper.httpx_client.request(
92
- "v1/models/embedding",
82
+ "v1/embeddings/get_total_storage_size",
93
83
  method="GET",
94
84
  request_options=request_options,
95
85
  )
96
86
  try:
97
87
  if 200 <= _response.status_code < 300:
98
- return typing.cast(
99
- typing.List[EmbeddingConfig],
100
- construct_type(
101
- type_=typing.List[EmbeddingConfig], # type: ignore
102
- object_=_response.json(),
103
- ),
104
- )
88
+ return
105
89
  _response_json = _response.json()
106
90
  except JSONDecodeError:
107
91
  raise ApiError(status_code=_response.status_code, body=_response.text)
@@ -13,7 +13,7 @@ class LocalSandboxConfig(UncheckedBaseModel):
13
13
  Directory for the sandbox environment.
14
14
  """
15
15
 
16
- use_venv: typing.Optional[bool] = pydantic.Field(default=None)
16
+ force_create_venv: typing.Optional[bool] = pydantic.Field(default=None)
17
17
  """
18
18
  Whether or not to use the venv, or run directly in the same run loop.
19
19
  """
@@ -25,7 +25,7 @@ class LocalSandboxConfig(UncheckedBaseModel):
25
25
 
26
26
  pip_requirements: typing.Optional[typing.List[PipRequirement]] = pydantic.Field(default=None)
27
27
  """
28
- List of pip packages to install with mandatory name and optional version following semantic versioning. This only is considered when use_venv is True.
28
+ List of pip packages to install with mandatory name and optional version following semantic versioning. This only is considered when force_create_venv is True.
29
29
  """
30
30
 
31
31
  if IS_PYDANTIC_V2:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.128
3
+ Version: 0.1.129
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,4 +1,4 @@
1
- letta_client/__init__.py,sha256=f_0v4oYXbsq-6Y56HWxtvUlCjeKPm5jeS_2TjyONXwI,16349
1
+ letta_client/__init__.py,sha256=rsGorrng28XqthYUiWILPS8dqaER3cXAfoHG0bygjYw,16395
2
2
  letta_client/agents/__init__.py,sha256=C46uidjw-_nowv5mqI7lsXUKvoW49utJHL_k-F7HIyY,1616
3
3
  letta_client/agents/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
4
4
  letta_client/agents/blocks/client.py,sha256=u5zvutxoH_DqfSLWhRtNSRBC9_ezQDx682cxkxDz3JA,23822
@@ -42,7 +42,7 @@ letta_client/agents/types/create_agent_request_response_format.py,sha256=1GUV3rF
42
42
  letta_client/agents/types/create_agent_request_tool_rules_item.py,sha256=L3FNsFTG9kVmuPbQhbCKNg3H2E5bB2Rgp92gWmGd-LM,689
43
43
  letta_client/agents/types/update_agent_response_format.py,sha256=oCoGofTKP7no6gNbDV6nJOpF8IlIplr1iPn5_7BA0cU,402
44
44
  letta_client/agents/types/update_agent_tool_rules_item.py,sha256=k9MmcVPsK-EGl8XlT3JQwdlBNLgpGw528jmi8fCFS7g,682
45
- letta_client/base_client.py,sha256=yhzh-KitRM5idpGSn16_rJ8d9RRviTnWdaZ_14ooHo4,9769
45
+ letta_client/base_client.py,sha256=nJ03_MNI8K9S356AgqrTMSsm6cqii7FxJyOkHdQ09JA,10079
46
46
  letta_client/batches/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
47
47
  letta_client/batches/client.py,sha256=AyfQpG9d856XS9BYHjxCIwu08ye03KQjuwA-jd-9kWQ,18774
48
48
  letta_client/blocks/__init__.py,sha256=c6SGOs9_YGdydYAzhe5TUiaXq52rpWT1mNMcke8qGTQ,108
@@ -61,7 +61,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_create_re
61
61
  letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item_access_item.py,sha256=R-H25IpNp9feSrW8Yj3h9O3UTMVvFniQJElogKxLuoE,254
62
62
  letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
63
63
  letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
64
- letta_client/core/client_wrapper.py,sha256=6wsq4X_Mel_R-vaQWqGdJC0vyIfhQG_2OvLGl0xgqJE,1998
64
+ letta_client/core/client_wrapper.py,sha256=KGzHEuOuf1jvkHQycDJkO5UpOkN_l07clX2E3chPCjY,1998
65
65
  letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
66
66
  letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
67
67
  letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
@@ -72,8 +72,10 @@ letta_client/core/remove_none_from_dict.py,sha256=EU9SGgYidWq7SexuJbNs4-PZ-5Bl3V
72
72
  letta_client/core/request_options.py,sha256=h0QUNCFVdCW_7GclVySCAY2w4NhtXVBUCmHgmzaxpcg,1681
73
73
  letta_client/core/serialization.py,sha256=D9h_t-RQON3-CHWs1C4ESY9B-Yd5d-l5lnTLb_X896g,9601
74
74
  letta_client/core/unchecked_base_model.py,sha256=zliEPgLnK9yQ1dZ0mHP6agQ7H0bTZk8AvX6VC1r9oPQ,10754
75
+ letta_client/embedding_models/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
76
+ letta_client/embedding_models/client.py,sha256=3D_iX5yokSmW6QkHzHT0SRuZtv2ZVQ9s0hdlKrFbk9k,3489
75
77
  letta_client/embeddings/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
76
- letta_client/embeddings/client.py,sha256=-ZnjO_6acDCMR51qsuHpBkIj93Nnj1sbvDbF_GlhdYY,3467
78
+ letta_client/embeddings/client.py,sha256=II4xZQMLifdmBDypCYwrulsLJLKnkY_uCCcdHkMhCbk,2773
77
79
  letta_client/environment.py,sha256=91gYLF9bT4-hTPQ9dcPfmub4LgEl-T4a5kW7NXzRIJU,198
78
80
  letta_client/errors/__init__.py,sha256=sf5qYBpvBUchcwEIvulM7AYVGJkiVxknC9OX6TOpOdo,433
79
81
  letta_client/errors/bad_request_error.py,sha256=_EbO8mWqN9kFZPvIap8qa1lL_EWkRcsZe1HKV9GDWJY,264
@@ -273,7 +275,7 @@ letta_client/types/letta_usage_statistics.py,sha256=k6V72J2TEPd-RQBuUQxF3oylrAMc
273
275
  letta_client/types/llm_config.py,sha256=Sg1W1Jx1Ubi368RIzEhcS0wJUsFddBUq-HJ43DcBz3s,3689
274
276
  letta_client/types/llm_config_model_endpoint_type.py,sha256=HOSM5kIZDCNAVCWmASvAk52K819plqGlD66yKQ1xFkI,620
275
277
  letta_client/types/llm_config_reasoning_effort.py,sha256=AHL2nI5aeTfPhijnhaL3aiP8EoJhy_Wdupi2pyMm4sA,173
276
- letta_client/types/local_sandbox_config.py,sha256=jfe7akG_YrJJ8csLaLdev04Zg1x-PTN0XCAL4KifaZI,1387
278
+ letta_client/types/local_sandbox_config.py,sha256=gJNyEJDgyMDEP2798vbXZ5UcRu-yc_ge6XuppwtMLC0,1405
277
279
  letta_client/types/manager_type.py,sha256=GyGqWAihoS81T4RJtOcVSbiOSy-v1cpCWfRB_qU46Y0,197
278
280
  letta_client/types/max_count_per_step_tool_rule.py,sha256=sUhnoL1jolz2sygrmCuF4KfaDUGlBui-FGCXR5762Nc,1056
279
281
  letta_client/types/max_count_per_step_tool_rule_schema.py,sha256=1Zq4vblRTqFycqk7cBQ3gVCUy-MPWvE_tNXV5Fz0VTs,618
@@ -375,6 +377,6 @@ letta_client/voice/__init__.py,sha256=7hX85553PiRMtIMM12a0DSoFzsglNiUziYR2ekS84Q
375
377
  letta_client/voice/client.py,sha256=STjswa5oOLoP59QwTJvQwi73kgn0UzKOaXc2CsTRI4k,6912
376
378
  letta_client/voice/types/__init__.py,sha256=FRc3iKRTONE4N8Lf1IqvnqWZ2kXdrFFvkL7PxVcR8Ew,212
377
379
  letta_client/voice/types/create_voice_chat_completions_request_body.py,sha256=ZLfKgNK1T6IAwLEvaBVFfy7jEAoPUXP28n-nfmHkklc,391
378
- letta_client-0.1.128.dist-info/METADATA,sha256=gem7WiurovD2HiKMti5yq4PuqOtB253miz9FYdR0tVc,5042
379
- letta_client-0.1.128.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
380
- letta_client-0.1.128.dist-info/RECORD,,
380
+ letta_client-0.1.129.dist-info/METADATA,sha256=_tz95T8DIxJf_ET2VHObsv6C2DMm4nbM7a7LZ9sbCBw,5042
381
+ letta_client-0.1.129.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
382
+ letta_client-0.1.129.dist-info/RECORD,,