letta-client 0.1.6__py3-none-any.whl → 0.1.10__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.

Files changed (216) hide show
  1. {letta → letta_client}/__init__.py +33 -27
  2. {letta → letta_client}/agents/__init__.py +40 -29
  3. {letta → letta_client}/agents/archival_memory/client.py +25 -25
  4. letta_client/agents/client.py +1328 -0
  5. {letta → letta_client}/agents/context/client.py +7 -7
  6. letta_client/agents/core_memory/client.py +1080 -0
  7. letta_client/agents/memory_variables/__init__.py +5 -0
  8. {letta/agents/memory → letta_client/agents/memory_variables}/client.py +43 -42
  9. letta_client/agents/memory_variables/types/__init__.py +5 -0
  10. letta/agents/types/agents_get_agent_variables_response.py → letta_client/agents/memory_variables/types/memory_variables_get_response.py +3 -3
  11. {letta → letta_client}/agents/messages/client.py +240 -25
  12. {letta → letta_client}/agents/messages/types/letta_streaming_response.py +21 -16
  13. {letta → letta_client}/agents/messages/types/messages_list_response_item.py +19 -14
  14. {letta → letta_client}/agents/recall_memory/client.py +7 -7
  15. {letta → letta_client}/agents/sources/client.py +7 -7
  16. letta_client/agents/templates/__init__.py +5 -0
  17. letta_client/agents/templates/client.py +578 -0
  18. letta_client/agents/templates/types/__init__.py +5 -0
  19. letta/agents/types/agents_migrate_response.py → letta_client/agents/templates/types/templates_migrate_response.py +3 -3
  20. {letta → letta_client}/agents/tools/client.py +19 -19
  21. letta_client/agents/types/__init__.py +33 -0
  22. letta_client/agents/types/agents_search_request_combinator.py +5 -0
  23. letta/agents/types/agents_search_deployed_agents_request_search_item.py → letta_client/agents/types/agents_search_request_search_item.py +17 -20
  24. letta/agents/types/agents_search_deployed_agents_request_search_item_name.py → letta_client/agents/types/agents_search_request_search_item_name.py +4 -6
  25. letta_client/agents/types/agents_search_request_search_item_name_operator.py +5 -0
  26. letta_client/agents/types/agents_search_request_search_item_order_by.py +22 -0
  27. letta_client/agents/types/agents_search_request_search_item_order_by_direction.py +5 -0
  28. letta_client/agents/types/agents_search_request_search_item_order_by_value.py +5 -0
  29. letta/agents/types/agents_search_deployed_agents_request_search_item_version.py → letta_client/agents/types/agents_search_request_search_item_version.py +2 -2
  30. {letta → letta_client}/blocks/client.py +39 -39
  31. {letta → letta_client}/client.py +10 -2
  32. {letta → letta_client}/core/__init__.py +4 -0
  33. {letta → letta_client}/core/client_wrapper.py +1 -1
  34. letta_client/core/unchecked_base_model.py +305 -0
  35. {letta → letta_client}/health/client.py +5 -5
  36. {letta → letta_client}/jobs/client.py +25 -25
  37. {letta → letta_client}/models/client.py +9 -9
  38. letta_client/providers/client.py +597 -0
  39. letta_client/runs/client.py +876 -0
  40. {letta → letta_client}/sources/client.py +49 -49
  41. {letta → letta_client}/sources/files/client.py +17 -17
  42. {letta → letta_client}/sources/passages/client.py +7 -7
  43. letta_client/tools/__init__.py +2 -0
  44. {letta → letta_client}/tools/client.py +101 -81
  45. {letta → letta_client}/types/__init__.py +8 -0
  46. {letta → letta_client}/types/action_model.py +2 -2
  47. {letta → letta_client}/types/action_parameters_model.py +2 -2
  48. {letta → letta_client}/types/action_response_model.py +2 -2
  49. {letta → letta_client}/types/agent_environment_variable.py +2 -7
  50. {letta → letta_client}/types/agent_state.py +5 -8
  51. letta_client/types/agent_type.py +7 -0
  52. {letta → letta_client}/types/app_auth_scheme.py +2 -2
  53. {letta → letta_client}/types/app_model.py +2 -2
  54. {letta → letta_client}/types/archival_memory_summary.py +2 -2
  55. {letta → letta_client}/types/assistant_file.py +2 -2
  56. {letta → letta_client}/types/assistant_message_input.py +2 -2
  57. {letta → letta_client}/types/assistant_message_output.py +2 -2
  58. {letta → letta_client}/types/auth_request.py +2 -2
  59. {letta → letta_client}/types/auth_response.py +2 -2
  60. {letta → letta_client}/types/auth_scheme_field.py +2 -2
  61. {letta → letta_client}/types/block.py +2 -7
  62. {letta → letta_client}/types/block_update.py +2 -2
  63. {letta → letta_client}/types/chat_completion_request.py +2 -2
  64. {letta → letta_client}/types/chat_completion_response.py +2 -2
  65. {letta → letta_client}/types/child_tool_rule.py +2 -2
  66. {letta → letta_client}/types/choice.py +2 -2
  67. {letta → letta_client}/types/conditional_tool_rule.py +2 -2
  68. {letta → letta_client}/types/conflict_error_body.py +2 -2
  69. {letta → letta_client}/types/context_window_overview.py +2 -2
  70. {letta → letta_client}/types/create_assistant_file_request.py +2 -2
  71. {letta → letta_client}/types/create_assistant_request.py +2 -2
  72. {letta → letta_client}/types/create_block.py +2 -2
  73. {letta → letta_client}/types/delete_assistant_file_response.py +2 -2
  74. {letta → letta_client}/types/delete_assistant_response.py +2 -2
  75. {letta → letta_client}/types/e_2_b_sandbox_config.py +2 -2
  76. {letta → letta_client}/types/embedding_config.py +2 -2
  77. {letta → letta_client}/types/file_metadata.py +2 -7
  78. {letta → letta_client}/types/function_call_input.py +2 -2
  79. {letta → letta_client}/types/function_call_output.py +2 -2
  80. {letta → letta_client}/types/function_schema.py +2 -2
  81. {letta → letta_client}/types/health.py +2 -2
  82. {letta → letta_client}/types/http_validation_error.py +2 -2
  83. {letta → letta_client}/types/init_tool_rule.py +2 -2
  84. {letta → letta_client}/types/internal_server_error_body.py +2 -2
  85. {letta → letta_client}/types/job.py +7 -6
  86. letta_client/types/job_type.py +5 -0
  87. {letta → letta_client}/types/letta_request.py +7 -2
  88. {letta → letta_client}/types/letta_response.py +2 -2
  89. {letta → letta_client}/types/letta_response_messages_item.py +19 -14
  90. {letta → letta_client}/types/letta_schemas_letta_message_tool_call.py +2 -2
  91. {letta → letta_client}/types/letta_schemas_message_message.py +2 -7
  92. {letta → letta_client}/types/letta_schemas_openai_chat_completion_request_tool.py +2 -2
  93. {letta → letta_client}/types/letta_schemas_openai_chat_completion_request_tool_call.py +2 -2
  94. {letta → letta_client}/types/letta_schemas_openai_chat_completion_request_tool_call_function.py +2 -2
  95. {letta → letta_client}/types/letta_schemas_openai_chat_completion_response_message.py +2 -2
  96. {letta → letta_client}/types/letta_schemas_openai_chat_completion_response_tool_call.py +2 -2
  97. {letta → letta_client}/types/letta_schemas_openai_chat_completions_tool_call_function.py +2 -2
  98. {letta → letta_client}/types/letta_schemas_openai_chat_completions_tool_call_input.py +2 -2
  99. {letta → letta_client}/types/letta_schemas_openai_chat_completions_tool_call_output.py +2 -2
  100. {letta → letta_client}/types/letta_schemas_tool_tool.py +9 -8
  101. {letta → letta_client}/types/letta_usage_statistics.py +2 -2
  102. {letta → letta_client}/types/llm_config.py +2 -2
  103. {letta → letta_client}/types/local_sandbox_config.py +2 -2
  104. {letta → letta_client}/types/log_prob_token.py +2 -2
  105. {letta → letta_client}/types/memory.py +2 -2
  106. {letta → letta_client}/types/message_content_log_prob.py +2 -2
  107. {letta → letta_client}/types/message_create.py +2 -2
  108. {letta → letta_client}/types/not_found_error_body.py +2 -2
  109. {letta → letta_client}/types/open_ai_assistant.py +2 -2
  110. {letta → letta_client}/types/organization.py +2 -2
  111. {letta → letta_client}/types/organization_create.py +2 -2
  112. {letta → letta_client}/types/passage.py +2 -7
  113. letta_client/types/provider.py +38 -0
  114. {letta → letta_client}/types/reasoning_message.py +2 -2
  115. {letta → letta_client}/types/recall_memory_summary.py +2 -2
  116. {letta → letta_client}/types/response_format.py +2 -2
  117. letta_client/types/run.py +77 -0
  118. {letta → letta_client}/types/sandbox_config.py +2 -7
  119. {letta → letta_client}/types/sandbox_config_create.py +2 -2
  120. {letta → letta_client}/types/sandbox_config_update.py +2 -2
  121. {letta → letta_client}/types/sandbox_environment_variable.py +2 -7
  122. {letta → letta_client}/types/sandbox_environment_variable_create.py +2 -2
  123. {letta → letta_client}/types/sandbox_environment_variable_update.py +2 -2
  124. {letta → letta_client}/types/source.py +2 -7
  125. {letta → letta_client}/types/system_message_input.py +2 -2
  126. {letta → letta_client}/types/system_message_output.py +2 -2
  127. {letta → letta_client}/types/terminal_tool_rule.py +2 -2
  128. {letta → letta_client}/types/tool_call_delta.py +2 -2
  129. {letta → letta_client}/types/tool_call_function_output.py +2 -2
  130. {letta → letta_client}/types/tool_call_message.py +2 -2
  131. {letta → letta_client}/types/tool_create.py +2 -2
  132. {letta → letta_client}/types/tool_function_choice.py +2 -2
  133. {letta → letta_client}/types/tool_input.py +2 -2
  134. {letta → letta_client}/types/tool_message.py +2 -2
  135. {letta → letta_client}/types/tool_return_message.py +2 -2
  136. letta_client/types/tool_type.py +5 -0
  137. {letta → letta_client}/types/usage_statistics.py +2 -2
  138. {letta → letta_client}/types/user.py +2 -7
  139. {letta → letta_client}/types/user_create.py +2 -7
  140. {letta → letta_client}/types/user_message_input.py +2 -2
  141. {letta → letta_client}/types/user_message_output.py +2 -2
  142. {letta → letta_client}/types/user_update.py +2 -7
  143. {letta → letta_client}/types/validation_error.py +2 -2
  144. {letta_client-0.1.6.dist-info → letta_client-0.1.10.dist-info}/METADATA +7 -7
  145. letta_client-0.1.10.dist-info/RECORD +204 -0
  146. letta/agents/client.py +0 -2644
  147. letta/agents/memory/__init__.py +0 -5
  148. letta/agents/memory/messages/client.py +0 -147
  149. letta/agents/memory_blocks/client.py +0 -364
  150. letta/agents/types/__init__.py +0 -47
  151. letta/agents/types/agents_search_deployed_agents_request_combinator.py +0 -5
  152. letta/agents/types/agents_search_deployed_agents_request_search_item_name_operator.py +0 -7
  153. letta/agents/types/agents_search_deployed_agents_request_search_item_order_by.py +0 -26
  154. letta/agents/types/agents_search_deployed_agents_request_search_item_order_by_direction.py +0 -5
  155. letta/agents/types/agents_search_deployed_agents_request_search_item_order_by_value.py +0 -7
  156. letta/types/agent_type.py +0 -8
  157. letta_client-0.1.6.dist-info/RECORD +0 -193
  158. {letta → letta_client}/agents/archival_memory/__init__.py +0 -0
  159. {letta → letta_client}/agents/context/__init__.py +0 -0
  160. {letta/agents/memory/messages → letta_client/agents/core_memory}/__init__.py +0 -0
  161. {letta → letta_client}/agents/messages/__init__.py +0 -0
  162. {letta → letta_client}/agents/messages/types/__init__.py +0 -0
  163. {letta → letta_client}/agents/messages/types/messages_list_response.py +0 -0
  164. {letta/agents/memory_blocks → letta_client/agents/recall_memory}/__init__.py +0 -0
  165. {letta/agents/recall_memory → letta_client/agents/sources}/__init__.py +0 -0
  166. {letta/agents/sources → letta_client/agents/tools}/__init__.py +0 -0
  167. {letta → letta_client}/agents/types/create_agent_request_tool_rules_item.py +0 -0
  168. {letta → letta_client}/agents/types/update_agent_tool_rules_item.py +0 -0
  169. {letta/agents/tools → letta_client/blocks}/__init__.py +0 -0
  170. {letta → letta_client}/core/api_error.py +0 -0
  171. {letta → letta_client}/core/datetime_utils.py +0 -0
  172. {letta → letta_client}/core/file.py +0 -0
  173. {letta → letta_client}/core/http_client.py +0 -0
  174. {letta → letta_client}/core/jsonable_encoder.py +0 -0
  175. {letta → letta_client}/core/pydantic_utilities.py +0 -0
  176. {letta → letta_client}/core/query_encoder.py +0 -0
  177. {letta → letta_client}/core/remove_none_from_dict.py +0 -0
  178. {letta → letta_client}/core/request_options.py +0 -0
  179. {letta → letta_client}/core/serialization.py +0 -0
  180. {letta → letta_client}/environment.py +0 -0
  181. {letta → letta_client}/errors/__init__.py +0 -0
  182. {letta → letta_client}/errors/conflict_error.py +0 -0
  183. {letta → letta_client}/errors/internal_server_error.py +0 -0
  184. {letta → letta_client}/errors/not_found_error.py +0 -0
  185. {letta → letta_client}/errors/unprocessable_entity_error.py +0 -0
  186. {letta/blocks → letta_client/health}/__init__.py +0 -0
  187. {letta/health → letta_client/jobs}/__init__.py +0 -0
  188. {letta/jobs → letta_client/models}/__init__.py +0 -0
  189. {letta/models → letta_client/providers}/__init__.py +0 -0
  190. {letta → letta_client}/py.typed +0 -0
  191. {letta/sources/files → letta_client/runs}/__init__.py +0 -0
  192. {letta → letta_client}/sources/__init__.py +0 -0
  193. {letta/sources/passages → letta_client/sources/files}/__init__.py +0 -0
  194. {letta/tools → letta_client/sources/passages}/__init__.py +0 -0
  195. {letta → letta_client}/types/agent_state_tool_rules_item.py +0 -0
  196. {letta → letta_client}/types/app_auth_scheme_auth_mode.py +0 -0
  197. {letta → letta_client}/types/chat_completion_request_function_call.py +0 -0
  198. {letta → letta_client}/types/chat_completion_request_messages_item.py +0 -0
  199. {letta → letta_client}/types/chat_completion_request_stop.py +0 -0
  200. {letta → letta_client}/types/chat_completion_request_tool_choice.py +0 -0
  201. {letta → letta_client}/types/embedding_config_embedding_endpoint_type.py +0 -0
  202. {letta → letta_client}/types/job_status.py +0 -0
  203. {letta → letta_client}/types/llm_config_model_endpoint_type.py +0 -0
  204. {letta → letta_client}/types/message_create_role.py +0 -0
  205. {letta → letta_client}/types/message_role.py +0 -0
  206. {letta → letta_client}/types/not_found_error_body_message.py +0 -0
  207. {letta → letta_client}/types/sandbox_config_create_config.py +0 -0
  208. {letta → letta_client}/types/sandbox_config_update_config.py +0 -0
  209. {letta → letta_client}/types/sandbox_type.py +0 -0
  210. {letta → letta_client}/types/tool_call_message_tool_call.py +0 -0
  211. {letta → letta_client}/types/tool_return_message_status.py +0 -0
  212. {letta → letta_client}/types/tool_rule_type.py +0 -0
  213. {letta → letta_client}/types/user_message_input_content.py +0 -0
  214. {letta → letta_client}/types/validation_error_loc_item.py +0 -0
  215. {letta → letta_client}/version.py +0 -0
  216. {letta_client-0.1.6.dist-info → letta_client-0.1.10.dist-info}/WHEEL +0 -0
@@ -4,7 +4,7 @@ import typing
4
4
  from ..core.client_wrapper import SyncClientWrapper
5
5
  from ..core.request_options import RequestOptions
6
6
  from ..types.block import Block
7
- from ..core.pydantic_utilities import parse_obj_as
7
+ from ..core.unchecked_base_model import construct_type
8
8
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
9
9
  from ..types.http_validation_error import HttpValidationError
10
10
  from json.decoder import JSONDecodeError
@@ -50,7 +50,7 @@ class BlocksClient:
50
50
 
51
51
  Examples
52
52
  --------
53
- from letta import Letta
53
+ from letta_client import Letta
54
54
 
55
55
  client = Letta(
56
56
  token="YOUR_TOKEN",
@@ -71,7 +71,7 @@ class BlocksClient:
71
71
  if 200 <= _response.status_code < 300:
72
72
  return typing.cast(
73
73
  typing.List[Block],
74
- parse_obj_as(
74
+ construct_type(
75
75
  type_=typing.List[Block], # type: ignore
76
76
  object_=_response.json(),
77
77
  ),
@@ -80,7 +80,7 @@ class BlocksClient:
80
80
  raise UnprocessableEntityError(
81
81
  typing.cast(
82
82
  HttpValidationError,
83
- parse_obj_as(
83
+ construct_type(
84
84
  type_=HttpValidationError, # type: ignore
85
85
  object_=_response.json(),
86
86
  ),
@@ -136,7 +136,7 @@ class BlocksClient:
136
136
 
137
137
  Examples
138
138
  --------
139
- from letta import Letta
139
+ from letta_client import Letta
140
140
 
141
141
  client = Letta(
142
142
  token="YOUR_TOKEN",
@@ -165,7 +165,7 @@ class BlocksClient:
165
165
  if 200 <= _response.status_code < 300:
166
166
  return typing.cast(
167
167
  Block,
168
- parse_obj_as(
168
+ construct_type(
169
169
  type_=Block, # type: ignore
170
170
  object_=_response.json(),
171
171
  ),
@@ -174,7 +174,7 @@ class BlocksClient:
174
174
  raise UnprocessableEntityError(
175
175
  typing.cast(
176
176
  HttpValidationError,
177
- parse_obj_as(
177
+ construct_type(
178
178
  type_=HttpValidationError, # type: ignore
179
179
  object_=_response.json(),
180
180
  ),
@@ -201,7 +201,7 @@ class BlocksClient:
201
201
 
202
202
  Examples
203
203
  --------
204
- from letta import Letta
204
+ from letta_client import Letta
205
205
 
206
206
  client = Letta(
207
207
  token="YOUR_TOKEN",
@@ -219,7 +219,7 @@ class BlocksClient:
219
219
  if 200 <= _response.status_code < 300:
220
220
  return typing.cast(
221
221
  Block,
222
- parse_obj_as(
222
+ construct_type(
223
223
  type_=Block, # type: ignore
224
224
  object_=_response.json(),
225
225
  ),
@@ -228,7 +228,7 @@ class BlocksClient:
228
228
  raise UnprocessableEntityError(
229
229
  typing.cast(
230
230
  HttpValidationError,
231
- parse_obj_as(
231
+ construct_type(
232
232
  type_=HttpValidationError, # type: ignore
233
233
  object_=_response.json(),
234
234
  ),
@@ -255,7 +255,7 @@ class BlocksClient:
255
255
 
256
256
  Examples
257
257
  --------
258
- from letta import Letta
258
+ from letta_client import Letta
259
259
 
260
260
  client = Letta(
261
261
  token="YOUR_TOKEN",
@@ -273,7 +273,7 @@ class BlocksClient:
273
273
  if 200 <= _response.status_code < 300:
274
274
  return typing.cast(
275
275
  Block,
276
- parse_obj_as(
276
+ construct_type(
277
277
  type_=Block, # type: ignore
278
278
  object_=_response.json(),
279
279
  ),
@@ -282,7 +282,7 @@ class BlocksClient:
282
282
  raise UnprocessableEntityError(
283
283
  typing.cast(
284
284
  HttpValidationError,
285
- parse_obj_as(
285
+ construct_type(
286
286
  type_=HttpValidationError, # type: ignore
287
287
  object_=_response.json(),
288
288
  ),
@@ -342,7 +342,7 @@ class BlocksClient:
342
342
 
343
343
  Examples
344
344
  --------
345
- from letta import Letta
345
+ from letta_client import Letta
346
346
 
347
347
  client = Letta(
348
348
  token="YOUR_TOKEN",
@@ -370,7 +370,7 @@ class BlocksClient:
370
370
  if 200 <= _response.status_code < 300:
371
371
  return typing.cast(
372
372
  Block,
373
- parse_obj_as(
373
+ construct_type(
374
374
  type_=Block, # type: ignore
375
375
  object_=_response.json(),
376
376
  ),
@@ -379,7 +379,7 @@ class BlocksClient:
379
379
  raise UnprocessableEntityError(
380
380
  typing.cast(
381
381
  HttpValidationError,
382
- parse_obj_as(
382
+ construct_type(
383
383
  type_=HttpValidationError, # type: ignore
384
384
  object_=_response.json(),
385
385
  ),
@@ -412,7 +412,7 @@ class BlocksClient:
412
412
 
413
413
  Examples
414
414
  --------
415
- from letta import Letta
415
+ from letta_client import Letta
416
416
 
417
417
  client = Letta(
418
418
  token="YOUR_TOKEN",
@@ -437,7 +437,7 @@ class BlocksClient:
437
437
  raise UnprocessableEntityError(
438
438
  typing.cast(
439
439
  HttpValidationError,
440
- parse_obj_as(
440
+ construct_type(
441
441
  type_=HttpValidationError, # type: ignore
442
442
  object_=_response.json(),
443
443
  ),
@@ -470,7 +470,7 @@ class BlocksClient:
470
470
 
471
471
  Examples
472
472
  --------
473
- from letta import Letta
473
+ from letta_client import Letta
474
474
 
475
475
  client = Letta(
476
476
  token="YOUR_TOKEN",
@@ -495,7 +495,7 @@ class BlocksClient:
495
495
  raise UnprocessableEntityError(
496
496
  typing.cast(
497
497
  HttpValidationError,
498
- parse_obj_as(
498
+ construct_type(
499
499
  type_=HttpValidationError, # type: ignore
500
500
  object_=_response.json(),
501
501
  ),
@@ -543,7 +543,7 @@ class AsyncBlocksClient:
543
543
  --------
544
544
  import asyncio
545
545
 
546
- from letta import AsyncLetta
546
+ from letta_client import AsyncLetta
547
547
 
548
548
  client = AsyncLetta(
549
549
  token="YOUR_TOKEN",
@@ -570,7 +570,7 @@ class AsyncBlocksClient:
570
570
  if 200 <= _response.status_code < 300:
571
571
  return typing.cast(
572
572
  typing.List[Block],
573
- parse_obj_as(
573
+ construct_type(
574
574
  type_=typing.List[Block], # type: ignore
575
575
  object_=_response.json(),
576
576
  ),
@@ -579,7 +579,7 @@ class AsyncBlocksClient:
579
579
  raise UnprocessableEntityError(
580
580
  typing.cast(
581
581
  HttpValidationError,
582
- parse_obj_as(
582
+ construct_type(
583
583
  type_=HttpValidationError, # type: ignore
584
584
  object_=_response.json(),
585
585
  ),
@@ -637,7 +637,7 @@ class AsyncBlocksClient:
637
637
  --------
638
638
  import asyncio
639
639
 
640
- from letta import AsyncLetta
640
+ from letta_client import AsyncLetta
641
641
 
642
642
  client = AsyncLetta(
643
643
  token="YOUR_TOKEN",
@@ -672,7 +672,7 @@ class AsyncBlocksClient:
672
672
  if 200 <= _response.status_code < 300:
673
673
  return typing.cast(
674
674
  Block,
675
- parse_obj_as(
675
+ construct_type(
676
676
  type_=Block, # type: ignore
677
677
  object_=_response.json(),
678
678
  ),
@@ -681,7 +681,7 @@ class AsyncBlocksClient:
681
681
  raise UnprocessableEntityError(
682
682
  typing.cast(
683
683
  HttpValidationError,
684
- parse_obj_as(
684
+ construct_type(
685
685
  type_=HttpValidationError, # type: ignore
686
686
  object_=_response.json(),
687
687
  ),
@@ -710,7 +710,7 @@ class AsyncBlocksClient:
710
710
  --------
711
711
  import asyncio
712
712
 
713
- from letta import AsyncLetta
713
+ from letta_client import AsyncLetta
714
714
 
715
715
  client = AsyncLetta(
716
716
  token="YOUR_TOKEN",
@@ -734,7 +734,7 @@ class AsyncBlocksClient:
734
734
  if 200 <= _response.status_code < 300:
735
735
  return typing.cast(
736
736
  Block,
737
- parse_obj_as(
737
+ construct_type(
738
738
  type_=Block, # type: ignore
739
739
  object_=_response.json(),
740
740
  ),
@@ -743,7 +743,7 @@ class AsyncBlocksClient:
743
743
  raise UnprocessableEntityError(
744
744
  typing.cast(
745
745
  HttpValidationError,
746
- parse_obj_as(
746
+ construct_type(
747
747
  type_=HttpValidationError, # type: ignore
748
748
  object_=_response.json(),
749
749
  ),
@@ -772,7 +772,7 @@ class AsyncBlocksClient:
772
772
  --------
773
773
  import asyncio
774
774
 
775
- from letta import AsyncLetta
775
+ from letta_client import AsyncLetta
776
776
 
777
777
  client = AsyncLetta(
778
778
  token="YOUR_TOKEN",
@@ -796,7 +796,7 @@ class AsyncBlocksClient:
796
796
  if 200 <= _response.status_code < 300:
797
797
  return typing.cast(
798
798
  Block,
799
- parse_obj_as(
799
+ construct_type(
800
800
  type_=Block, # type: ignore
801
801
  object_=_response.json(),
802
802
  ),
@@ -805,7 +805,7 @@ class AsyncBlocksClient:
805
805
  raise UnprocessableEntityError(
806
806
  typing.cast(
807
807
  HttpValidationError,
808
- parse_obj_as(
808
+ construct_type(
809
809
  type_=HttpValidationError, # type: ignore
810
810
  object_=_response.json(),
811
811
  ),
@@ -867,7 +867,7 @@ class AsyncBlocksClient:
867
867
  --------
868
868
  import asyncio
869
869
 
870
- from letta import AsyncLetta
870
+ from letta_client import AsyncLetta
871
871
 
872
872
  client = AsyncLetta(
873
873
  token="YOUR_TOKEN",
@@ -901,7 +901,7 @@ class AsyncBlocksClient:
901
901
  if 200 <= _response.status_code < 300:
902
902
  return typing.cast(
903
903
  Block,
904
- parse_obj_as(
904
+ construct_type(
905
905
  type_=Block, # type: ignore
906
906
  object_=_response.json(),
907
907
  ),
@@ -910,7 +910,7 @@ class AsyncBlocksClient:
910
910
  raise UnprocessableEntityError(
911
911
  typing.cast(
912
912
  HttpValidationError,
913
- parse_obj_as(
913
+ construct_type(
914
914
  type_=HttpValidationError, # type: ignore
915
915
  object_=_response.json(),
916
916
  ),
@@ -945,7 +945,7 @@ class AsyncBlocksClient:
945
945
  --------
946
946
  import asyncio
947
947
 
948
- from letta import AsyncLetta
948
+ from letta_client import AsyncLetta
949
949
 
950
950
  client = AsyncLetta(
951
951
  token="YOUR_TOKEN",
@@ -976,7 +976,7 @@ class AsyncBlocksClient:
976
976
  raise UnprocessableEntityError(
977
977
  typing.cast(
978
978
  HttpValidationError,
979
- parse_obj_as(
979
+ construct_type(
980
980
  type_=HttpValidationError, # type: ignore
981
981
  object_=_response.json(),
982
982
  ),
@@ -1011,7 +1011,7 @@ class AsyncBlocksClient:
1011
1011
  --------
1012
1012
  import asyncio
1013
1013
 
1014
- from letta import AsyncLetta
1014
+ from letta_client import AsyncLetta
1015
1015
 
1016
1016
  client = AsyncLetta(
1017
1017
  token="YOUR_TOKEN",
@@ -1042,7 +1042,7 @@ class AsyncBlocksClient:
1042
1042
  raise UnprocessableEntityError(
1043
1043
  typing.cast(
1044
1044
  HttpValidationError,
1045
- parse_obj_as(
1045
+ construct_type(
1046
1046
  type_=HttpValidationError, # type: ignore
1047
1047
  object_=_response.json(),
1048
1048
  ),
@@ -11,6 +11,8 @@ from .models.client import ModelsClient
11
11
  from .blocks.client import BlocksClient
12
12
  from .jobs.client import JobsClient
13
13
  from .health.client import HealthClient
14
+ from .providers.client import ProvidersClient
15
+ from .runs.client import RunsClient
14
16
  from .core.client_wrapper import AsyncClientWrapper
15
17
  from .tools.client import AsyncToolsClient
16
18
  from .sources.client import AsyncSourcesClient
@@ -19,6 +21,8 @@ from .models.client import AsyncModelsClient
19
21
  from .blocks.client import AsyncBlocksClient
20
22
  from .jobs.client import AsyncJobsClient
21
23
  from .health.client import AsyncHealthClient
24
+ from .providers.client import AsyncProvidersClient
25
+ from .runs.client import AsyncRunsClient
22
26
 
23
27
 
24
28
  class Letta:
@@ -51,7 +55,7 @@ class Letta:
51
55
 
52
56
  Examples
53
57
  --------
54
- from letta import Letta
58
+ from letta_client import Letta
55
59
 
56
60
  client = Letta(
57
61
  token="YOUR_TOKEN",
@@ -86,6 +90,8 @@ class Letta:
86
90
  self.blocks = BlocksClient(client_wrapper=self._client_wrapper)
87
91
  self.jobs = JobsClient(client_wrapper=self._client_wrapper)
88
92
  self.health = HealthClient(client_wrapper=self._client_wrapper)
93
+ self.providers = ProvidersClient(client_wrapper=self._client_wrapper)
94
+ self.runs = RunsClient(client_wrapper=self._client_wrapper)
89
95
 
90
96
 
91
97
  class AsyncLetta:
@@ -118,7 +124,7 @@ class AsyncLetta:
118
124
 
119
125
  Examples
120
126
  --------
121
- from letta import AsyncLetta
127
+ from letta_client import AsyncLetta
122
128
 
123
129
  client = AsyncLetta(
124
130
  token="YOUR_TOKEN",
@@ -153,6 +159,8 @@ class AsyncLetta:
153
159
  self.blocks = AsyncBlocksClient(client_wrapper=self._client_wrapper)
154
160
  self.jobs = AsyncJobsClient(client_wrapper=self._client_wrapper)
155
161
  self.health = AsyncHealthClient(client_wrapper=self._client_wrapper)
162
+ self.providers = AsyncProvidersClient(client_wrapper=self._client_wrapper)
163
+ self.runs = AsyncRunsClient(client_wrapper=self._client_wrapper)
156
164
 
157
165
 
158
166
  def _get_base_url(*, base_url: typing.Optional[str] = None, environment: LettaEnvironment) -> str:
@@ -19,6 +19,7 @@ from .query_encoder import encode_query
19
19
  from .remove_none_from_dict import remove_none_from_dict
20
20
  from .request_options import RequestOptions
21
21
  from .serialization import FieldMetadata, convert_and_respect_annotation_metadata
22
+ from .unchecked_base_model import UncheckedBaseModel, UnionMetadata, construct_type
22
23
 
23
24
  __all__ = [
24
25
  "ApiError",
@@ -31,8 +32,11 @@ __all__ = [
31
32
  "IS_PYDANTIC_V2",
32
33
  "RequestOptions",
33
34
  "SyncClientWrapper",
35
+ "UncheckedBaseModel",
36
+ "UnionMetadata",
34
37
  "UniversalBaseModel",
35
38
  "UniversalRootModel",
39
+ "construct_type",
36
40
  "convert_and_respect_annotation_metadata",
37
41
  "convert_file_dict_to_httpx_tuples",
38
42
  "encode_query",
@@ -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.6",
19
+ "X-Fern-SDK-Version": "0.1.10",
20
20
  }
21
21
  if self.token is not None:
22
22
  headers["Authorization"] = f"Bearer {self.token}"