letta-client 0.1.0__py3-none-any.whl → 0.1.2__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 +293 -0
- letta/agents/__init__.py +28 -0
- letta/agents/archival_memory/__init__.py +2 -0
- letta/agents/archival_memory/client.py +591 -0
- letta/agents/client.py +2166 -0
- letta/agents/context/__init__.py +2 -0
- letta/agents/context/client.py +145 -0
- letta/agents/memory/__init__.py +5 -0
- letta/agents/memory/client.py +149 -0
- letta/agents/memory/messages/__init__.py +2 -0
- letta/agents/memory/messages/client.py +147 -0
- letta/agents/memory_blocks/__init__.py +2 -0
- letta/agents/memory_blocks/client.py +364 -0
- letta/agents/messages/__init__.py +5 -0
- letta/agents/messages/client.py +787 -0
- letta/agents/messages/types/__init__.py +7 -0
- letta/agents/messages/types/letta_streaming_response.py +20 -0
- letta/agents/messages/types/messages_list_response.py +7 -0
- letta/agents/messages/types/messages_list_response_item.py +13 -0
- letta/agents/recall_memory/__init__.py +2 -0
- letta/agents/recall_memory/client.py +147 -0
- letta/agents/sources/__init__.py +2 -0
- letta/agents/sources/client.py +145 -0
- letta/agents/tools/__init__.py +2 -0
- letta/agents/tools/client.py +408 -0
- letta/agents/types/__init__.py +13 -0
- letta/agents/types/agents_create_version_response.py +22 -0
- letta/agents/types/agents_migrate_response.py +19 -0
- letta/agents/types/create_agent_request_tool_rules_item.py +9 -0
- letta/agents/types/update_agent_tool_rules_item.py +9 -0
- letta/blocks/__init__.py +2 -0
- letta/blocks/client.py +1054 -0
- letta/client.py +164 -0
- letta/core/__init__.py +47 -0
- letta/core/api_error.py +15 -0
- letta/core/client_wrapper.py +76 -0
- letta/core/datetime_utils.py +28 -0
- letta/core/file.py +67 -0
- letta/core/http_client.py +499 -0
- letta/core/jsonable_encoder.py +101 -0
- letta/core/pydantic_utilities.py +296 -0
- letta/core/query_encoder.py +58 -0
- letta/core/remove_none_from_dict.py +11 -0
- letta/core/request_options.py +35 -0
- letta/core/serialization.py +272 -0
- letta/environment.py +8 -0
- letta/errors/__init__.py +8 -0
- letta/errors/conflict_error.py +9 -0
- letta/errors/internal_server_error.py +9 -0
- letta/errors/not_found_error.py +9 -0
- letta/errors/unprocessable_entity_error.py +9 -0
- letta/health/__init__.py +2 -0
- letta/health/client.py +108 -0
- letta/jobs/__init__.py +2 -0
- letta/jobs/client.py +503 -0
- letta/models/__init__.py +2 -0
- letta/models/client.py +201 -0
- letta/sources/__init__.py +5 -0
- letta/sources/client.py +1154 -0
- letta/sources/files/__init__.py +2 -0
- letta/sources/files/client.py +436 -0
- letta/sources/passages/__init__.py +2 -0
- letta/sources/passages/client.py +145 -0
- letta/tools/__init__.py +2 -0
- letta/tools/client.py +1823 -0
- letta/types/__init__.py +263 -0
- letta/types/action_model.py +36 -0
- letta/types/action_parameters_model.py +26 -0
- letta/types/action_response_model.py +26 -0
- letta/types/agent_state.py +139 -0
- letta/types/agent_state_tool_rules_item.py +9 -0
- letta/types/agent_type.py +8 -0
- letta/types/app_auth_scheme.py +34 -0
- letta/types/app_auth_scheme_auth_mode.py +7 -0
- letta/types/app_model.py +44 -0
- letta/types/archival_memory_summary.py +22 -0
- letta/types/assistant_file.py +33 -0
- letta/types/assistant_message_input.py +23 -0
- letta/types/assistant_message_output.py +23 -0
- letta/types/auth_request.py +22 -0
- letta/types/auth_response.py +29 -0
- letta/types/auth_scheme_field.py +30 -0
- letta/types/block.py +91 -0
- letta/types/block_update.py +60 -0
- letta/types/chat_completion_request.py +49 -0
- letta/types/chat_completion_request_function_call.py +6 -0
- letta/types/chat_completion_request_messages_item.py +11 -0
- letta/types/chat_completion_request_stop.py +5 -0
- letta/types/chat_completion_request_tool_choice.py +8 -0
- letta/types/chat_completion_response.py +32 -0
- letta/types/child_tool_rule.py +33 -0
- letta/types/choice.py +25 -0
- letta/types/conditional_tool_rule.py +43 -0
- letta/types/conflict_error_body.py +21 -0
- letta/types/context_window_overview.py +105 -0
- letta/types/create_assistant_file_request.py +22 -0
- letta/types/create_assistant_request.py +57 -0
- letta/types/create_block.py +56 -0
- letta/types/delete_assistant_file_response.py +28 -0
- letta/types/delete_assistant_response.py +28 -0
- letta/types/e_2_b_sandbox_config.py +32 -0
- letta/types/embedding_config.py +72 -0
- letta/types/embedding_config_embedding_endpoint_type.py +26 -0
- letta/types/file_metadata.py +82 -0
- letta/types/function_call_input.py +19 -0
- letta/types/function_call_output.py +20 -0
- letta/types/function_schema.py +21 -0
- letta/types/health.py +24 -0
- letta/types/http_validation_error.py +20 -0
- letta/types/init_tool_rule.py +29 -0
- letta/types/internal_server_error_body.py +19 -0
- letta/types/job.py +79 -0
- letta/types/job_status.py +5 -0
- letta/types/letta_request.py +33 -0
- letta/types/letta_response.py +125 -0
- letta/types/letta_response_assistant_message.py +23 -0
- letta/types/letta_response_letta_usage_statistics.py +47 -0
- letta/types/letta_response_reasoning_message.py +32 -0
- letta/types/letta_response_system_message.py +32 -0
- letta/types/letta_response_tool_call.py +21 -0
- letta/types/letta_response_tool_call_delta.py +21 -0
- letta/types/letta_response_tool_call_message.py +33 -0
- letta/types/letta_response_tool_call_message_tool_call.py +9 -0
- letta/types/letta_response_tool_call_message_tool_call_one.py +21 -0
- letta/types/letta_response_tool_call_message_tool_call_zero.py +21 -0
- letta/types/letta_response_tool_return_message.py +41 -0
- letta/types/letta_response_tool_return_message_status.py +5 -0
- letta/types/letta_response_usage_message.py +40 -0
- letta/types/letta_response_usage_message_usage.py +47 -0
- letta/types/letta_response_user_message.py +32 -0
- letta/types/letta_schemas_letta_message_tool_call.py +21 -0
- letta/types/letta_schemas_message_message.py +103 -0
- letta/types/letta_schemas_openai_chat_completion_request_tool.py +21 -0
- letta/types/letta_schemas_openai_chat_completion_request_tool_call.py +24 -0
- letta/types/letta_schemas_openai_chat_completion_request_tool_call_function.py +20 -0
- letta/types/letta_schemas_openai_chat_completion_response_message.py +24 -0
- letta/types/letta_schemas_openai_chat_completion_response_tool_call.py +22 -0
- letta/types/letta_schemas_openai_chat_completions_tool_call_function.py +27 -0
- letta/types/letta_schemas_openai_chat_completions_tool_call_input.py +29 -0
- letta/types/letta_schemas_openai_chat_completions_tool_call_output.py +29 -0
- letta/types/letta_schemas_tool_tool.py +88 -0
- letta/types/letta_usage_statistics.py +47 -0
- letta/types/llm_config.py +60 -0
- letta/types/llm_config_model_endpoint_type.py +26 -0
- letta/types/local_sandbox_config.py +32 -0
- letta/types/log_prob_token.py +21 -0
- letta/types/memory.py +32 -0
- letta/types/message_content_log_prob.py +23 -0
- letta/types/message_create.py +37 -0
- letta/types/message_create_role.py +5 -0
- letta/types/message_role.py +5 -0
- letta/types/not_found_error_body.py +20 -0
- letta/types/not_found_error_body_message.py +11 -0
- letta/types/open_ai_assistant.py +67 -0
- letta/types/organization.py +33 -0
- letta/types/organization_create.py +22 -0
- letta/types/passage.py +107 -0
- letta/types/reasoning_message.py +32 -0
- letta/types/recall_memory_summary.py +22 -0
- letta/types/response_format.py +19 -0
- letta/types/sandbox_config.py +59 -0
- letta/types/sandbox_config_create.py +23 -0
- letta/types/sandbox_config_create_config.py +7 -0
- letta/types/sandbox_config_update.py +27 -0
- letta/types/sandbox_config_update_config.py +7 -0
- letta/types/sandbox_environment_variable.py +68 -0
- letta/types/sandbox_environment_variable_create.py +32 -0
- letta/types/sandbox_environment_variable_update.py +36 -0
- letta/types/sandbox_type.py +5 -0
- letta/types/source.py +85 -0
- letta/types/system_message_input.py +21 -0
- letta/types/system_message_output.py +32 -0
- letta/types/terminal_tool_rule.py +29 -0
- letta/types/tool_call_delta.py +21 -0
- letta/types/tool_call_function_output.py +27 -0
- letta/types/tool_call_message.py +33 -0
- letta/types/tool_call_message_tool_call.py +7 -0
- letta/types/tool_create.py +57 -0
- letta/types/tool_function_choice.py +21 -0
- letta/types/tool_input.py +21 -0
- letta/types/tool_message.py +21 -0
- letta/types/tool_return_message.py +41 -0
- letta/types/tool_return_message_status.py +5 -0
- letta/types/tool_rule_type.py +10 -0
- letta/types/usage_message.py +31 -0
- letta/types/usage_statistics.py +21 -0
- letta/types/user.py +57 -0
- letta/types/user_create.py +27 -0
- letta/types/user_message_input.py +22 -0
- letta/types/user_message_input_content.py +5 -0
- letta/types/user_message_output.py +32 -0
- letta/types/user_update.py +32 -0
- letta/types/validation_error.py +22 -0
- letta/types/validation_error_loc_item.py +5 -0
- letta/version.py +3 -0
- letta_client-0.1.2.dist-info/METADATA +189 -0
- letta_client-0.1.2.dist-info/RECORD +199 -0
- {letta_client-0.1.0.dist-info → letta_client-0.1.2.dist-info}/WHEEL +1 -1
- letta_client-0.1.0.dist-info/METADATA +0 -15
- letta_client-0.1.0.dist-info/RECORD +0 -4
- /letta_client/__init__.py → /letta/py.typed +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import pydantic
|
|
5
|
+
import typing
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class CreateAssistantRequest(UniversalBaseModel):
|
|
10
|
+
model: str = pydantic.Field()
|
|
11
|
+
"""
|
|
12
|
+
The model to use for the assistant.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
name: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
The name of the assistant.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
The description of the assistant.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
instructions: str = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
The instructions for the assistant.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
tools: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
The tools used by the assistant.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
file_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
List of file IDs associated with the assistant.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
41
|
+
"""
|
|
42
|
+
Metadata associated with the assistant.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
embedding_model: typing.Optional[str] = pydantic.Field(default=None)
|
|
46
|
+
"""
|
|
47
|
+
The model to use for the assistant.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
if IS_PYDANTIC_V2:
|
|
51
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
52
|
+
else:
|
|
53
|
+
|
|
54
|
+
class Config:
|
|
55
|
+
frozen = True
|
|
56
|
+
smart_union = True
|
|
57
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import pydantic
|
|
5
|
+
import typing
|
|
6
|
+
import typing_extensions
|
|
7
|
+
from ..core.serialization import FieldMetadata
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CreateBlock(UniversalBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Create a block
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
value: str = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Value of the block.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
limit: typing.Optional[int] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
Character limit of the block.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
Name of the block if it is a template.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
is_template: typing.Optional[bool] = None
|
|
32
|
+
label: str = pydantic.Field()
|
|
33
|
+
"""
|
|
34
|
+
Label of the block.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
38
|
+
"""
|
|
39
|
+
Description of the block.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
metadata: typing_extensions.Annotated[
|
|
43
|
+
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="metadata_")
|
|
44
|
+
] = pydantic.Field(default=None)
|
|
45
|
+
"""
|
|
46
|
+
Metadata of the block.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
if IS_PYDANTIC_V2:
|
|
50
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
51
|
+
else:
|
|
52
|
+
|
|
53
|
+
class Config:
|
|
54
|
+
frozen = True
|
|
55
|
+
smart_union = True
|
|
56
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import pydantic
|
|
5
|
+
import typing
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DeleteAssistantFileResponse(UniversalBaseModel):
|
|
10
|
+
id: str = pydantic.Field()
|
|
11
|
+
"""
|
|
12
|
+
The unique identifier of the file.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
object: typing.Optional[str] = None
|
|
16
|
+
deleted: bool = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Whether the file was deleted.
|
|
19
|
+
"""
|
|
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
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import pydantic
|
|
5
|
+
import typing
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DeleteAssistantResponse(UniversalBaseModel):
|
|
10
|
+
id: str = pydantic.Field()
|
|
11
|
+
"""
|
|
12
|
+
The unique identifier of the agent.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
object: typing.Optional[str] = None
|
|
16
|
+
deleted: bool = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Whether the agent was deleted.
|
|
19
|
+
"""
|
|
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
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class E2BSandboxConfig(UniversalBaseModel):
|
|
10
|
+
timeout: typing.Optional[int] = pydantic.Field(default=None)
|
|
11
|
+
"""
|
|
12
|
+
Time limit for the sandbox (in seconds).
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
template: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
The E2B template id (docker image).
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
pip_requirements: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
A list of pip packages to install on the E2B Sandbox
|
|
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
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from .embedding_config_embedding_endpoint_type import EmbeddingConfigEmbeddingEndpointType
|
|
5
|
+
import pydantic
|
|
6
|
+
import typing
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class EmbeddingConfig(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Embedding model configuration. This object specifies all the information necessary to access an embedding model to usage with Letta, except for secret keys.
|
|
13
|
+
|
|
14
|
+
Attributes:
|
|
15
|
+
embedding_endpoint_type (str): The endpoint type for the model.
|
|
16
|
+
embedding_endpoint (str): The endpoint for the model.
|
|
17
|
+
embedding_model (str): The model for the embedding.
|
|
18
|
+
embedding_dim (int): The dimension of the embedding.
|
|
19
|
+
embedding_chunk_size (int): The chunk size of the embedding.
|
|
20
|
+
azure_endpoint (:obj:`str`, optional): The Azure endpoint for the model (Azure only).
|
|
21
|
+
azure_version (str): The Azure version for the model (Azure only).
|
|
22
|
+
azure_deployment (str): The Azure deployment for the model (Azure only).
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
embedding_endpoint_type: EmbeddingConfigEmbeddingEndpointType = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
The endpoint type for the model.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
embedding_endpoint: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
The endpoint for the model (`None` if local).
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
embedding_model: str = pydantic.Field()
|
|
36
|
+
"""
|
|
37
|
+
The model for the embedding.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
embedding_dim: int = pydantic.Field()
|
|
41
|
+
"""
|
|
42
|
+
The dimension of the embedding.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
embedding_chunk_size: typing.Optional[int] = pydantic.Field(default=None)
|
|
46
|
+
"""
|
|
47
|
+
The chunk size of the embedding.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
azure_endpoint: typing.Optional[str] = pydantic.Field(default=None)
|
|
51
|
+
"""
|
|
52
|
+
The Azure endpoint for the model.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
azure_version: typing.Optional[str] = pydantic.Field(default=None)
|
|
56
|
+
"""
|
|
57
|
+
The Azure version for the model.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
azure_deployment: typing.Optional[str] = pydantic.Field(default=None)
|
|
61
|
+
"""
|
|
62
|
+
The Azure deployment for the model.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
if IS_PYDANTIC_V2:
|
|
66
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
67
|
+
else:
|
|
68
|
+
|
|
69
|
+
class Config:
|
|
70
|
+
frozen = True
|
|
71
|
+
smart_union = True
|
|
72
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
EmbeddingConfigEmbeddingEndpointType = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"openai",
|
|
8
|
+
"anthropic",
|
|
9
|
+
"cohere",
|
|
10
|
+
"google_ai",
|
|
11
|
+
"azure",
|
|
12
|
+
"groq",
|
|
13
|
+
"ollama",
|
|
14
|
+
"webui",
|
|
15
|
+
"webui-legacy",
|
|
16
|
+
"lmstudio",
|
|
17
|
+
"lmstudio-legacy",
|
|
18
|
+
"llamacpp",
|
|
19
|
+
"koboldcpp",
|
|
20
|
+
"vllm",
|
|
21
|
+
"hugging-face",
|
|
22
|
+
"mistral",
|
|
23
|
+
"together",
|
|
24
|
+
],
|
|
25
|
+
typing.Any,
|
|
26
|
+
]
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
import pydantic
|
|
6
|
+
import datetime as dt
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FileMetadata(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Representation of a single FileMetadata
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
+
"""
|
|
17
|
+
The human-friendly ID of the File
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
organization_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
The unique identifier of the organization associated with the document.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
source_id: str = pydantic.Field()
|
|
26
|
+
"""
|
|
27
|
+
The unique identifier of the source associated with the document.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
file_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
The name of the file.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
file_path: typing.Optional[str] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
The path to the file.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
file_type: typing.Optional[str] = pydantic.Field(default=None)
|
|
41
|
+
"""
|
|
42
|
+
The type of the file (MIME type).
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
file_size: typing.Optional[int] = pydantic.Field(default=None)
|
|
46
|
+
"""
|
|
47
|
+
The size of the file in bytes.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
file_creation_date: typing.Optional[str] = pydantic.Field(default=None)
|
|
51
|
+
"""
|
|
52
|
+
The creation date of the file.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
file_last_modified_date: typing.Optional[str] = pydantic.Field(default=None)
|
|
56
|
+
"""
|
|
57
|
+
The last modified date of the file.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
61
|
+
"""
|
|
62
|
+
The creation date of the file.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
66
|
+
"""
|
|
67
|
+
The update date of the file.
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
is_deleted: typing.Optional[bool] = pydantic.Field(default=None)
|
|
71
|
+
"""
|
|
72
|
+
Whether this file is deleted or not.
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
if IS_PYDANTIC_V2:
|
|
76
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
77
|
+
else:
|
|
78
|
+
|
|
79
|
+
class Config:
|
|
80
|
+
frozen = True
|
|
81
|
+
smart_union = True
|
|
82
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
import typing
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionCallInput(UniversalBaseModel):
|
|
10
|
+
name: str
|
|
11
|
+
|
|
12
|
+
if IS_PYDANTIC_V2:
|
|
13
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
14
|
+
else:
|
|
15
|
+
|
|
16
|
+
class Config:
|
|
17
|
+
frozen = True
|
|
18
|
+
smart_union = True
|
|
19
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
import typing
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionCallOutput(UniversalBaseModel):
|
|
10
|
+
arguments: str
|
|
11
|
+
name: str
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class FunctionSchema(UniversalBaseModel):
|
|
10
|
+
name: str
|
|
11
|
+
description: typing.Optional[str] = None
|
|
12
|
+
parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
letta/types/health.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
import typing
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Health(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Health check response body
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
status: str
|
|
16
|
+
|
|
17
|
+
if IS_PYDANTIC_V2:
|
|
18
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
19
|
+
else:
|
|
20
|
+
|
|
21
|
+
class Config:
|
|
22
|
+
frozen = True
|
|
23
|
+
smart_union = True
|
|
24
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from .validation_error import ValidationError
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import pydantic
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class HttpValidationError(UniversalBaseModel):
|
|
11
|
+
detail: typing.Optional[typing.List[ValidationError]] = None
|
|
12
|
+
|
|
13
|
+
if IS_PYDANTIC_V2:
|
|
14
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
15
|
+
else:
|
|
16
|
+
|
|
17
|
+
class Config:
|
|
18
|
+
frozen = True
|
|
19
|
+
smart_union = True
|
|
20
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import pydantic
|
|
5
|
+
import typing
|
|
6
|
+
from .tool_rule_type import ToolRuleType
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class InitToolRule(UniversalBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Represents the initial tool rule configuration.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
tool_name: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
The name of the tool. Must exist in the database for the user's organization.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
type: typing.Optional[ToolRuleType] = None
|
|
21
|
+
|
|
22
|
+
if IS_PYDANTIC_V2:
|
|
23
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
24
|
+
else:
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class InternalServerErrorBody(UniversalBaseModel):
|
|
10
|
+
message: typing.Literal["Migration failed"] = "Migration failed"
|
|
11
|
+
|
|
12
|
+
if IS_PYDANTIC_V2:
|
|
13
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
14
|
+
else:
|
|
15
|
+
|
|
16
|
+
class Config:
|
|
17
|
+
frozen = True
|
|
18
|
+
smart_union = True
|
|
19
|
+
extra = pydantic.Extra.allow
|
letta/types/job.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
import pydantic
|
|
6
|
+
import datetime as dt
|
|
7
|
+
from .job_status import JobStatus
|
|
8
|
+
import typing_extensions
|
|
9
|
+
from ..core.serialization import FieldMetadata
|
|
10
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Job(UniversalBaseModel):
|
|
14
|
+
"""
|
|
15
|
+
Representation of offline jobs, used for tracking status of data loading tasks (involving parsing and embedding files).
|
|
16
|
+
|
|
17
|
+
Parameters:
|
|
18
|
+
id (str): The unique identifier of the job.
|
|
19
|
+
status (JobStatus): The status of the job.
|
|
20
|
+
created_at (datetime): The unix timestamp of when the job was created.
|
|
21
|
+
completed_at (datetime): The unix timestamp of when the job was completed.
|
|
22
|
+
user_id (str): The unique identifier of the user associated with the.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
created_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
The id of the user that made this object.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
last_updated_by_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
The id of the user that made this object.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
36
|
+
"""
|
|
37
|
+
The timestamp when the object was created.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
41
|
+
"""
|
|
42
|
+
The timestamp when the object was last updated.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
status: typing.Optional[JobStatus] = pydantic.Field(default=None)
|
|
46
|
+
"""
|
|
47
|
+
The status of the job.
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
completed_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
51
|
+
"""
|
|
52
|
+
The unix timestamp of when the job was completed.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
metadata: typing_extensions.Annotated[
|
|
56
|
+
typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="metadata_")
|
|
57
|
+
] = pydantic.Field(default=None)
|
|
58
|
+
"""
|
|
59
|
+
The metadata of the job.
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
63
|
+
"""
|
|
64
|
+
The human-friendly ID of the Job
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
user_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
68
|
+
"""
|
|
69
|
+
The unique identifier of the user associated with the job.
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
if IS_PYDANTIC_V2:
|
|
73
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
74
|
+
else:
|
|
75
|
+
|
|
76
|
+
class Config:
|
|
77
|
+
frozen = True
|
|
78
|
+
smart_union = True
|
|
79
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
from .message_create import MessageCreate
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class LettaRequest(UniversalBaseModel):
|
|
11
|
+
messages: typing.List[MessageCreate] = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The messages to be sent to the agent.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
assistant_message_tool_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
The name of the designated message tool.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
assistant_message_tool_kwarg: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
The name of the message argument in the designated message tool.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
if IS_PYDANTIC_V2:
|
|
27
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
28
|
+
else:
|
|
29
|
+
|
|
30
|
+
class Config:
|
|
31
|
+
frozen = True
|
|
32
|
+
smart_union = True
|
|
33
|
+
extra = pydantic.Extra.allow
|