letta-client 0.1.140__py3-none-any.whl → 0.1.142__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 +2 -0
- letta_client/core/client_wrapper.py +1 -1
- letta_client/embedding_models/client.py +22 -0
- letta_client/models/client.py +22 -12
- letta_client/providers/client.py +138 -0
- letta_client/sources/client.py +20 -0
- letta_client/types/__init__.py +2 -0
- letta_client/types/llm_config.py +6 -0
- letta_client/types/provider.py +6 -0
- letta_client/types/provider_category.py +5 -0
- letta_client/types/provider_type.py +1 -1
- letta_client/types/source.py +5 -0
- {letta_client-0.1.140.dist-info → letta_client-0.1.142.dist-info}/METADATA +1 -1
- {letta_client-0.1.140.dist-info → letta_client-0.1.142.dist-info}/RECORD +15 -14
- {letta_client-0.1.140.dist-info → letta_client-0.1.142.dist-info}/WHEEL +0 -0
letta_client/__init__.py
CHANGED
|
@@ -160,6 +160,7 @@ from .types import (
|
|
|
160
160
|
PaymentRequiredErrorBody,
|
|
161
161
|
PipRequirement,
|
|
162
162
|
Provider,
|
|
163
|
+
ProviderCategory,
|
|
163
164
|
ProviderType,
|
|
164
165
|
ReasoningContent,
|
|
165
166
|
ReasoningMessage,
|
|
@@ -489,6 +490,7 @@ __all__ = [
|
|
|
489
490
|
"ProjectsListResponse",
|
|
490
491
|
"ProjectsListResponseProjectsItem",
|
|
491
492
|
"Provider",
|
|
493
|
+
"ProviderCategory",
|
|
492
494
|
"ProviderType",
|
|
493
495
|
"ReasoningContent",
|
|
494
496
|
"ReasoningMessage",
|
|
@@ -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.
|
|
19
|
+
"X-Fern-SDK-Version": "0.1.142",
|
|
20
20
|
}
|
|
21
21
|
if self.token is not None:
|
|
22
22
|
headers["Authorization"] = f"Bearer {self.token}"
|
|
@@ -5,6 +5,8 @@ import typing
|
|
|
5
5
|
from ..core.request_options import RequestOptions
|
|
6
6
|
from ..types.embedding_config import EmbeddingConfig
|
|
7
7
|
from ..core.unchecked_base_model import construct_type
|
|
8
|
+
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
9
|
+
from ..types.http_validation_error import HttpValidationError
|
|
8
10
|
from json.decoder import JSONDecodeError
|
|
9
11
|
from ..core.api_error import ApiError
|
|
10
12
|
from ..core.client_wrapper import AsyncClientWrapper
|
|
@@ -49,6 +51,16 @@ class EmbeddingModelsClient:
|
|
|
49
51
|
object_=_response.json(),
|
|
50
52
|
),
|
|
51
53
|
)
|
|
54
|
+
if _response.status_code == 422:
|
|
55
|
+
raise UnprocessableEntityError(
|
|
56
|
+
typing.cast(
|
|
57
|
+
HttpValidationError,
|
|
58
|
+
construct_type(
|
|
59
|
+
type_=HttpValidationError, # type: ignore
|
|
60
|
+
object_=_response.json(),
|
|
61
|
+
),
|
|
62
|
+
)
|
|
63
|
+
)
|
|
52
64
|
_response_json = _response.json()
|
|
53
65
|
except JSONDecodeError:
|
|
54
66
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -102,6 +114,16 @@ class AsyncEmbeddingModelsClient:
|
|
|
102
114
|
object_=_response.json(),
|
|
103
115
|
),
|
|
104
116
|
)
|
|
117
|
+
if _response.status_code == 422:
|
|
118
|
+
raise UnprocessableEntityError(
|
|
119
|
+
typing.cast(
|
|
120
|
+
HttpValidationError,
|
|
121
|
+
construct_type(
|
|
122
|
+
type_=HttpValidationError, # type: ignore
|
|
123
|
+
object_=_response.json(),
|
|
124
|
+
),
|
|
125
|
+
)
|
|
126
|
+
)
|
|
105
127
|
_response_json = _response.json()
|
|
106
128
|
except JSONDecodeError:
|
|
107
129
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
letta_client/models/client.py
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from ..core.client_wrapper import SyncClientWrapper
|
|
4
4
|
import typing
|
|
5
|
+
from ..types.provider_category import ProviderCategory
|
|
6
|
+
from ..types.provider_type import ProviderType
|
|
5
7
|
from ..core.request_options import RequestOptions
|
|
6
8
|
from ..types.llm_config import LlmConfig
|
|
7
9
|
from ..core.unchecked_base_model import construct_type
|
|
@@ -19,16 +21,19 @@ class ModelsClient:
|
|
|
19
21
|
def list(
|
|
20
22
|
self,
|
|
21
23
|
*,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
provider_category: typing.Optional[typing.Union[ProviderCategory, typing.Sequence[ProviderCategory]]] = None,
|
|
25
|
+
provider_name: typing.Optional[str] = None,
|
|
26
|
+
provider_type: typing.Optional[ProviderType] = None,
|
|
24
27
|
request_options: typing.Optional[RequestOptions] = None,
|
|
25
28
|
) -> typing.List[LlmConfig]:
|
|
26
29
|
"""
|
|
27
30
|
Parameters
|
|
28
31
|
----------
|
|
29
|
-
|
|
32
|
+
provider_category : typing.Optional[typing.Union[ProviderCategory, typing.Sequence[ProviderCategory]]]
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
provider_name : typing.Optional[str]
|
|
35
|
+
|
|
36
|
+
provider_type : typing.Optional[ProviderType]
|
|
32
37
|
|
|
33
38
|
request_options : typing.Optional[RequestOptions]
|
|
34
39
|
Request-specific configuration.
|
|
@@ -51,8 +56,9 @@ class ModelsClient:
|
|
|
51
56
|
"v1/models/",
|
|
52
57
|
method="GET",
|
|
53
58
|
params={
|
|
54
|
-
"
|
|
55
|
-
"
|
|
59
|
+
"provider_category": provider_category,
|
|
60
|
+
"provider_name": provider_name,
|
|
61
|
+
"provider_type": provider_type,
|
|
56
62
|
},
|
|
57
63
|
request_options=request_options,
|
|
58
64
|
)
|
|
@@ -88,16 +94,19 @@ class AsyncModelsClient:
|
|
|
88
94
|
async def list(
|
|
89
95
|
self,
|
|
90
96
|
*,
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
provider_category: typing.Optional[typing.Union[ProviderCategory, typing.Sequence[ProviderCategory]]] = None,
|
|
98
|
+
provider_name: typing.Optional[str] = None,
|
|
99
|
+
provider_type: typing.Optional[ProviderType] = None,
|
|
93
100
|
request_options: typing.Optional[RequestOptions] = None,
|
|
94
101
|
) -> typing.List[LlmConfig]:
|
|
95
102
|
"""
|
|
96
103
|
Parameters
|
|
97
104
|
----------
|
|
98
|
-
|
|
105
|
+
provider_category : typing.Optional[typing.Union[ProviderCategory, typing.Sequence[ProviderCategory]]]
|
|
106
|
+
|
|
107
|
+
provider_name : typing.Optional[str]
|
|
99
108
|
|
|
100
|
-
|
|
109
|
+
provider_type : typing.Optional[ProviderType]
|
|
101
110
|
|
|
102
111
|
request_options : typing.Optional[RequestOptions]
|
|
103
112
|
Request-specific configuration.
|
|
@@ -128,8 +137,9 @@ class AsyncModelsClient:
|
|
|
128
137
|
"v1/models/",
|
|
129
138
|
method="GET",
|
|
130
139
|
params={
|
|
131
|
-
"
|
|
132
|
-
"
|
|
140
|
+
"provider_category": provider_category,
|
|
141
|
+
"provider_name": provider_name,
|
|
142
|
+
"provider_type": provider_type,
|
|
133
143
|
},
|
|
134
144
|
request_options=request_options,
|
|
135
145
|
)
|
letta_client/providers/client.py
CHANGED
|
@@ -303,6 +303,71 @@ class ProvidersClient:
|
|
|
303
303
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
304
304
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
305
305
|
|
|
306
|
+
def check(
|
|
307
|
+
self, *, provider_type: ProviderType, api_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
308
|
+
) -> typing.Optional[typing.Any]:
|
|
309
|
+
"""
|
|
310
|
+
Parameters
|
|
311
|
+
----------
|
|
312
|
+
provider_type : ProviderType
|
|
313
|
+
|
|
314
|
+
api_key : str
|
|
315
|
+
|
|
316
|
+
request_options : typing.Optional[RequestOptions]
|
|
317
|
+
Request-specific configuration.
|
|
318
|
+
|
|
319
|
+
Returns
|
|
320
|
+
-------
|
|
321
|
+
typing.Optional[typing.Any]
|
|
322
|
+
Successful Response
|
|
323
|
+
|
|
324
|
+
Examples
|
|
325
|
+
--------
|
|
326
|
+
from letta_client import Letta
|
|
327
|
+
|
|
328
|
+
client = Letta(
|
|
329
|
+
token="YOUR_TOKEN",
|
|
330
|
+
)
|
|
331
|
+
client.providers.check(
|
|
332
|
+
api_key="x-api-key",
|
|
333
|
+
provider_type="anthropic",
|
|
334
|
+
)
|
|
335
|
+
"""
|
|
336
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
337
|
+
"v1/providers/check",
|
|
338
|
+
method="GET",
|
|
339
|
+
params={
|
|
340
|
+
"provider_type": provider_type,
|
|
341
|
+
},
|
|
342
|
+
headers={
|
|
343
|
+
"x-api-key": str(api_key) if api_key is not None else None,
|
|
344
|
+
},
|
|
345
|
+
request_options=request_options,
|
|
346
|
+
)
|
|
347
|
+
try:
|
|
348
|
+
if 200 <= _response.status_code < 300:
|
|
349
|
+
return typing.cast(
|
|
350
|
+
typing.Optional[typing.Any],
|
|
351
|
+
construct_type(
|
|
352
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
353
|
+
object_=_response.json(),
|
|
354
|
+
),
|
|
355
|
+
)
|
|
356
|
+
if _response.status_code == 422:
|
|
357
|
+
raise UnprocessableEntityError(
|
|
358
|
+
typing.cast(
|
|
359
|
+
HttpValidationError,
|
|
360
|
+
construct_type(
|
|
361
|
+
type_=HttpValidationError, # type: ignore
|
|
362
|
+
object_=_response.json(),
|
|
363
|
+
),
|
|
364
|
+
)
|
|
365
|
+
)
|
|
366
|
+
_response_json = _response.json()
|
|
367
|
+
except JSONDecodeError:
|
|
368
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
369
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
370
|
+
|
|
306
371
|
|
|
307
372
|
class AsyncProvidersClient:
|
|
308
373
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -621,3 +686,76 @@ class AsyncProvidersClient:
|
|
|
621
686
|
except JSONDecodeError:
|
|
622
687
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
623
688
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
689
|
+
|
|
690
|
+
async def check(
|
|
691
|
+
self, *, provider_type: ProviderType, api_key: str, request_options: typing.Optional[RequestOptions] = None
|
|
692
|
+
) -> typing.Optional[typing.Any]:
|
|
693
|
+
"""
|
|
694
|
+
Parameters
|
|
695
|
+
----------
|
|
696
|
+
provider_type : ProviderType
|
|
697
|
+
|
|
698
|
+
api_key : str
|
|
699
|
+
|
|
700
|
+
request_options : typing.Optional[RequestOptions]
|
|
701
|
+
Request-specific configuration.
|
|
702
|
+
|
|
703
|
+
Returns
|
|
704
|
+
-------
|
|
705
|
+
typing.Optional[typing.Any]
|
|
706
|
+
Successful Response
|
|
707
|
+
|
|
708
|
+
Examples
|
|
709
|
+
--------
|
|
710
|
+
import asyncio
|
|
711
|
+
|
|
712
|
+
from letta_client import AsyncLetta
|
|
713
|
+
|
|
714
|
+
client = AsyncLetta(
|
|
715
|
+
token="YOUR_TOKEN",
|
|
716
|
+
)
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
async def main() -> None:
|
|
720
|
+
await client.providers.check(
|
|
721
|
+
api_key="x-api-key",
|
|
722
|
+
provider_type="anthropic",
|
|
723
|
+
)
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
asyncio.run(main())
|
|
727
|
+
"""
|
|
728
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
729
|
+
"v1/providers/check",
|
|
730
|
+
method="GET",
|
|
731
|
+
params={
|
|
732
|
+
"provider_type": provider_type,
|
|
733
|
+
},
|
|
734
|
+
headers={
|
|
735
|
+
"x-api-key": str(api_key) if api_key is not None else None,
|
|
736
|
+
},
|
|
737
|
+
request_options=request_options,
|
|
738
|
+
)
|
|
739
|
+
try:
|
|
740
|
+
if 200 <= _response.status_code < 300:
|
|
741
|
+
return typing.cast(
|
|
742
|
+
typing.Optional[typing.Any],
|
|
743
|
+
construct_type(
|
|
744
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
745
|
+
object_=_response.json(),
|
|
746
|
+
),
|
|
747
|
+
)
|
|
748
|
+
if _response.status_code == 422:
|
|
749
|
+
raise UnprocessableEntityError(
|
|
750
|
+
typing.cast(
|
|
751
|
+
HttpValidationError,
|
|
752
|
+
construct_type(
|
|
753
|
+
type_=HttpValidationError, # type: ignore
|
|
754
|
+
object_=_response.json(),
|
|
755
|
+
),
|
|
756
|
+
)
|
|
757
|
+
)
|
|
758
|
+
_response_json = _response.json()
|
|
759
|
+
except JSONDecodeError:
|
|
760
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
761
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
letta_client/sources/client.py
CHANGED
|
@@ -200,6 +200,7 @@ class SourcesClient:
|
|
|
200
200
|
*,
|
|
201
201
|
name: typing.Optional[str] = OMIT,
|
|
202
202
|
description: typing.Optional[str] = OMIT,
|
|
203
|
+
instructions: typing.Optional[str] = OMIT,
|
|
203
204
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
204
205
|
embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
|
|
205
206
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -217,6 +218,9 @@ class SourcesClient:
|
|
|
217
218
|
description : typing.Optional[str]
|
|
218
219
|
The description of the source.
|
|
219
220
|
|
|
221
|
+
instructions : typing.Optional[str]
|
|
222
|
+
Instructions for how to use the source.
|
|
223
|
+
|
|
220
224
|
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
221
225
|
Metadata associated with the source.
|
|
222
226
|
|
|
@@ -248,6 +252,7 @@ class SourcesClient:
|
|
|
248
252
|
json={
|
|
249
253
|
"name": name,
|
|
250
254
|
"description": description,
|
|
255
|
+
"instructions": instructions,
|
|
251
256
|
"metadata": metadata,
|
|
252
257
|
"embedding_config": convert_and_respect_annotation_metadata(
|
|
253
258
|
object_=embedding_config, annotation=EmbeddingConfig, direction="write"
|
|
@@ -399,6 +404,7 @@ class SourcesClient:
|
|
|
399
404
|
embedding_chunk_size: typing.Optional[int] = OMIT,
|
|
400
405
|
embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
|
|
401
406
|
description: typing.Optional[str] = OMIT,
|
|
407
|
+
instructions: typing.Optional[str] = OMIT,
|
|
402
408
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
403
409
|
request_options: typing.Optional[RequestOptions] = None,
|
|
404
410
|
) -> Source:
|
|
@@ -422,6 +428,9 @@ class SourcesClient:
|
|
|
422
428
|
description : typing.Optional[str]
|
|
423
429
|
The description of the source.
|
|
424
430
|
|
|
431
|
+
instructions : typing.Optional[str]
|
|
432
|
+
Instructions for how to use the source.
|
|
433
|
+
|
|
425
434
|
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
426
435
|
Metadata associated with the source.
|
|
427
436
|
|
|
@@ -455,6 +464,7 @@ class SourcesClient:
|
|
|
455
464
|
object_=embedding_config, annotation=EmbeddingConfig, direction="write"
|
|
456
465
|
),
|
|
457
466
|
"description": description,
|
|
467
|
+
"instructions": instructions,
|
|
458
468
|
"metadata": metadata,
|
|
459
469
|
},
|
|
460
470
|
headers={
|
|
@@ -690,6 +700,7 @@ class AsyncSourcesClient:
|
|
|
690
700
|
*,
|
|
691
701
|
name: typing.Optional[str] = OMIT,
|
|
692
702
|
description: typing.Optional[str] = OMIT,
|
|
703
|
+
instructions: typing.Optional[str] = OMIT,
|
|
693
704
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
694
705
|
embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
|
|
695
706
|
request_options: typing.Optional[RequestOptions] = None,
|
|
@@ -707,6 +718,9 @@ class AsyncSourcesClient:
|
|
|
707
718
|
description : typing.Optional[str]
|
|
708
719
|
The description of the source.
|
|
709
720
|
|
|
721
|
+
instructions : typing.Optional[str]
|
|
722
|
+
Instructions for how to use the source.
|
|
723
|
+
|
|
710
724
|
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
711
725
|
Metadata associated with the source.
|
|
712
726
|
|
|
@@ -746,6 +760,7 @@ class AsyncSourcesClient:
|
|
|
746
760
|
json={
|
|
747
761
|
"name": name,
|
|
748
762
|
"description": description,
|
|
763
|
+
"instructions": instructions,
|
|
749
764
|
"metadata": metadata,
|
|
750
765
|
"embedding_config": convert_and_respect_annotation_metadata(
|
|
751
766
|
object_=embedding_config, annotation=EmbeddingConfig, direction="write"
|
|
@@ -915,6 +930,7 @@ class AsyncSourcesClient:
|
|
|
915
930
|
embedding_chunk_size: typing.Optional[int] = OMIT,
|
|
916
931
|
embedding_config: typing.Optional[EmbeddingConfig] = OMIT,
|
|
917
932
|
description: typing.Optional[str] = OMIT,
|
|
933
|
+
instructions: typing.Optional[str] = OMIT,
|
|
918
934
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
919
935
|
request_options: typing.Optional[RequestOptions] = None,
|
|
920
936
|
) -> Source:
|
|
@@ -938,6 +954,9 @@ class AsyncSourcesClient:
|
|
|
938
954
|
description : typing.Optional[str]
|
|
939
955
|
The description of the source.
|
|
940
956
|
|
|
957
|
+
instructions : typing.Optional[str]
|
|
958
|
+
Instructions for how to use the source.
|
|
959
|
+
|
|
941
960
|
metadata : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
942
961
|
Metadata associated with the source.
|
|
943
962
|
|
|
@@ -979,6 +998,7 @@ class AsyncSourcesClient:
|
|
|
979
998
|
object_=embedding_config, annotation=EmbeddingConfig, direction="write"
|
|
980
999
|
),
|
|
981
1000
|
"description": description,
|
|
1001
|
+
"instructions": instructions,
|
|
982
1002
|
"metadata": metadata,
|
|
983
1003
|
},
|
|
984
1004
|
headers={
|
letta_client/types/__init__.py
CHANGED
|
@@ -163,6 +163,7 @@ from .passage import Passage
|
|
|
163
163
|
from .payment_required_error_body import PaymentRequiredErrorBody
|
|
164
164
|
from .pip_requirement import PipRequirement
|
|
165
165
|
from .provider import Provider
|
|
166
|
+
from .provider_category import ProviderCategory
|
|
166
167
|
from .provider_type import ProviderType
|
|
167
168
|
from .reasoning_content import ReasoningContent
|
|
168
169
|
from .reasoning_message import ReasoningMessage
|
|
@@ -395,6 +396,7 @@ __all__ = [
|
|
|
395
396
|
"PaymentRequiredErrorBody",
|
|
396
397
|
"PipRequirement",
|
|
397
398
|
"Provider",
|
|
399
|
+
"ProviderCategory",
|
|
398
400
|
"ProviderType",
|
|
399
401
|
"ReasoningContent",
|
|
400
402
|
"ReasoningMessage",
|
letta_client/types/llm_config.py
CHANGED
|
@@ -4,6 +4,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel
|
|
|
4
4
|
import pydantic
|
|
5
5
|
from .llm_config_model_endpoint_type import LlmConfigModelEndpointType
|
|
6
6
|
import typing
|
|
7
|
+
from .provider_category import ProviderCategory
|
|
7
8
|
from .llm_config_reasoning_effort import LlmConfigReasoningEffort
|
|
8
9
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
10
|
|
|
@@ -43,6 +44,11 @@ class LlmConfig(UncheckedBaseModel):
|
|
|
43
44
|
The provider name for the model.
|
|
44
45
|
"""
|
|
45
46
|
|
|
47
|
+
provider_category: typing.Optional[ProviderCategory] = pydantic.Field(default=None)
|
|
48
|
+
"""
|
|
49
|
+
The provider category for the model.
|
|
50
|
+
"""
|
|
51
|
+
|
|
46
52
|
model_wrapper: typing.Optional[str] = pydantic.Field(default=None)
|
|
47
53
|
"""
|
|
48
54
|
The wrapper for the model.
|
letta_client/types/provider.py
CHANGED
|
@@ -4,6 +4,7 @@ from ..core.unchecked_base_model import UncheckedBaseModel
|
|
|
4
4
|
import typing
|
|
5
5
|
import pydantic
|
|
6
6
|
from .provider_type import ProviderType
|
|
7
|
+
from .provider_category import ProviderCategory
|
|
7
8
|
import datetime as dt
|
|
8
9
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
10
|
|
|
@@ -24,6 +25,11 @@ class Provider(UncheckedBaseModel):
|
|
|
24
25
|
The type of the provider
|
|
25
26
|
"""
|
|
26
27
|
|
|
28
|
+
provider_category: ProviderCategory = pydantic.Field()
|
|
29
|
+
"""
|
|
30
|
+
The category of the provider (base or byok)
|
|
31
|
+
"""
|
|
32
|
+
|
|
27
33
|
api_key: typing.Optional[str] = pydantic.Field(default=None)
|
|
28
34
|
"""
|
|
29
35
|
API key used for requests to the provider.
|
|
@@ -5,6 +5,7 @@ import typing
|
|
|
5
5
|
ProviderType = typing.Union[
|
|
6
6
|
typing.Literal[
|
|
7
7
|
"anthropic",
|
|
8
|
+
"bedrock",
|
|
8
9
|
"google_ai",
|
|
9
10
|
"google_vertex",
|
|
10
11
|
"openai",
|
|
@@ -18,7 +19,6 @@ ProviderType = typing.Union[
|
|
|
18
19
|
"together",
|
|
19
20
|
"azure",
|
|
20
21
|
"vllm",
|
|
21
|
-
"bedrock",
|
|
22
22
|
],
|
|
23
23
|
typing.Any,
|
|
24
24
|
]
|
letta_client/types/source.py
CHANGED
|
@@ -36,6 +36,11 @@ class Source(UncheckedBaseModel):
|
|
|
36
36
|
The description of the source.
|
|
37
37
|
"""
|
|
38
38
|
|
|
39
|
+
instructions: typing.Optional[str] = pydantic.Field(default=None)
|
|
40
|
+
"""
|
|
41
|
+
Instructions for how to use the source.
|
|
42
|
+
"""
|
|
43
|
+
|
|
39
44
|
embedding_config: EmbeddingConfig = pydantic.Field()
|
|
40
45
|
"""
|
|
41
46
|
The embedding configuration used by the source.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
letta_client/__init__.py,sha256=
|
|
1
|
+
letta_client/__init__.py,sha256=wk3irzbI9wDCWPATVEXS-I3EYMfwfrpemBpezmYKM78,16790
|
|
2
2
|
letta_client/agents/__init__.py,sha256=3oFWVxaaxkphkjGJVk31Llb9ll9dKoCGx3B_r3qqtes,1716
|
|
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
|
|
@@ -62,7 +62,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_create_re
|
|
|
62
62
|
letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item_access_item.py,sha256=R-H25IpNp9feSrW8Yj3h9O3UTMVvFniQJElogKxLuoE,254
|
|
63
63
|
letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
|
|
64
64
|
letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
65
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
65
|
+
letta_client/core/client_wrapper.py,sha256=b19Th8HlzAy1Pp_ugoqAMfN8-0GAErLUj12qDUJ14vo,1998
|
|
66
66
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
67
67
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
68
68
|
letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
|
|
@@ -74,7 +74,7 @@ letta_client/core/request_options.py,sha256=h0QUNCFVdCW_7GclVySCAY2w4NhtXVBUCmHg
|
|
|
74
74
|
letta_client/core/serialization.py,sha256=D9h_t-RQON3-CHWs1C4ESY9B-Yd5d-l5lnTLb_X896g,9601
|
|
75
75
|
letta_client/core/unchecked_base_model.py,sha256=zliEPgLnK9yQ1dZ0mHP6agQ7H0bTZk8AvX6VC1r9oPQ,10754
|
|
76
76
|
letta_client/embedding_models/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
77
|
-
letta_client/embedding_models/client.py,sha256=
|
|
77
|
+
letta_client/embedding_models/client.py,sha256=tjDkz83Ygt38w2KCZ4lwnXAEnjxkaw8v5UdxvlyZVP4,4430
|
|
78
78
|
letta_client/environment.py,sha256=91gYLF9bT4-hTPQ9dcPfmub4LgEl-T4a5kW7NXzRIJU,198
|
|
79
79
|
letta_client/errors/__init__.py,sha256=10_VG44lXpy4_YmuBa2_mYIcJMdIqNKPAX1uu-91NXc,541
|
|
80
80
|
letta_client/errors/bad_request_error.py,sha256=_EbO8mWqN9kFZPvIap8qa1lL_EWkRcsZe1HKV9GDWJY,264
|
|
@@ -105,14 +105,14 @@ letta_client/jobs/client.py,sha256=z1Zq6dGs2xbf3EAFuD3-m-qbpbUeqpCBYqtIFKkGoMk,1
|
|
|
105
105
|
letta_client/messages/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
106
106
|
letta_client/messages/client.py,sha256=1L-636T7K3pL9PjNT5OOGRQjL4wS5bj-0hEW6pqZE_Y,7192
|
|
107
107
|
letta_client/models/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
108
|
-
letta_client/models/client.py,sha256=
|
|
108
|
+
letta_client/models/client.py,sha256=A-UUpTT9yjRvwEGkO3umoK9Kof5t7tj14nS_pg9HDkc,5742
|
|
109
109
|
letta_client/projects/__init__.py,sha256=Mg9xvTJ4N4xDkj521w3jvmCgrbW3CYx9LxG7kkdoyzs,211
|
|
110
110
|
letta_client/projects/client.py,sha256=VNJyt5QyAQoZwPDL4PQSVrwBK6jb0vOxleTBuMBJSC4,4229
|
|
111
111
|
letta_client/projects/types/__init__.py,sha256=1nE8QFsR2GukiQxkaRFQfBuk1u_yuO-emykjWq8pXRs,277
|
|
112
112
|
letta_client/projects/types/projects_list_response.py,sha256=LdWVSnP8fqrVTcRfkd73N4wIa5_VkxrAUS-GFftkqHo,858
|
|
113
113
|
letta_client/projects/types/projects_list_response_projects_item.py,sha256=7mFQdVQCNqvl2zBzVWzClENfF9N35T1Wpv3lgYbbAz0,605
|
|
114
114
|
letta_client/providers/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
115
|
-
letta_client/providers/client.py,sha256
|
|
115
|
+
letta_client/providers/client.py,sha256=7XhAT3bEIYFL5TPauaYyGqZWazVsW0zwVod8bP2jYYY,23374
|
|
116
116
|
letta_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
117
|
letta_client/runs/__init__.py,sha256=0Mn3wMqzm7ppXeiwu9zfY_KlyzBbWSM1wt_rsx0NmM0,144
|
|
118
118
|
letta_client/runs/client.py,sha256=6A0i8-fWzRgK1U5P4jeKKav-cRSjaaN5ttMh66ihwe8,17234
|
|
@@ -123,7 +123,7 @@ letta_client/runs/steps/client.py,sha256=f916x0x6FH7_WzBSl6uw03l-j-QMzr7HzOMNsvC
|
|
|
123
123
|
letta_client/runs/usage/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
124
124
|
letta_client/runs/usage/client.py,sha256=ea7e0R-Lv3VtbkJ-JC4RgYSr4TI2OjD31XeNLiDmUUg,4666
|
|
125
125
|
letta_client/sources/__init__.py,sha256=kswgCv4UdkSVk1Y4tsMM1HadOwvhh_Fr96VTSMV4Umc,128
|
|
126
|
-
letta_client/sources/client.py,sha256=
|
|
126
|
+
letta_client/sources/client.py,sha256=SRxv2SLREAW2eV_vjEYiMKEM5ViSVk_9dEIz75kOElA,33355
|
|
127
127
|
letta_client/sources/files/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
128
128
|
letta_client/sources/files/client.py,sha256=R-9zHK_wWtvW-2K7erQVVh9rR7a5JC4zxmTK3rrWJoU,13289
|
|
129
129
|
letta_client/sources/passages/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
@@ -148,7 +148,7 @@ letta_client/tools/types/add_mcp_server_request.py,sha256=EieZjfOT95sjkpxXdqy7gl
|
|
|
148
148
|
letta_client/tools/types/add_mcp_server_response_item.py,sha256=TWdsKqGb1INhYtpGnAckz0Pw4nZShumSp4pfocRfxCA,270
|
|
149
149
|
letta_client/tools/types/delete_mcp_server_response_item.py,sha256=MeZObU-7tMSCd-S5yuUjNDse6A1hUz1LLjbko0pXaro,273
|
|
150
150
|
letta_client/tools/types/list_mcp_servers_response_value.py,sha256=AIoXu4bO8QNSU7zjL1jj0Rg4313wVtPaTt13W0aevLQ,273
|
|
151
|
-
letta_client/types/__init__.py,sha256=
|
|
151
|
+
letta_client/types/__init__.py,sha256=vUsRUK8vq8FTV3DyKMgUy2I4vR92KDKdDuWLwVUfvMY,20968
|
|
152
152
|
letta_client/types/action_model.py,sha256=y1e2XMv3skFaNJIBdYoBKgiORzGh05aOVvu-qVR9uHg,1240
|
|
153
153
|
letta_client/types/action_parameters_model.py,sha256=LgKf5aPZG3-OHGxFdXiSokIDgce8c02xPYIAY05VgW8,828
|
|
154
154
|
letta_client/types/action_response_model.py,sha256=yq2Fd9UU8j7vvtE3VqXUoRRvDzWcfJPj_95ynGdeHCs,824
|
|
@@ -275,7 +275,7 @@ letta_client/types/letta_request_config.py,sha256=b6K4QtDdHjcZKfBb1fugUuoPrT2N4d
|
|
|
275
275
|
letta_client/types/letta_response.py,sha256=i5gAUTgWzIst_RP8I_zSh0GSnLIS3z--1BmK6EF1mkQ,1315
|
|
276
276
|
letta_client/types/letta_streaming_request.py,sha256=jm0HLzfzWzIRs8uwtX33V5f5Ljw_hFOKOhPjdIZX9cA,1465
|
|
277
277
|
letta_client/types/letta_usage_statistics.py,sha256=k6V72J2TEPd-RQBuUQxF3oylrAMcuSKBskd2nnZmGOw,1886
|
|
278
|
-
letta_client/types/llm_config.py,sha256=
|
|
278
|
+
letta_client/types/llm_config.py,sha256=h22Fiph7-KoLKMgRKKtqqmUZzJwYUe5i02nwfsYluC4,4008
|
|
279
279
|
letta_client/types/llm_config_model_endpoint_type.py,sha256=HOSM5kIZDCNAVCWmASvAk52K819plqGlD66yKQ1xFkI,620
|
|
280
280
|
letta_client/types/llm_config_reasoning_effort.py,sha256=AHL2nI5aeTfPhijnhaL3aiP8EoJhy_Wdupi2pyMm4sA,173
|
|
281
281
|
letta_client/types/local_sandbox_config.py,sha256=jfe7akG_YrJJ8csLaLdev04Zg1x-PTN0XCAL4KifaZI,1387
|
|
@@ -307,8 +307,9 @@ letta_client/types/parent_tool_rule.py,sha256=zPTfn5epS8spEIw71HUbbSX2KYxlIPB-cG
|
|
|
307
307
|
letta_client/types/passage.py,sha256=1OM19TyVCQEL1P3BC58hmzWfawZM4vejiKr0P11dOUk,3034
|
|
308
308
|
letta_client/types/payment_required_error_body.py,sha256=CXPzl1jrozG5PAiJakOK29qmgo5az8FQu_MVmEBxsK4,589
|
|
309
309
|
letta_client/types/pip_requirement.py,sha256=Hmh7VpJhdSfFkafh6QwAehCp0MQUBXv1YAoYP-2wV2M,773
|
|
310
|
-
letta_client/types/provider.py,sha256=
|
|
311
|
-
letta_client/types/
|
|
310
|
+
letta_client/types/provider.py,sha256=9xl9T3TjkjpGX0mfH04CtCF0lcdoTmsGT_K16xR3n7M,1476
|
|
311
|
+
letta_client/types/provider_category.py,sha256=St4tSc_Wc5huF79kb088-L-tRz9Cj2_b5DqEoU4eDIs,156
|
|
312
|
+
letta_client/types/provider_type.py,sha256=ks7hOrwFjZXJdQDWQMtFPZI0LHZKaDm-YZ1fYry11ZY,443
|
|
312
313
|
letta_client/types/reasoning_content.py,sha256=aId-87QjQ4sm_fuCmzIdZZghr-9DFeVV-Lv9x5iVw3I,995
|
|
313
314
|
letta_client/types/reasoning_message.py,sha256=YzZMr_orwDVcrbiSED_kN3004MA579xGe-iRW9hLngg,1606
|
|
314
315
|
letta_client/types/reasoning_message_source.py,sha256=GYOWGm2mje1yYbR8E2kbAeQS--VDrGlpsobEBQHE2cU,186
|
|
@@ -330,7 +331,7 @@ letta_client/types/sandbox_environment_variable_update.py,sha256=JMkX6nzvcBNEemj
|
|
|
330
331
|
letta_client/types/sandbox_type.py,sha256=XSWmX3JIFFrDPQ4i89E8LauXY8kjmJEtaz6e_JheGm4,151
|
|
331
332
|
letta_client/types/sleeptime_manager.py,sha256=oKI3CCoA4guwktWs1bbPdCmv9jg94EeMvbXQWvzbt6M,778
|
|
332
333
|
letta_client/types/sleeptime_manager_update.py,sha256=JMzgtvGMDI5VBzlTuzm4FpuFAL7uwPbQgN9TYxip93s,813
|
|
333
|
-
letta_client/types/source.py,sha256=
|
|
334
|
+
letta_client/types/source.py,sha256=BsfE9yrefXREQtskGZnR-TFGqmHkFKIGHC5udtHUi14,2370
|
|
334
335
|
letta_client/types/sse_server_config.py,sha256=b-h5FLm5MELZ5A9bwZt-02Zx_f3UbfKAQS--yHQVOQU,844
|
|
335
336
|
letta_client/types/stdio_server_config.py,sha256=dEQ7bguiLikGemLxYZJ3JCmmEQgAMsSPO_P52oHZSl0,1091
|
|
336
337
|
letta_client/types/step.py,sha256=XE98vMiU34dgUxLPvmJLdp9iWFPjg6E2Pb8xNSURMMg,2988
|
|
@@ -384,6 +385,6 @@ letta_client/voice/__init__.py,sha256=7hX85553PiRMtIMM12a0DSoFzsglNiUziYR2ekS84Q
|
|
|
384
385
|
letta_client/voice/client.py,sha256=STjswa5oOLoP59QwTJvQwi73kgn0UzKOaXc2CsTRI4k,6912
|
|
385
386
|
letta_client/voice/types/__init__.py,sha256=FRc3iKRTONE4N8Lf1IqvnqWZ2kXdrFFvkL7PxVcR8Ew,212
|
|
386
387
|
letta_client/voice/types/create_voice_chat_completions_request_body.py,sha256=ZLfKgNK1T6IAwLEvaBVFfy7jEAoPUXP28n-nfmHkklc,391
|
|
387
|
-
letta_client-0.1.
|
|
388
|
-
letta_client-0.1.
|
|
389
|
-
letta_client-0.1.
|
|
388
|
+
letta_client-0.1.142.dist-info/METADATA,sha256=rZWvGzJhm5ornNFWZ4obYM3ETrmCHeD1e3d03uiJ5UA,5042
|
|
389
|
+
letta_client-0.1.142.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
390
|
+
letta_client-0.1.142.dist-info/RECORD,,
|
|
File without changes
|