letta-client 0.1.197__py3-none-any.whl → 0.1.198__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/sources/files/client.py +25 -2
- letta_client/types/__init__.py +2 -0
- letta_client/types/duplicate_file_handling.py +5 -0
- {letta_client-0.1.197.dist-info → letta_client-0.1.198.dist-info}/METADATA +1 -1
- {letta_client-0.1.197.dist-info → letta_client-0.1.198.dist-info}/RECORD +8 -7
- {letta_client-0.1.197.dist-info → letta_client-0.1.198.dist-info}/WHEEL +0 -0
letta_client/__init__.py
CHANGED
|
@@ -85,6 +85,7 @@ from .types import (
|
|
|
85
85
|
ContinueToolRule,
|
|
86
86
|
CoreMemoryBlockSchema,
|
|
87
87
|
CreateBlock,
|
|
88
|
+
DuplicateFileHandling,
|
|
88
89
|
DynamicManager,
|
|
89
90
|
DynamicManagerUpdate,
|
|
90
91
|
E2BSandboxConfig,
|
|
@@ -437,6 +438,7 @@ __all__ = [
|
|
|
437
438
|
"CreateAgentRequestToolRulesItem",
|
|
438
439
|
"CreateBlock",
|
|
439
440
|
"DeleteMcpServerResponseItem",
|
|
441
|
+
"DuplicateFileHandling",
|
|
440
442
|
"DynamicManager",
|
|
441
443
|
"DynamicManagerUpdate",
|
|
442
444
|
"E2BSandboxConfig",
|
|
@@ -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.
|
|
27
|
+
"X-Fern-SDK-Version": "0.1.198",
|
|
28
28
|
}
|
|
29
29
|
if self._project is not None:
|
|
30
30
|
headers["X-Project"] = self._project
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
from ...core.client_wrapper import SyncClientWrapper
|
|
5
5
|
from ... import core
|
|
6
|
+
from ...types.duplicate_file_handling import DuplicateFileHandling
|
|
6
7
|
from ...core.request_options import RequestOptions
|
|
7
8
|
from ...types.file_metadata import FileMetadata
|
|
8
9
|
from ...core.jsonable_encoder import jsonable_encoder
|
|
@@ -22,7 +23,12 @@ class FilesClient:
|
|
|
22
23
|
self._client_wrapper = client_wrapper
|
|
23
24
|
|
|
24
25
|
def upload(
|
|
25
|
-
self,
|
|
26
|
+
self,
|
|
27
|
+
source_id: str,
|
|
28
|
+
*,
|
|
29
|
+
file: core.File,
|
|
30
|
+
duplicate_handling: typing.Optional[DuplicateFileHandling] = None,
|
|
31
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
26
32
|
) -> FileMetadata:
|
|
27
33
|
"""
|
|
28
34
|
Upload a file to a data source.
|
|
@@ -34,6 +40,9 @@ class FilesClient:
|
|
|
34
40
|
file : core.File
|
|
35
41
|
See core.File for more documentation
|
|
36
42
|
|
|
43
|
+
duplicate_handling : typing.Optional[DuplicateFileHandling]
|
|
44
|
+
How to handle duplicate filenames
|
|
45
|
+
|
|
37
46
|
request_options : typing.Optional[RequestOptions]
|
|
38
47
|
Request-specific configuration.
|
|
39
48
|
|
|
@@ -57,6 +66,9 @@ class FilesClient:
|
|
|
57
66
|
_response = self._client_wrapper.httpx_client.request(
|
|
58
67
|
f"v1/sources/{jsonable_encoder(source_id)}/upload",
|
|
59
68
|
method="POST",
|
|
69
|
+
params={
|
|
70
|
+
"duplicate_handling": duplicate_handling,
|
|
71
|
+
},
|
|
60
72
|
data={},
|
|
61
73
|
files={
|
|
62
74
|
"file": file,
|
|
@@ -226,7 +238,12 @@ class AsyncFilesClient:
|
|
|
226
238
|
self._client_wrapper = client_wrapper
|
|
227
239
|
|
|
228
240
|
async def upload(
|
|
229
|
-
self,
|
|
241
|
+
self,
|
|
242
|
+
source_id: str,
|
|
243
|
+
*,
|
|
244
|
+
file: core.File,
|
|
245
|
+
duplicate_handling: typing.Optional[DuplicateFileHandling] = None,
|
|
246
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
230
247
|
) -> FileMetadata:
|
|
231
248
|
"""
|
|
232
249
|
Upload a file to a data source.
|
|
@@ -238,6 +255,9 @@ class AsyncFilesClient:
|
|
|
238
255
|
file : core.File
|
|
239
256
|
See core.File for more documentation
|
|
240
257
|
|
|
258
|
+
duplicate_handling : typing.Optional[DuplicateFileHandling]
|
|
259
|
+
How to handle duplicate filenames
|
|
260
|
+
|
|
241
261
|
request_options : typing.Optional[RequestOptions]
|
|
242
262
|
Request-specific configuration.
|
|
243
263
|
|
|
@@ -269,6 +289,9 @@ class AsyncFilesClient:
|
|
|
269
289
|
_response = await self._client_wrapper.httpx_client.request(
|
|
270
290
|
f"v1/sources/{jsonable_encoder(source_id)}/upload",
|
|
271
291
|
method="POST",
|
|
292
|
+
params={
|
|
293
|
+
"duplicate_handling": duplicate_handling,
|
|
294
|
+
},
|
|
272
295
|
data={},
|
|
273
296
|
files={
|
|
274
297
|
"file": file,
|
letta_client/types/__init__.py
CHANGED
|
@@ -84,6 +84,7 @@ from .context_window_overview import ContextWindowOverview
|
|
|
84
84
|
from .continue_tool_rule import ContinueToolRule
|
|
85
85
|
from .core_memory_block_schema import CoreMemoryBlockSchema
|
|
86
86
|
from .create_block import CreateBlock
|
|
87
|
+
from .duplicate_file_handling import DuplicateFileHandling
|
|
87
88
|
from .dynamic_manager import DynamicManager
|
|
88
89
|
from .dynamic_manager_update import DynamicManagerUpdate
|
|
89
90
|
from .e_2_b_sandbox_config import E2BSandboxConfig
|
|
@@ -344,6 +345,7 @@ __all__ = [
|
|
|
344
345
|
"ContinueToolRule",
|
|
345
346
|
"CoreMemoryBlockSchema",
|
|
346
347
|
"CreateBlock",
|
|
348
|
+
"DuplicateFileHandling",
|
|
347
349
|
"DynamicManager",
|
|
348
350
|
"DynamicManagerUpdate",
|
|
349
351
|
"E2BSandboxConfig",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
letta_client/__init__.py,sha256=
|
|
1
|
+
letta_client/__init__.py,sha256=7UcvvhxkXZUqVZWhBOLHnOxLzgbHcsHqTOV1WFlVWL0,18312
|
|
2
2
|
letta_client/agents/__init__.py,sha256=i9PmBueIWESDLqmpzWt1oZVgZNr1rNkO6j0pl5sgvGo,2049
|
|
3
3
|
letta_client/agents/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
4
4
|
letta_client/agents/blocks/client.py,sha256=4UGPYxfGwNN3ZW-SkIdfVZK6cvCcumVAw0_AM8OmoBY,25046
|
|
@@ -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=
|
|
69
|
+
letta_client/core/client_wrapper.py,sha256=DOS406XB6hHhXcRbskkRFCUTO705UiKQcFzPhO9mvw8,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
|
|
@@ -129,7 +129,7 @@ letta_client/runs/usage/client.py,sha256=LGJL8cPGaVfTG5OBi85KRbwvv3P_jQNehFq2Kg0
|
|
|
129
129
|
letta_client/sources/__init__.py,sha256=kswgCv4UdkSVk1Y4tsMM1HadOwvhh_Fr96VTSMV4Umc,128
|
|
130
130
|
letta_client/sources/client.py,sha256=GVZ8KaFIpWs2gbCJBeYNTJVKB9p3iLcU91u5TZ3fJeg,43006
|
|
131
131
|
letta_client/sources/files/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
132
|
-
letta_client/sources/files/client.py,sha256=
|
|
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
|
|
134
134
|
letta_client/sources/passages/client.py,sha256=G1WtDHHd5RTImEIGMEZ5XXKg3HQQ__y2g6adcKpndfw,6041
|
|
135
135
|
letta_client/steps/__init__.py,sha256=Vitg85t2RrFWGxc4yqPbmd1dDZ44L0A1cnQFVTGRDCw,184
|
|
@@ -161,7 +161,7 @@ letta_client/tools/types/list_mcp_servers_response_value.py,sha256=Eyji5qB7Fhowi
|
|
|
161
161
|
letta_client/tools/types/test_mcp_server_request.py,sha256=sLlOEZdmLfkHqHCkUjntGbr8_MkBhsqpMQ-HwdNOnq0,372
|
|
162
162
|
letta_client/tools/types/update_mcp_server_request.py,sha256=SEMNYHB_mwJNSMHKO7keU0C_CMBktV7lfZUnACPe_fU,314
|
|
163
163
|
letta_client/tools/types/update_mcp_server_response.py,sha256=muwHagaQBMwQI0of9EBCBtG9lD-jELFAevgTB2MjpFQ,375
|
|
164
|
-
letta_client/types/__init__.py,sha256=
|
|
164
|
+
letta_client/types/__init__.py,sha256=11T7t2B__ecZTkzdmYXDuf49JD69yCBAoHzmeSx5Nvk,22717
|
|
165
165
|
letta_client/types/action_model.py,sha256=y1e2XMv3skFaNJIBdYoBKgiORzGh05aOVvu-qVR9uHg,1240
|
|
166
166
|
letta_client/types/action_parameters_model.py,sha256=LgKf5aPZG3-OHGxFdXiSokIDgce8c02xPYIAY05VgW8,828
|
|
167
167
|
letta_client/types/action_response_model.py,sha256=yq2Fd9UU8j7vvtE3VqXUoRRvDzWcfJPj_95ynGdeHCs,824
|
|
@@ -246,6 +246,7 @@ letta_client/types/context_window_overview.py,sha256=9pwiObSxu-SFyQ1pxSTlQiRatVA
|
|
|
246
246
|
letta_client/types/continue_tool_rule.py,sha256=cGKyCh9LwxXJfWKEi8HMAcyBv3QTrmZkwt9YugzwtqY,1035
|
|
247
247
|
letta_client/types/core_memory_block_schema.py,sha256=DGHyLAcFhHBm7oXkhkGIkkckcl9S2bCaU9b3qrUeNtc,984
|
|
248
248
|
letta_client/types/create_block.py,sha256=cyyufU4MBcLGjCNeTFZE7TX4LUhQXIaZAVwaoYkMlpE,1562
|
|
249
|
+
letta_client/types/duplicate_file_handling.py,sha256=H7pDhPZSSbnqPHPo2yGl7xkpHAD9L0yZOdcU5n-9BdE,172
|
|
249
250
|
letta_client/types/dynamic_manager.py,sha256=5DRNqtUnjeTwOe5mkNB-SXItqLOfEX0avSrwsrJt1Aw,853
|
|
250
251
|
letta_client/types/dynamic_manager_update.py,sha256=Kew94BsFP6vP9pUXpZDMFZAo3TyaYWKu1KPgoQQjKYg,888
|
|
251
252
|
letta_client/types/e_2_b_sandbox_config.py,sha256=w3R4QpPjeie5aKw8sb_eKhl78J0k5vLCcATNS3Qaeyw,957
|
|
@@ -419,6 +420,6 @@ letta_client/types/web_search_options_user_location_approximate.py,sha256=Ywk01J
|
|
|
419
420
|
letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
|
|
420
421
|
letta_client/voice/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
421
422
|
letta_client/voice/client.py,sha256=47iQYCuW_qpKI4hM3pYVxn3hw7kgQj3emU1_oRpkRMA,5811
|
|
422
|
-
letta_client-0.1.
|
|
423
|
-
letta_client-0.1.
|
|
424
|
-
letta_client-0.1.
|
|
423
|
+
letta_client-0.1.198.dist-info/METADATA,sha256=zFusdvJHhAKZ7W2nQnqZ69vZptpp3aTfXsvZoP4LJ2s,5177
|
|
424
|
+
letta_client-0.1.198.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
425
|
+
letta_client-0.1.198.dist-info/RECORD,,
|
|
File without changes
|