letta-client 0.1.4__py3-none-any.whl → 0.1.9__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.
- letta/__init__.py +44 -21
- letta/agents/__init__.py +71 -24
- letta/agents/archival_memory/client.py +17 -17
- letta/agents/client.py +424 -1700
- letta/agents/context/client.py +5 -5
- letta/agents/core_memory/client.py +1080 -0
- letta/agents/memory_variables/__init__.py +5 -0
- letta/agents/{memory → memory_variables}/client.py +41 -40
- letta/agents/memory_variables/types/__init__.py +5 -0
- letta/agents/{types/agents_get_agent_variables_response.py → memory_variables/types/memory_variables_get_response.py} +3 -3
- letta/agents/messages/__init__.py +36 -2
- letta/agents/messages/client.py +278 -17
- letta/agents/messages/types/__init__.py +37 -3
- letta/agents/messages/types/letta_streaming_response.py +139 -16
- letta/agents/messages/types/messages_list_response_item.py +121 -9
- letta/agents/recall_memory/client.py +5 -5
- letta/agents/sources/client.py +5 -5
- letta/agents/templates/__init__.py +5 -0
- letta/agents/templates/client.py +578 -0
- letta/agents/templates/types/__init__.py +5 -0
- letta/agents/templates/types/templates_migrate_response.py +19 -0
- letta/agents/tools/client.py +13 -13
- letta/agents/types/__init__.py +23 -29
- letta/agents/types/agents_search_request_combinator.py +5 -0
- letta/agents/types/agents_search_request_search_item.py +64 -0
- letta/agents/types/{agents_search_deployed_agents_request_search_item_zero.py → agents_search_request_search_item_name.py} +5 -4
- letta/agents/types/agents_search_request_search_item_name_operator.py +5 -0
- letta/agents/types/agents_search_request_search_item_order_by.py +22 -0
- letta/agents/types/agents_search_request_search_item_order_by_direction.py +5 -0
- letta/agents/types/agents_search_request_search_item_order_by_value.py +5 -0
- letta/agents/types/{agents_migrate_response.py → agents_search_request_search_item_version.py} +3 -3
- letta/blocks/client.py +25 -25
- letta/client.py +8 -4
- letta/core/__init__.py +4 -0
- letta/core/client_wrapper.py +7 -18
- letta/core/unchecked_base_model.py +305 -0
- letta/health/client.py +3 -3
- letta/jobs/client.py +17 -17
- letta/models/client.py +5 -5
- letta/providers/client.py +597 -0
- letta/sources/client.py +33 -33
- letta/sources/files/client.py +11 -11
- letta/sources/passages/client.py +5 -5
- letta/tools/client.py +77 -57
- letta/types/__init__.py +22 -0
- letta/types/action_model.py +2 -2
- letta/types/action_parameters_model.py +2 -2
- letta/types/action_response_model.py +2 -2
- letta/types/agent_environment_variable.py +63 -0
- letta/types/agent_state.py +19 -16
- letta/types/agent_type.py +1 -2
- letta/types/app_auth_scheme.py +2 -2
- letta/types/app_model.py +2 -2
- letta/types/archival_memory_summary.py +2 -2
- letta/types/assistant_file.py +2 -2
- letta/types/assistant_message_input.py +2 -2
- letta/types/assistant_message_output.py +3 -4
- letta/types/auth_request.py +2 -2
- letta/types/auth_response.py +2 -2
- letta/types/auth_scheme_field.py +2 -2
- letta/types/block.py +11 -16
- letta/types/block_update.py +2 -2
- letta/types/chat_completion_request.py +2 -2
- letta/types/chat_completion_response.py +2 -2
- letta/types/child_tool_rule.py +2 -2
- letta/types/choice.py +2 -2
- letta/types/conditional_tool_rule.py +2 -2
- letta/types/conflict_error_body.py +2 -2
- letta/types/context_window_overview.py +7 -2
- letta/types/create_assistant_file_request.py +2 -2
- letta/types/create_assistant_request.py +2 -2
- letta/types/create_block.py +2 -2
- letta/types/delete_assistant_file_response.py +2 -2
- letta/types/delete_assistant_response.py +2 -2
- letta/types/e_2_b_sandbox_config.py +2 -2
- letta/types/embedding_config.py +10 -10
- letta/types/file_metadata.py +2 -7
- letta/types/function_call_input.py +2 -2
- letta/types/function_call_output.py +2 -2
- letta/types/function_schema.py +2 -2
- letta/types/health.py +2 -2
- letta/types/http_validation_error.py +2 -2
- letta/types/init_tool_rule.py +2 -2
- letta/types/internal_server_error_body.py +2 -2
- letta/types/job.py +7 -12
- letta/types/letta_request.py +7 -2
- letta/types/letta_response.py +6 -5
- letta/types/letta_response_messages_item.py +125 -0
- letta/types/letta_schemas_letta_message_tool_call.py +2 -2
- letta/types/letta_schemas_message_message.py +12 -17
- letta/types/letta_schemas_openai_chat_completion_request_tool.py +2 -2
- letta/types/letta_schemas_openai_chat_completion_request_tool_call.py +2 -2
- letta/types/letta_schemas_openai_chat_completion_request_tool_call_function.py +2 -2
- letta/types/letta_schemas_openai_chat_completion_response_message.py +2 -2
- letta/types/letta_schemas_openai_chat_completion_response_tool_call.py +2 -2
- letta/types/letta_schemas_openai_chat_completions_tool_call_function.py +2 -2
- letta/types/letta_schemas_openai_chat_completions_tool_call_input.py +2 -2
- letta/types/letta_schemas_openai_chat_completions_tool_call_output.py +2 -2
- letta/types/letta_schemas_tool_tool.py +14 -13
- letta/types/letta_usage_statistics.py +6 -7
- letta/types/llm_config.py +9 -9
- letta/types/local_sandbox_config.py +2 -2
- letta/types/log_prob_token.py +2 -2
- letta/types/memory.py +2 -2
- letta/types/message_content_log_prob.py +2 -2
- letta/types/message_create.py +2 -2
- letta/types/not_found_error_body.py +2 -2
- letta/types/open_ai_assistant.py +2 -2
- letta/types/organization.py +2 -2
- letta/types/organization_create.py +2 -2
- letta/types/passage.py +10 -15
- letta/types/provider.py +38 -0
- letta/types/reasoning_message.py +6 -7
- letta/types/recall_memory_summary.py +2 -2
- letta/types/response_format.py +2 -2
- letta/types/sandbox_config.py +2 -7
- letta/types/sandbox_config_create.py +2 -2
- letta/types/sandbox_config_update.py +2 -2
- letta/types/sandbox_environment_variable.py +2 -7
- letta/types/sandbox_environment_variable_create.py +2 -2
- letta/types/sandbox_environment_variable_update.py +2 -6
- letta/types/source.py +8 -13
- letta/types/system_message_input.py +2 -2
- letta/types/system_message_output.py +6 -7
- letta/types/terminal_tool_rule.py +2 -2
- letta/types/tool_call_delta.py +2 -2
- letta/types/tool_call_function_output.py +2 -2
- letta/types/tool_call_message.py +6 -7
- letta/types/tool_create.py +2 -2
- letta/types/tool_function_choice.py +2 -2
- letta/types/tool_input.py +2 -2
- letta/types/tool_message.py +2 -2
- letta/types/tool_return_message.py +10 -11
- letta/types/tool_type.py +5 -0
- letta/types/usage_statistics.py +2 -2
- letta/types/user.py +5 -10
- letta/types/user_create.py +2 -7
- letta/types/user_message_input.py +2 -2
- letta/types/user_message_output.py +6 -7
- letta/types/user_update.py +2 -7
- letta/types/validation_error.py +2 -2
- {letta_client-0.1.4.dist-info → letta_client-0.1.9.dist-info}/METADATA +1 -1
- letta_client-0.1.9.dist-info/RECORD +200 -0
- letta/agents/memory/__init__.py +0 -5
- letta/agents/memory/messages/client.py +0 -147
- letta/agents/memory_blocks/client.py +0 -364
- letta/agents/types/agents_search_deployed_agents_request_combinator.py +0 -5
- letta/agents/types/agents_search_deployed_agents_request_search_item.py +0 -16
- letta/agents/types/agents_search_deployed_agents_request_search_item_direction.py +0 -27
- letta/agents/types/agents_search_deployed_agents_request_search_item_direction_direction.py +0 -5
- letta/agents/types/agents_search_deployed_agents_request_search_item_direction_value.py +0 -7
- letta/agents/types/agents_search_deployed_agents_request_search_item_operator.py +0 -24
- letta/agents/types/agents_search_deployed_agents_request_search_item_operator_operator.py +0 -7
- letta_client-0.1.4.dist-info/RECORD +0 -191
- /letta/agents/{memory/messages → core_memory}/__init__.py +0 -0
- /letta/{agents/memory_blocks → providers}/__init__.py +0 -0
- {letta_client-0.1.4.dist-info → letta_client-0.1.9.dist-info}/WHEEL +0 -0
|
@@ -1,20 +1,143 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from ....core.unchecked_base_model import UncheckedBaseModel
|
|
3
5
|
import typing
|
|
4
|
-
|
|
5
|
-
from ....
|
|
6
|
-
|
|
7
|
-
from ....types.
|
|
8
|
-
from ....types.
|
|
9
|
-
|
|
10
|
-
from ....
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
import datetime as dt
|
|
7
|
+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
import pydantic
|
|
9
|
+
from ....types.tool_call_message_tool_call import ToolCallMessageToolCall
|
|
10
|
+
from ....types.tool_return_message_status import ToolReturnMessageStatus
|
|
11
|
+
import typing_extensions
|
|
12
|
+
from ....core.unchecked_base_model import UnionMetadata
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class LettaStreamingResponse_SystemMessage(UncheckedBaseModel):
|
|
16
|
+
message_type: typing.Literal["system_message"] = "system_message"
|
|
17
|
+
id: str
|
|
18
|
+
date: dt.datetime
|
|
19
|
+
message: str
|
|
20
|
+
|
|
21
|
+
if IS_PYDANTIC_V2:
|
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
23
|
+
else:
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
extra = pydantic.Extra.allow
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class LettaStreamingResponse_UserMessage(UncheckedBaseModel):
|
|
32
|
+
message_type: typing.Literal["user_message"] = "user_message"
|
|
33
|
+
id: str
|
|
34
|
+
date: dt.datetime
|
|
35
|
+
message: str
|
|
36
|
+
|
|
37
|
+
if IS_PYDANTIC_V2:
|
|
38
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
39
|
+
else:
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
frozen = True
|
|
43
|
+
smart_union = True
|
|
44
|
+
extra = pydantic.Extra.allow
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class LettaStreamingResponse_ReasoningMessage(UncheckedBaseModel):
|
|
48
|
+
message_type: typing.Literal["reasoning_message"] = "reasoning_message"
|
|
49
|
+
id: str
|
|
50
|
+
date: dt.datetime
|
|
51
|
+
reasoning: str
|
|
52
|
+
|
|
53
|
+
if IS_PYDANTIC_V2:
|
|
54
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
55
|
+
else:
|
|
56
|
+
|
|
57
|
+
class Config:
|
|
58
|
+
frozen = True
|
|
59
|
+
smart_union = True
|
|
60
|
+
extra = pydantic.Extra.allow
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class LettaStreamingResponse_ToolCallMessage(UncheckedBaseModel):
|
|
64
|
+
message_type: typing.Literal["tool_call_message"] = "tool_call_message"
|
|
65
|
+
id: str
|
|
66
|
+
date: dt.datetime
|
|
67
|
+
tool_call: ToolCallMessageToolCall
|
|
68
|
+
|
|
69
|
+
if IS_PYDANTIC_V2:
|
|
70
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
71
|
+
else:
|
|
72
|
+
|
|
73
|
+
class Config:
|
|
74
|
+
frozen = True
|
|
75
|
+
smart_union = True
|
|
76
|
+
extra = pydantic.Extra.allow
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class LettaStreamingResponse_ToolReturnMessage(UncheckedBaseModel):
|
|
80
|
+
message_type: typing.Literal["tool_return_message"] = "tool_return_message"
|
|
81
|
+
id: str
|
|
82
|
+
date: dt.datetime
|
|
83
|
+
tool_return: str
|
|
84
|
+
status: ToolReturnMessageStatus
|
|
85
|
+
tool_call_id: str
|
|
86
|
+
stdout: typing.Optional[typing.List[str]] = None
|
|
87
|
+
stderr: typing.Optional[typing.List[str]] = None
|
|
88
|
+
|
|
89
|
+
if IS_PYDANTIC_V2:
|
|
90
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
91
|
+
else:
|
|
92
|
+
|
|
93
|
+
class Config:
|
|
94
|
+
frozen = True
|
|
95
|
+
smart_union = True
|
|
96
|
+
extra = pydantic.Extra.allow
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class LettaStreamingResponse_AssistantMessage(UncheckedBaseModel):
|
|
100
|
+
message_type: typing.Literal["assistant_message"] = "assistant_message"
|
|
101
|
+
id: str
|
|
102
|
+
date: dt.datetime
|
|
103
|
+
assistant_message: str
|
|
104
|
+
|
|
105
|
+
if IS_PYDANTIC_V2:
|
|
106
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
107
|
+
else:
|
|
108
|
+
|
|
109
|
+
class Config:
|
|
110
|
+
frozen = True
|
|
111
|
+
smart_union = True
|
|
112
|
+
extra = pydantic.Extra.allow
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class LettaStreamingResponse_UsageStatistics(UncheckedBaseModel):
|
|
116
|
+
message_type: typing.Literal["usage_statistics"] = "usage_statistics"
|
|
117
|
+
completion_tokens: typing.Optional[int] = None
|
|
118
|
+
prompt_tokens: typing.Optional[int] = None
|
|
119
|
+
total_tokens: typing.Optional[int] = None
|
|
120
|
+
step_count: typing.Optional[int] = None
|
|
121
|
+
|
|
122
|
+
if IS_PYDANTIC_V2:
|
|
123
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
124
|
+
else:
|
|
125
|
+
|
|
126
|
+
class Config:
|
|
127
|
+
frozen = True
|
|
128
|
+
smart_union = True
|
|
129
|
+
extra = pydantic.Extra.allow
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
LettaStreamingResponse = typing_extensions.Annotated[
|
|
133
|
+
typing.Union[
|
|
134
|
+
LettaStreamingResponse_SystemMessage,
|
|
135
|
+
LettaStreamingResponse_UserMessage,
|
|
136
|
+
LettaStreamingResponse_ReasoningMessage,
|
|
137
|
+
LettaStreamingResponse_ToolCallMessage,
|
|
138
|
+
LettaStreamingResponse_ToolReturnMessage,
|
|
139
|
+
LettaStreamingResponse_AssistantMessage,
|
|
140
|
+
LettaStreamingResponse_UsageStatistics,
|
|
141
|
+
],
|
|
142
|
+
UnionMetadata(discriminant="message_type"),
|
|
20
143
|
]
|
|
@@ -1,13 +1,125 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from ....core.unchecked_base_model import UncheckedBaseModel
|
|
3
5
|
import typing
|
|
4
|
-
|
|
5
|
-
from ....
|
|
6
|
-
|
|
7
|
-
from ....types.
|
|
8
|
-
from ....types.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
import datetime as dt
|
|
7
|
+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
import pydantic
|
|
9
|
+
from ....types.tool_call_message_tool_call import ToolCallMessageToolCall
|
|
10
|
+
from ....types.tool_return_message_status import ToolReturnMessageStatus
|
|
11
|
+
import typing_extensions
|
|
12
|
+
from ....core.unchecked_base_model import UnionMetadata
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class MessagesListResponseItem_SystemMessage(UncheckedBaseModel):
|
|
16
|
+
message_type: typing.Literal["system_message"] = "system_message"
|
|
17
|
+
id: str
|
|
18
|
+
date: dt.datetime
|
|
19
|
+
message: str
|
|
20
|
+
|
|
21
|
+
if IS_PYDANTIC_V2:
|
|
22
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
23
|
+
else:
|
|
24
|
+
|
|
25
|
+
class Config:
|
|
26
|
+
frozen = True
|
|
27
|
+
smart_union = True
|
|
28
|
+
extra = pydantic.Extra.allow
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class MessagesListResponseItem_UserMessage(UncheckedBaseModel):
|
|
32
|
+
message_type: typing.Literal["user_message"] = "user_message"
|
|
33
|
+
id: str
|
|
34
|
+
date: dt.datetime
|
|
35
|
+
message: str
|
|
36
|
+
|
|
37
|
+
if IS_PYDANTIC_V2:
|
|
38
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
39
|
+
else:
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
frozen = True
|
|
43
|
+
smart_union = True
|
|
44
|
+
extra = pydantic.Extra.allow
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class MessagesListResponseItem_ReasoningMessage(UncheckedBaseModel):
|
|
48
|
+
message_type: typing.Literal["reasoning_message"] = "reasoning_message"
|
|
49
|
+
id: str
|
|
50
|
+
date: dt.datetime
|
|
51
|
+
reasoning: str
|
|
52
|
+
|
|
53
|
+
if IS_PYDANTIC_V2:
|
|
54
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
55
|
+
else:
|
|
56
|
+
|
|
57
|
+
class Config:
|
|
58
|
+
frozen = True
|
|
59
|
+
smart_union = True
|
|
60
|
+
extra = pydantic.Extra.allow
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class MessagesListResponseItem_ToolCallMessage(UncheckedBaseModel):
|
|
64
|
+
message_type: typing.Literal["tool_call_message"] = "tool_call_message"
|
|
65
|
+
id: str
|
|
66
|
+
date: dt.datetime
|
|
67
|
+
tool_call: ToolCallMessageToolCall
|
|
68
|
+
|
|
69
|
+
if IS_PYDANTIC_V2:
|
|
70
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
71
|
+
else:
|
|
72
|
+
|
|
73
|
+
class Config:
|
|
74
|
+
frozen = True
|
|
75
|
+
smart_union = True
|
|
76
|
+
extra = pydantic.Extra.allow
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class MessagesListResponseItem_ToolReturnMessage(UncheckedBaseModel):
|
|
80
|
+
message_type: typing.Literal["tool_return_message"] = "tool_return_message"
|
|
81
|
+
id: str
|
|
82
|
+
date: dt.datetime
|
|
83
|
+
tool_return: str
|
|
84
|
+
status: ToolReturnMessageStatus
|
|
85
|
+
tool_call_id: str
|
|
86
|
+
stdout: typing.Optional[typing.List[str]] = None
|
|
87
|
+
stderr: typing.Optional[typing.List[str]] = None
|
|
88
|
+
|
|
89
|
+
if IS_PYDANTIC_V2:
|
|
90
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
91
|
+
else:
|
|
92
|
+
|
|
93
|
+
class Config:
|
|
94
|
+
frozen = True
|
|
95
|
+
smart_union = True
|
|
96
|
+
extra = pydantic.Extra.allow
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class MessagesListResponseItem_AssistantMessage(UncheckedBaseModel):
|
|
100
|
+
message_type: typing.Literal["assistant_message"] = "assistant_message"
|
|
101
|
+
id: str
|
|
102
|
+
date: dt.datetime
|
|
103
|
+
assistant_message: str
|
|
104
|
+
|
|
105
|
+
if IS_PYDANTIC_V2:
|
|
106
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
107
|
+
else:
|
|
108
|
+
|
|
109
|
+
class Config:
|
|
110
|
+
frozen = True
|
|
111
|
+
smart_union = True
|
|
112
|
+
extra = pydantic.Extra.allow
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
MessagesListResponseItem = typing_extensions.Annotated[
|
|
116
|
+
typing.Union[
|
|
117
|
+
MessagesListResponseItem_SystemMessage,
|
|
118
|
+
MessagesListResponseItem_UserMessage,
|
|
119
|
+
MessagesListResponseItem_ReasoningMessage,
|
|
120
|
+
MessagesListResponseItem_ToolCallMessage,
|
|
121
|
+
MessagesListResponseItem_ToolReturnMessage,
|
|
122
|
+
MessagesListResponseItem_AssistantMessage,
|
|
123
|
+
],
|
|
124
|
+
UnionMetadata(discriminant="message_type"),
|
|
13
125
|
]
|
|
@@ -5,7 +5,7 @@ import typing
|
|
|
5
5
|
from ...core.request_options import RequestOptions
|
|
6
6
|
from ...types.recall_memory_summary import RecallMemorySummary
|
|
7
7
|
from ...core.jsonable_encoder import jsonable_encoder
|
|
8
|
-
from ...core.
|
|
8
|
+
from ...core.unchecked_base_model import construct_type
|
|
9
9
|
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
10
10
|
from ...types.http_validation_error import HttpValidationError
|
|
11
11
|
from json.decoder import JSONDecodeError
|
|
@@ -55,7 +55,7 @@ class RecallMemoryClient:
|
|
|
55
55
|
if 200 <= _response.status_code < 300:
|
|
56
56
|
return typing.cast(
|
|
57
57
|
RecallMemorySummary,
|
|
58
|
-
|
|
58
|
+
construct_type(
|
|
59
59
|
type_=RecallMemorySummary, # type: ignore
|
|
60
60
|
object_=_response.json(),
|
|
61
61
|
),
|
|
@@ -64,7 +64,7 @@ class RecallMemoryClient:
|
|
|
64
64
|
raise UnprocessableEntityError(
|
|
65
65
|
typing.cast(
|
|
66
66
|
HttpValidationError,
|
|
67
|
-
|
|
67
|
+
construct_type(
|
|
68
68
|
type_=HttpValidationError, # type: ignore
|
|
69
69
|
object_=_response.json(),
|
|
70
70
|
),
|
|
@@ -126,7 +126,7 @@ class AsyncRecallMemoryClient:
|
|
|
126
126
|
if 200 <= _response.status_code < 300:
|
|
127
127
|
return typing.cast(
|
|
128
128
|
RecallMemorySummary,
|
|
129
|
-
|
|
129
|
+
construct_type(
|
|
130
130
|
type_=RecallMemorySummary, # type: ignore
|
|
131
131
|
object_=_response.json(),
|
|
132
132
|
),
|
|
@@ -135,7 +135,7 @@ class AsyncRecallMemoryClient:
|
|
|
135
135
|
raise UnprocessableEntityError(
|
|
136
136
|
typing.cast(
|
|
137
137
|
HttpValidationError,
|
|
138
|
-
|
|
138
|
+
construct_type(
|
|
139
139
|
type_=HttpValidationError, # type: ignore
|
|
140
140
|
object_=_response.json(),
|
|
141
141
|
),
|
letta/agents/sources/client.py
CHANGED
|
@@ -5,7 +5,7 @@ import typing
|
|
|
5
5
|
from ...core.request_options import RequestOptions
|
|
6
6
|
from ...types.source import Source
|
|
7
7
|
from ...core.jsonable_encoder import jsonable_encoder
|
|
8
|
-
from ...core.
|
|
8
|
+
from ...core.unchecked_base_model import construct_type
|
|
9
9
|
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
10
10
|
from ...types.http_validation_error import HttpValidationError
|
|
11
11
|
from json.decoder import JSONDecodeError
|
|
@@ -53,7 +53,7 @@ class SourcesClient:
|
|
|
53
53
|
if 200 <= _response.status_code < 300:
|
|
54
54
|
return typing.cast(
|
|
55
55
|
typing.List[Source],
|
|
56
|
-
|
|
56
|
+
construct_type(
|
|
57
57
|
type_=typing.List[Source], # type: ignore
|
|
58
58
|
object_=_response.json(),
|
|
59
59
|
),
|
|
@@ -62,7 +62,7 @@ class SourcesClient:
|
|
|
62
62
|
raise UnprocessableEntityError(
|
|
63
63
|
typing.cast(
|
|
64
64
|
HttpValidationError,
|
|
65
|
-
|
|
65
|
+
construct_type(
|
|
66
66
|
type_=HttpValidationError, # type: ignore
|
|
67
67
|
object_=_response.json(),
|
|
68
68
|
),
|
|
@@ -124,7 +124,7 @@ class AsyncSourcesClient:
|
|
|
124
124
|
if 200 <= _response.status_code < 300:
|
|
125
125
|
return typing.cast(
|
|
126
126
|
typing.List[Source],
|
|
127
|
-
|
|
127
|
+
construct_type(
|
|
128
128
|
type_=typing.List[Source], # type: ignore
|
|
129
129
|
object_=_response.json(),
|
|
130
130
|
),
|
|
@@ -133,7 +133,7 @@ class AsyncSourcesClient:
|
|
|
133
133
|
raise UnprocessableEntityError(
|
|
134
134
|
typing.cast(
|
|
135
135
|
HttpValidationError,
|
|
136
|
-
|
|
136
|
+
construct_type(
|
|
137
137
|
type_=HttpValidationError, # type: ignore
|
|
138
138
|
object_=_response.json(),
|
|
139
139
|
),
|