letta-client 0.1.290__py3-none-any.whl → 0.1.291__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/core/client_wrapper.py +2 -2
- letta_client/models/client.py +56 -0
- letta_client/models/raw_client.py +50 -0
- letta_client/types/llm_config.py +5 -0
- {letta_client-0.1.290.dist-info → letta_client-0.1.291.dist-info}/METADATA +1 -1
- {letta_client-0.1.290.dist-info → letta_client-0.1.291.dist-info}/RECORD +7 -7
- {letta_client-0.1.290.dist-info → letta_client-0.1.291.dist-info}/WHEEL +0 -0
|
@@ -24,10 +24,10 @@ class BaseClientWrapper:
|
|
|
24
24
|
|
|
25
25
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
26
26
|
headers: typing.Dict[str, str] = {
|
|
27
|
-
"User-Agent": "letta-client/0.1.
|
|
27
|
+
"User-Agent": "letta-client/0.1.291",
|
|
28
28
|
"X-Fern-Language": "Python",
|
|
29
29
|
"X-Fern-SDK-Name": "letta-client",
|
|
30
|
-
"X-Fern-SDK-Version": "0.1.
|
|
30
|
+
"X-Fern-SDK-Version": "0.1.291",
|
|
31
31
|
**(self.get_custom_headers() or {}),
|
|
32
32
|
}
|
|
33
33
|
if self._project is not None:
|
letta_client/models/client.py
CHANGED
|
@@ -70,6 +70,30 @@ class ModelsClient:
|
|
|
70
70
|
)
|
|
71
71
|
return _response.data
|
|
72
72
|
|
|
73
|
+
def listembeddingmodels(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
74
|
+
"""
|
|
75
|
+
Parameters
|
|
76
|
+
----------
|
|
77
|
+
request_options : typing.Optional[RequestOptions]
|
|
78
|
+
Request-specific configuration.
|
|
79
|
+
|
|
80
|
+
Returns
|
|
81
|
+
-------
|
|
82
|
+
None
|
|
83
|
+
|
|
84
|
+
Examples
|
|
85
|
+
--------
|
|
86
|
+
from letta_client import Letta
|
|
87
|
+
|
|
88
|
+
client = Letta(
|
|
89
|
+
project="YOUR_PROJECT",
|
|
90
|
+
token="YOUR_TOKEN",
|
|
91
|
+
)
|
|
92
|
+
client.models.listembeddingmodels()
|
|
93
|
+
"""
|
|
94
|
+
_response = self._raw_client.listembeddingmodels(request_options=request_options)
|
|
95
|
+
return _response.data
|
|
96
|
+
|
|
73
97
|
|
|
74
98
|
class AsyncModelsClient:
|
|
75
99
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -138,3 +162,35 @@ class AsyncModelsClient:
|
|
|
138
162
|
request_options=request_options,
|
|
139
163
|
)
|
|
140
164
|
return _response.data
|
|
165
|
+
|
|
166
|
+
async def listembeddingmodels(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
167
|
+
"""
|
|
168
|
+
Parameters
|
|
169
|
+
----------
|
|
170
|
+
request_options : typing.Optional[RequestOptions]
|
|
171
|
+
Request-specific configuration.
|
|
172
|
+
|
|
173
|
+
Returns
|
|
174
|
+
-------
|
|
175
|
+
None
|
|
176
|
+
|
|
177
|
+
Examples
|
|
178
|
+
--------
|
|
179
|
+
import asyncio
|
|
180
|
+
|
|
181
|
+
from letta_client import AsyncLetta
|
|
182
|
+
|
|
183
|
+
client = AsyncLetta(
|
|
184
|
+
project="YOUR_PROJECT",
|
|
185
|
+
token="YOUR_TOKEN",
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
async def main() -> None:
|
|
190
|
+
await client.models.listembeddingmodels()
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
asyncio.run(main())
|
|
194
|
+
"""
|
|
195
|
+
_response = await self._raw_client.listembeddingmodels(request_options=request_options)
|
|
196
|
+
return _response.data
|
|
@@ -82,6 +82,30 @@ class RawModelsClient:
|
|
|
82
82
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
83
83
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
84
84
|
|
|
85
|
+
def listembeddingmodels(self, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]:
|
|
86
|
+
"""
|
|
87
|
+
Parameters
|
|
88
|
+
----------
|
|
89
|
+
request_options : typing.Optional[RequestOptions]
|
|
90
|
+
Request-specific configuration.
|
|
91
|
+
|
|
92
|
+
Returns
|
|
93
|
+
-------
|
|
94
|
+
HttpResponse[None]
|
|
95
|
+
"""
|
|
96
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
97
|
+
"v1/models/embeddings",
|
|
98
|
+
method="GET",
|
|
99
|
+
request_options=request_options,
|
|
100
|
+
)
|
|
101
|
+
try:
|
|
102
|
+
if 200 <= _response.status_code < 300:
|
|
103
|
+
return HttpResponse(response=_response, data=None)
|
|
104
|
+
_response_json = _response.json()
|
|
105
|
+
except JSONDecodeError:
|
|
106
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
107
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
108
|
+
|
|
85
109
|
|
|
86
110
|
class AsyncRawModelsClient:
|
|
87
111
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -149,3 +173,29 @@ class AsyncRawModelsClient:
|
|
|
149
173
|
except JSONDecodeError:
|
|
150
174
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
151
175
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
176
|
+
|
|
177
|
+
async def listembeddingmodels(
|
|
178
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
179
|
+
) -> AsyncHttpResponse[None]:
|
|
180
|
+
"""
|
|
181
|
+
Parameters
|
|
182
|
+
----------
|
|
183
|
+
request_options : typing.Optional[RequestOptions]
|
|
184
|
+
Request-specific configuration.
|
|
185
|
+
|
|
186
|
+
Returns
|
|
187
|
+
-------
|
|
188
|
+
AsyncHttpResponse[None]
|
|
189
|
+
"""
|
|
190
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
191
|
+
"v1/models/embeddings",
|
|
192
|
+
method="GET",
|
|
193
|
+
request_options=request_options,
|
|
194
|
+
)
|
|
195
|
+
try:
|
|
196
|
+
if 200 <= _response.status_code < 300:
|
|
197
|
+
return AsyncHttpResponse(response=_response, data=None)
|
|
198
|
+
_response_json = _response.json()
|
|
199
|
+
except JSONDecodeError:
|
|
200
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
201
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
letta_client/types/llm_config.py
CHANGED
|
@@ -102,6 +102,11 @@ class LlmConfig(UncheckedBaseModel):
|
|
|
102
102
|
Soft control for how verbose model output should be, used for GPT-5 models.
|
|
103
103
|
"""
|
|
104
104
|
|
|
105
|
+
tier: typing.Optional[str] = pydantic.Field(default=None)
|
|
106
|
+
"""
|
|
107
|
+
The cost tier for the model (cloud only).
|
|
108
|
+
"""
|
|
109
|
+
|
|
105
110
|
if IS_PYDANTIC_V2:
|
|
106
111
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
107
112
|
else:
|
|
@@ -89,7 +89,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_list_clie
|
|
|
89
89
|
letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item_policy_data_item_access_item.py,sha256=kNHfEWFl7u71Pu8NPqutod0a2NXfvq8il05Hqm0iBB4,284
|
|
90
90
|
letta_client/core/__init__.py,sha256=tpn7rjb6C2UIkYZYIqdrNpI7Yax2jw88sXh2baxaxAI,1715
|
|
91
91
|
letta_client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
|
|
92
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
92
|
+
letta_client/core/client_wrapper.py,sha256=gV0nEWwpEBvS9vZK596Xs0YJu6X-ymdb4sdwLQF-i6Q,2776
|
|
93
93
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
94
94
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
95
95
|
letta_client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
|
|
@@ -150,8 +150,8 @@ letta_client/messages/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqh
|
|
|
150
150
|
letta_client/messages/client.py,sha256=XkRwRPmkGURZY9cmwqi3TABOaYO2cFL27FmgZB0vPvo,5397
|
|
151
151
|
letta_client/messages/raw_client.py,sha256=lARe5xhB0ntMkrSwWyi0SruzuEQ_tCcN7hiE3isiYqU,7114
|
|
152
152
|
letta_client/models/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
153
|
-
letta_client/models/client.py,sha256=
|
|
154
|
-
letta_client/models/raw_client.py,sha256=
|
|
153
|
+
letta_client/models/client.py,sha256=B5QsYjmml0Cxlol8tlbtA8bX-dAu0cXgde4QXb2eVmc,5632
|
|
154
|
+
letta_client/models/raw_client.py,sha256=0AryEdljqcaSwNYQbZ8Q7ieDLuu2Cuk8Z1bdXaKA-VA,7945
|
|
155
155
|
letta_client/projects/__init__.py,sha256=IC61JeyeW7qLtLPtPDy_5kemZCKNeiVEz2TndPEz4GU,231
|
|
156
156
|
letta_client/projects/client.py,sha256=2VojFHMlsyQgDxQer6RndPw5W0l-yXX7WBy7TMhO5AA,3336
|
|
157
157
|
letta_client/projects/raw_client.py,sha256=HhRNyG5FT8810HOaW9lQI2qbG2ZmPyaC7hMMNjYXmC4,4155
|
|
@@ -428,7 +428,7 @@ letta_client/types/letta_stop_reason.py,sha256=jYkXBnAKsdPS8tmdv_xumyVVQk9OoHKFy
|
|
|
428
428
|
letta_client/types/letta_streaming_request.py,sha256=NX8WMPMUWiWJyM3bNBBpdy-cw61VIZQMm6iJcUjhr38,2391
|
|
429
429
|
letta_client/types/letta_usage_statistics.py,sha256=uZZq2lVOGHK6N-VhA0oknQfUjE9Zb0sMYh0mHDvl-lc,1887
|
|
430
430
|
letta_client/types/letta_user_message_content_union.py,sha256=2SrcmMjvsQzCvfIUYG7PkaE4brMZcL6H437GSCLK4zg,230
|
|
431
|
-
letta_client/types/llm_config.py,sha256
|
|
431
|
+
letta_client/types/llm_config.py,sha256=-fyzSmnQpkQ1vqqQOSyuIvMDfgSMMdrDtj-0Tbsw42I,3989
|
|
432
432
|
letta_client/types/llm_config_compatibility_type.py,sha256=m6E90W-R9-Oi3EGSV_GdPIuVC2rmAH7TsUKbl79EiAQ,165
|
|
433
433
|
letta_client/types/llm_config_model_endpoint_type.py,sha256=o59NDg3-3ud2mqAPYze40G7kyVD7pkRRbdT_vdTqL24,602
|
|
434
434
|
letta_client/types/llm_config_reasoning_effort.py,sha256=r4I3i2c7RxkBe-xXOE_XCXwjp9Y0QoaF2SVY7WYPdg4,184
|
|
@@ -566,6 +566,6 @@ letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
|
|
|
566
566
|
letta_client/voice/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
567
567
|
letta_client/voice/client.py,sha256=EbIVOQh4HXqU9McATxwga08STk-HUwPEAUr_UHqyKHg,3748
|
|
568
568
|
letta_client/voice/raw_client.py,sha256=KvM_3GXuSf51bubM0RVBnxvlf20qZTFMnaA_BzhXzjQ,5938
|
|
569
|
-
letta_client-0.1.
|
|
570
|
-
letta_client-0.1.
|
|
571
|
-
letta_client-0.1.
|
|
569
|
+
letta_client-0.1.291.dist-info/METADATA,sha256=qwofn-msHVh-6Do02jW7Sk28tLk7OzTJP0c1VAFVMSw,5782
|
|
570
|
+
letta_client-0.1.291.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
571
|
+
letta_client-0.1.291.dist-info/RECORD,,
|
|
File without changes
|