letta-client 0.1.197__py3-none-any.whl → 0.1.199__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
@@ -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,
@@ -234,6 +235,7 @@ from .types import (
234
235
  UpdateAssistantMessageContent,
235
236
  UpdateReasoningMessage,
236
237
  UpdateSsemcpServer,
238
+ UpdateStdioMcpServer,
237
239
  UpdateStreamableHttpmcpServer,
238
240
  UpdateSystemMessage,
239
241
  UpdateUserMessage,
@@ -437,6 +439,7 @@ __all__ = [
437
439
  "CreateAgentRequestToolRulesItem",
438
440
  "CreateBlock",
439
441
  "DeleteMcpServerResponseItem",
442
+ "DuplicateFileHandling",
440
443
  "DynamicManager",
441
444
  "DynamicManagerUpdate",
442
445
  "E2BSandboxConfig",
@@ -605,6 +608,7 @@ __all__ = [
605
608
  "UpdateMcpServerResponse",
606
609
  "UpdateReasoningMessage",
607
610
  "UpdateSsemcpServer",
611
+ "UpdateStdioMcpServer",
608
612
  "UpdateStreamableHttpmcpServer",
609
613
  "UpdateSystemMessage",
610
614
  "UpdateUserMessage",
@@ -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.197",
27
+ "X-Fern-SDK-Version": "0.1.199",
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, source_id: str, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
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, source_id: str, *, file: core.File, request_options: typing.Optional[RequestOptions] = None
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,
@@ -1274,7 +1274,7 @@ class ToolsClient:
1274
1274
 
1275
1275
  Examples
1276
1276
  --------
1277
- from letta_client import Letta, UpdateSsemcpServer
1277
+ from letta_client import Letta, UpdateStdioMcpServer
1278
1278
 
1279
1279
  client = Letta(
1280
1280
  project="YOUR_PROJECT",
@@ -1282,7 +1282,7 @@ class ToolsClient:
1282
1282
  )
1283
1283
  client.tools.update_mcp_server(
1284
1284
  mcp_server_name="mcp_server_name",
1285
- request=UpdateSsemcpServer(),
1285
+ request=UpdateStdioMcpServer(),
1286
1286
  )
1287
1287
  """
1288
1288
  _response = self._client_wrapper.httpx_client.request(
@@ -2770,7 +2770,7 @@ class AsyncToolsClient:
2770
2770
  --------
2771
2771
  import asyncio
2772
2772
 
2773
- from letta_client import AsyncLetta, UpdateSsemcpServer
2773
+ from letta_client import AsyncLetta, UpdateStdioMcpServer
2774
2774
 
2775
2775
  client = AsyncLetta(
2776
2776
  project="YOUR_PROJECT",
@@ -2781,7 +2781,7 @@ class AsyncToolsClient:
2781
2781
  async def main() -> None:
2782
2782
  await client.tools.update_mcp_server(
2783
2783
  mcp_server_name="mcp_server_name",
2784
- request=UpdateSsemcpServer(),
2784
+ request=UpdateStdioMcpServer(),
2785
2785
  )
2786
2786
 
2787
2787
 
@@ -1,7 +1,8 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  import typing
4
+ from ...types.update_stdio_mcp_server import UpdateStdioMcpServer
4
5
  from ...types.update_ssemcp_server import UpdateSsemcpServer
5
6
  from ...types.update_streamable_httpmcp_server import UpdateStreamableHttpmcpServer
6
7
 
7
- UpdateMcpServerRequest = typing.Union[UpdateSsemcpServer, UpdateStreamableHttpmcpServer]
8
+ UpdateMcpServerRequest = typing.Union[UpdateStdioMcpServer, UpdateSsemcpServer, UpdateStreamableHttpmcpServer]
@@ -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
@@ -237,6 +238,7 @@ from .update_assistant_message import UpdateAssistantMessage
237
238
  from .update_assistant_message_content import UpdateAssistantMessageContent
238
239
  from .update_reasoning_message import UpdateReasoningMessage
239
240
  from .update_ssemcp_server import UpdateSsemcpServer
241
+ from .update_stdio_mcp_server import UpdateStdioMcpServer
240
242
  from .update_streamable_httpmcp_server import UpdateStreamableHttpmcpServer
241
243
  from .update_system_message import UpdateSystemMessage
242
244
  from .update_user_message import UpdateUserMessage
@@ -344,6 +346,7 @@ __all__ = [
344
346
  "ContinueToolRule",
345
347
  "CoreMemoryBlockSchema",
346
348
  "CreateBlock",
349
+ "DuplicateFileHandling",
347
350
  "DynamicManager",
348
351
  "DynamicManagerUpdate",
349
352
  "E2BSandboxConfig",
@@ -493,6 +496,7 @@ __all__ = [
493
496
  "UpdateAssistantMessageContent",
494
497
  "UpdateReasoningMessage",
495
498
  "UpdateSsemcpServer",
499
+ "UpdateStdioMcpServer",
496
500
  "UpdateStreamableHttpmcpServer",
497
501
  "UpdateSystemMessage",
498
502
  "UpdateUserMessage",
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ DuplicateFileHandling = typing.Union[typing.Literal["skip", "error", "suffix"], typing.Any]
@@ -0,0 +1,32 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.unchecked_base_model import UncheckedBaseModel
4
+ import typing
5
+ import pydantic
6
+ from .stdio_server_config import StdioServerConfig
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+
9
+
10
+ class UpdateStdioMcpServer(UncheckedBaseModel):
11
+ """
12
+ Update a Stdio MCP server
13
+ """
14
+
15
+ server_name: typing.Optional[str] = pydantic.Field(default=None)
16
+ """
17
+ The name of the server
18
+ """
19
+
20
+ stdio_config: typing.Optional[StdioServerConfig] = pydantic.Field(default=None)
21
+ """
22
+ The configuration for the server (MCP 'local' client will run this command)
23
+ """
24
+
25
+ if IS_PYDANTIC_V2:
26
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
+ else:
28
+
29
+ class Config:
30
+ frozen = True
31
+ smart_union = True
32
+ extra = pydantic.Extra.allow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-client
3
- Version: 0.1.197
3
+ Version: 0.1.199
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=PaPQ6XnP5KGKv2jElXjj6d483LOtbaRGJu3n88rW1WA,18256
1
+ letta_client/__init__.py,sha256=ncvYffCbjHgkNqwjVFcYumDb9kI32VmuxobtHhelze8,18366
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=xUxNRGy3q-2inkpv1DjYNocNzmS0b9YoeGy6NAntVIs,2336
69
+ letta_client/core/client_wrapper.py,sha256=uSlKkU7kY2e83JC7q-mER5TG32sjZcD2A65FYjUSNlU,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=xyK22UrVGMqHSKR7HNM8YrSY2RUgcI4u_PrVQOXHhtw,13958
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
@@ -152,16 +152,16 @@ letta_client/templates/types/__init__.py,sha256=dAr_dEh0BdwUxAcV1sJ9RM07Z8nCv4dC
152
152
  letta_client/templates/types/templates_list_response.py,sha256=HYloMVzk086c6fFGRYZz-Ozc_Yylozp2aPpweHS5uXI,866
153
153
  letta_client/templates/types/templates_list_response_templates_item.py,sha256=yyJq8wEOb2XIg99uhRMKoy2qD2CbuvI_5FAspwYWnfI,593
154
154
  letta_client/tools/__init__.py,sha256=kSIxsMdzxX6TlriU43BYesswM2yq_iPoF-6-p0LbJKI,525
155
- letta_client/tools/client.py,sha256=b0QnShEpu34pE4VFGj77xQ3xYxTCH1mpmolpmSFlNKs,96995
155
+ letta_client/tools/client.py,sha256=hedvLbLtOgS5evYipbQdp8RBQjUja9Mk9nWfuUrNtxQ,97003
156
156
  letta_client/tools/types/__init__.py,sha256=-U2DGiEFPko6D5VRQQRoiJeHDJqb2iZnrbtHSxhkL5w,751
157
157
  letta_client/tools/types/add_mcp_server_request.py,sha256=m3QdTmY2ZHQUWbxMTNsOhPnseWHVipsOTdSXuC7KHQI,371
158
158
  letta_client/tools/types/add_mcp_server_response_item.py,sha256=DNrB3LwstJzKrw_GRJ8tb3XCEJWfD16WzBoGrGY_ZQI,376
159
159
  letta_client/tools/types/delete_mcp_server_response_item.py,sha256=YLIBE7OD535NJAncGpzMDGaQRe1831DNKcj2UzS9e0c,379
160
160
  letta_client/tools/types/list_mcp_servers_response_value.py,sha256=Eyji5qB7FhowiogsAbpcU_aMyH9zClv9lUMmHOmNPYk,379
161
161
  letta_client/tools/types/test_mcp_server_request.py,sha256=sLlOEZdmLfkHqHCkUjntGbr8_MkBhsqpMQ-HwdNOnq0,372
162
- letta_client/tools/types/update_mcp_server_request.py,sha256=SEMNYHB_mwJNSMHKO7keU0C_CMBktV7lfZUnACPe_fU,314
162
+ letta_client/tools/types/update_mcp_server_request.py,sha256=nCpx9-OvpH0l5iJxEi8kgSok1F1r7liEAZm-kaqBtEo,402
163
163
  letta_client/tools/types/update_mcp_server_response.py,sha256=muwHagaQBMwQI0of9EBCBtG9lD-jELFAevgTB2MjpFQ,375
164
- letta_client/types/__init__.py,sha256=r5jmQakrE5aJBAOwJaeddyygq1E-Rt8uKg4tbtbEYIs,22629
164
+ letta_client/types/__init__.py,sha256=x9wL7fPYikvZZXi2exF3cWIJI4LmXqmHiKW_Dwlj_5g,22803
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
@@ -395,6 +396,7 @@ letta_client/types/update_assistant_message.py,sha256=D-51o8uXk3X_2Fb2zJ4KoMeRxP
395
396
  letta_client/types/update_assistant_message_content.py,sha256=rh3DP_SpxyBNnf0EDtoaKmPIPV-cXRSFju33NbHgeF0,247
396
397
  letta_client/types/update_reasoning_message.py,sha256=2ejxLRNfVDWBfGQG2-A1JNq-DujOfT7AKXCmyH_RApc,650
397
398
  letta_client/types/update_ssemcp_server.py,sha256=J3rZnjOlKGJAuysbV32ZrWj2RJIEx3OvpKYX4eSxhQM,1198
399
+ letta_client/types/update_stdio_mcp_server.py,sha256=UEnQL5kqEbiU_Kr6_HiDwhYzNPlVOjWysQMD9bOuTM8,942
398
400
  letta_client/types/update_streamable_httpmcp_server.py,sha256=8zOyQlc583_36_J8KofdPy9_ozln2pTvIaSY8dC5TU4,1344
399
401
  letta_client/types/update_system_message.py,sha256=wm2yZUdhRQD5sQhqPiedWZAPECwYvWOvRy1lbALTfCI,779
400
402
  letta_client/types/update_user_message.py,sha256=7K0eNqN-ab2v3rR1FW3LLq7IHk6_0C0lv3zhTtthzzs,860
@@ -419,6 +421,6 @@ letta_client/types/web_search_options_user_location_approximate.py,sha256=Ywk01J
419
421
  letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
420
422
  letta_client/voice/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
421
423
  letta_client/voice/client.py,sha256=47iQYCuW_qpKI4hM3pYVxn3hw7kgQj3emU1_oRpkRMA,5811
422
- letta_client-0.1.197.dist-info/METADATA,sha256=zleshuJ2dHoLmE0SOmUMFd6IM9Znmj4OFQutMG28yP8,5177
423
- letta_client-0.1.197.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
424
- letta_client-0.1.197.dist-info/RECORD,,
424
+ letta_client-0.1.199.dist-info/METADATA,sha256=gc4aPmJV620OywQem79nkf9mO4qOzuJIe0FI7eEcAAc,5177
425
+ letta_client-0.1.199.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
426
+ letta_client-0.1.199.dist-info/RECORD,,