letta-client 0.1.16__py3-none-any.whl → 0.1.19__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.
Files changed (104) hide show
  1. letta_client/__init__.py +34 -120
  2. letta_client/agents/__init__.py +18 -54
  3. letta_client/agents/archival_memory/client.py +25 -343
  4. letta_client/agents/client.py +1640 -347
  5. letta_client/agents/context/client.py +6 -4
  6. letta_client/agents/core_memory/client.py +95 -624
  7. letta_client/agents/memory_variables/__init__.py +2 -2
  8. letta_client/agents/memory_variables/client.py +15 -15
  9. letta_client/agents/memory_variables/types/__init__.py +2 -2
  10. letta_client/agents/memory_variables/types/{memory_variables_get_response.py → memory_variables_list_response.py} +1 -1
  11. letta_client/agents/messages/__init__.py +2 -22
  12. letta_client/agents/messages/client.py +32 -38
  13. letta_client/agents/messages/types/__init__.py +2 -21
  14. letta_client/agents/messages/types/letta_streaming_response.py +16 -139
  15. letta_client/agents/messages/types/messages_list_response.py +2 -2
  16. letta_client/agents/sources/client.py +266 -5
  17. letta_client/agents/tools/client.py +25 -27
  18. letta_client/agents/types/__init__.py +15 -25
  19. letta_client/agents/types/agents_search_request_search_item.py +10 -78
  20. letta_client/agents/types/{agents_search_request_search_item_order_by.py → agents_search_request_search_item_direction.py} +7 -6
  21. letta_client/agents/types/agents_search_request_search_item_direction_direction.py +5 -0
  22. letta_client/agents/types/agents_search_request_search_item_direction_value.py +5 -0
  23. letta_client/agents/types/{agents_search_request_search_item_name.py → agents_search_request_search_item_one.py} +5 -4
  24. letta_client/agents/types/agents_search_request_search_item_one_operator.py +5 -0
  25. letta_client/agents/types/{agents_search_request_search_item_tags.py → agents_search_request_search_item_two.py} +2 -1
  26. letta_client/agents/types/{agents_search_request_search_item_version.py → agents_search_request_search_item_zero.py} +3 -2
  27. letta_client/blocks/client.py +12 -260
  28. letta_client/client.py +3 -3
  29. letta_client/core/client_wrapper.py +1 -1
  30. letta_client/jobs/client.py +4 -4
  31. letta_client/providers/client.py +74 -74
  32. letta_client/runs/client.py +14 -12
  33. letta_client/sources/client.py +12 -288
  34. letta_client/tools/client.py +63 -189
  35. letta_client/types/__init__.py +21 -103
  36. letta_client/types/agent_state.py +3 -7
  37. letta_client/types/{assistant_message_output.py → assistant_message.py} +3 -2
  38. letta_client/types/block.py +2 -6
  39. letta_client/types/block_update.py +1 -5
  40. letta_client/types/{archival_memory_summary.py → chat_completion_message_tool_call.py} +7 -7
  41. letta_client/types/context_window_overview.py +4 -6
  42. letta_client/types/create_block.py +1 -5
  43. letta_client/types/embedding_config_embedding_endpoint_type.py +1 -0
  44. letta_client/types/{function_call_output.py → function.py} +1 -1
  45. letta_client/types/{function_schema.py → function_definition.py} +2 -1
  46. letta_client/types/{create_assistant_file_request.py → function_tool.py} +6 -7
  47. letta_client/types/job.py +1 -5
  48. letta_client/types/letta_message_union.py +9 -121
  49. letta_client/types/letta_usage_statistics.py +1 -0
  50. letta_client/types/llm_config_model_endpoint_type.py +1 -0
  51. letta_client/types/{letta_schemas_message_message.py → message.py} +9 -6
  52. letta_client/types/passage.py +1 -5
  53. letta_client/types/reasoning_message.py +2 -1
  54. letta_client/types/run.py +1 -5
  55. letta_client/types/source.py +2 -6
  56. letta_client/types/{system_message_output.py → system_message.py} +3 -2
  57. letta_client/types/{letta_schemas_tool_tool.py → tool.py} +1 -1
  58. letta_client/types/{letta_schemas_letta_message_tool_call.py → tool_call.py} +1 -1
  59. letta_client/types/tool_call_message.py +2 -1
  60. letta_client/types/tool_call_message_tool_call.py +2 -2
  61. letta_client/types/tool_return_message.py +2 -1
  62. letta_client/types/tool_type.py +2 -1
  63. letta_client/types/{user_message_output.py → user_message.py} +3 -2
  64. {letta_client-0.1.16.dist-info → letta_client-0.1.19.dist-info}/METADATA +2 -2
  65. {letta_client-0.1.16.dist-info → letta_client-0.1.19.dist-info}/RECORD +66 -101
  66. letta_client/agents/recall_memory/__init__.py +0 -2
  67. letta_client/agents/recall_memory/client.py +0 -147
  68. letta_client/agents/types/agents_search_request_search_item_name_operator.py +0 -5
  69. letta_client/agents/types/agents_search_request_search_item_order_by_direction.py +0 -5
  70. letta_client/agents/types/agents_search_request_search_item_order_by_value.py +0 -5
  71. letta_client/types/assistant_file.py +0 -33
  72. letta_client/types/assistant_message_input.py +0 -23
  73. letta_client/types/chat_completion_request.py +0 -49
  74. letta_client/types/chat_completion_request_function_call.py +0 -6
  75. letta_client/types/chat_completion_request_messages_item.py +0 -11
  76. letta_client/types/chat_completion_request_stop.py +0 -5
  77. letta_client/types/chat_completion_request_tool_choice.py +0 -8
  78. letta_client/types/chat_completion_response.py +0 -32
  79. letta_client/types/choice.py +0 -25
  80. letta_client/types/create_assistant_request.py +0 -57
  81. letta_client/types/delete_assistant_file_response.py +0 -28
  82. letta_client/types/delete_assistant_response.py +0 -28
  83. letta_client/types/function_call_input.py +0 -19
  84. letta_client/types/letta_schemas_openai_chat_completion_request_tool.py +0 -21
  85. letta_client/types/letta_schemas_openai_chat_completion_request_tool_call.py +0 -24
  86. letta_client/types/letta_schemas_openai_chat_completion_request_tool_call_function.py +0 -20
  87. letta_client/types/letta_schemas_openai_chat_completion_response_message.py +0 -24
  88. letta_client/types/letta_schemas_openai_chat_completion_response_tool_call.py +0 -22
  89. letta_client/types/letta_schemas_openai_chat_completions_tool_call_function.py +0 -27
  90. letta_client/types/letta_schemas_openai_chat_completions_tool_call_input.py +0 -29
  91. letta_client/types/letta_schemas_openai_chat_completions_tool_call_output.py +0 -29
  92. letta_client/types/log_prob_token.py +0 -21
  93. letta_client/types/message_content_log_prob.py +0 -23
  94. letta_client/types/open_ai_assistant.py +0 -67
  95. letta_client/types/recall_memory_summary.py +0 -22
  96. letta_client/types/response_format.py +0 -19
  97. letta_client/types/system_message_input.py +0 -21
  98. letta_client/types/tool_call_function_output.py +0 -27
  99. letta_client/types/tool_function_choice.py +0 -21
  100. letta_client/types/tool_input.py +0 -21
  101. letta_client/types/tool_message.py +0 -21
  102. letta_client/types/user_message_input.py +0 -22
  103. letta_client/types/user_message_input_content.py +0 -5
  104. {letta_client-0.1.16.dist-info → letta_client-0.1.19.dist-info}/WHEEL +0 -0
@@ -1,29 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.unchecked_base_model import UncheckedBaseModel
4
- import pydantic
5
- import typing
6
- from .letta_schemas_openai_chat_completions_tool_call_function import LettaSchemasOpenaiChatCompletionsToolCallFunction
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
-
9
-
10
- class LettaSchemasOpenaiChatCompletionsToolCallInput(UncheckedBaseModel):
11
- id: str = pydantic.Field()
12
- """
13
- The ID of the tool call
14
- """
15
-
16
- type: typing.Optional[str] = None
17
- function: LettaSchemasOpenaiChatCompletionsToolCallFunction = pydantic.Field()
18
- """
19
- The arguments and name for the function
20
- """
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
@@ -1,29 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.unchecked_base_model import UncheckedBaseModel
4
- import pydantic
5
- import typing
6
- from .tool_call_function_output import ToolCallFunctionOutput
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
-
9
-
10
- class LettaSchemasOpenaiChatCompletionsToolCallOutput(UncheckedBaseModel):
11
- id: str = pydantic.Field()
12
- """
13
- The ID of the tool call
14
- """
15
-
16
- type: typing.Optional[str] = None
17
- function: ToolCallFunctionOutput = pydantic.Field()
18
- """
19
- The arguments and name for the function
20
- """
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
@@ -1,21 +0,0 @@
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
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
-
8
-
9
- class LogProbToken(UncheckedBaseModel):
10
- token: str
11
- logprob: float
12
- bytes: typing.Optional[typing.List[int]] = 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
@@ -1,23 +0,0 @@
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
- from .log_prob_token import LogProbToken
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class MessageContentLogProb(UncheckedBaseModel):
11
- token: str
12
- logprob: float
13
- bytes: typing.Optional[typing.List[int]] = None
14
- top_logprobs: typing.Optional[typing.List[LogProbToken]] = None
15
-
16
- if IS_PYDANTIC_V2:
17
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
18
- else:
19
-
20
- class Config:
21
- frozen = True
22
- smart_union = True
23
- extra = pydantic.Extra.allow
@@ -1,67 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.unchecked_base_model import UncheckedBaseModel
4
- import pydantic
5
- import typing
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
-
8
-
9
- class OpenAiAssistant(UncheckedBaseModel):
10
- """
11
- Represents an OpenAI assistant (equivalent to Letta preset)
12
- """
13
-
14
- id: str = pydantic.Field()
15
- """
16
- The unique identifier of the assistant.
17
- """
18
-
19
- name: str = pydantic.Field()
20
- """
21
- The name of the assistant.
22
- """
23
-
24
- object: typing.Optional[str] = None
25
- description: typing.Optional[str] = pydantic.Field(default=None)
26
- """
27
- The description of the assistant.
28
- """
29
-
30
- created_at: int = pydantic.Field()
31
- """
32
- The unix timestamp of when the assistant was created.
33
- """
34
-
35
- model: str = pydantic.Field()
36
- """
37
- The model used by the assistant.
38
- """
39
-
40
- instructions: str = pydantic.Field()
41
- """
42
- The instructions for the assistant.
43
- """
44
-
45
- tools: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
46
- """
47
- The tools used by the assistant.
48
- """
49
-
50
- file_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
51
- """
52
- List of file IDs associated with the assistant.
53
- """
54
-
55
- metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
56
- """
57
- Metadata associated with the assistant.
58
- """
59
-
60
- if IS_PYDANTIC_V2:
61
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
62
- else:
63
-
64
- class Config:
65
- frozen = True
66
- smart_union = True
67
- extra = pydantic.Extra.allow
@@ -1,22 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.unchecked_base_model import UncheckedBaseModel
4
- import pydantic
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import typing
7
-
8
-
9
- class RecallMemorySummary(UncheckedBaseModel):
10
- size: int = pydantic.Field()
11
- """
12
- Number of rows in recall memory
13
- """
14
-
15
- if IS_PYDANTIC_V2:
16
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
- else:
18
-
19
- class Config:
20
- frozen = True
21
- smart_union = True
22
- extra = pydantic.Extra.allow
@@ -1,19 +0,0 @@
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
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
-
8
-
9
- class ResponseFormat(UncheckedBaseModel):
10
- type: typing.Optional[str] = None
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
@@ -1,21 +0,0 @@
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
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
-
8
-
9
- class SystemMessageInput(UncheckedBaseModel):
10
- content: str
11
- role: typing.Optional[str] = None
12
- name: typing.Optional[str] = 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
@@ -1,27 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.unchecked_base_model import UncheckedBaseModel
4
- import pydantic
5
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import typing
7
-
8
-
9
- class ToolCallFunctionOutput(UncheckedBaseModel):
10
- name: str = pydantic.Field()
11
- """
12
- The name of the function to call
13
- """
14
-
15
- arguments: str = pydantic.Field()
16
- """
17
- The arguments to pass to the function (JSON dump)
18
- """
19
-
20
- if IS_PYDANTIC_V2:
21
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
22
- else:
23
-
24
- class Config:
25
- frozen = True
26
- smart_union = True
27
- extra = pydantic.Extra.allow
@@ -1,21 +0,0 @@
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
- from .function_call_input import FunctionCallInput
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class ToolFunctionChoice(UncheckedBaseModel):
11
- type: typing.Optional[typing.Literal["function"]] = None
12
- function: FunctionCallInput
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
@@ -1,21 +0,0 @@
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
- from .function_schema import FunctionSchema
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class ToolInput(UncheckedBaseModel):
11
- type: typing.Optional[typing.Literal["function"]] = None
12
- function: FunctionSchema
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
@@ -1,21 +0,0 @@
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
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
- import pydantic
7
-
8
-
9
- class ToolMessage(UncheckedBaseModel):
10
- content: str
11
- role: typing.Optional[str] = None
12
- tool_call_id: str
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
@@ -1,22 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- from ..core.unchecked_base_model import UncheckedBaseModel
4
- from .user_message_input_content import UserMessageInputContent
5
- import typing
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class UserMessageInput(UncheckedBaseModel):
11
- content: UserMessageInputContent
12
- role: typing.Optional[str] = None
13
- name: typing.Optional[str] = None
14
-
15
- if IS_PYDANTIC_V2:
16
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
17
- else:
18
-
19
- class Config:
20
- frozen = True
21
- smart_union = True
22
- extra = pydantic.Extra.allow
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- UserMessageInputContent = typing.Union[str, typing.List[str]]