letta-client 0.1.17__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 (98) hide show
  1. letta_client/__init__.py +34 -116
  2. letta_client/agents/__init__.py +17 -42
  3. letta_client/agents/archival_memory/client.py +19 -212
  4. letta_client/agents/client.py +1633 -336
  5. letta_client/agents/context/client.py +6 -4
  6. letta_client/agents/core_memory/client.py +97 -499
  7. letta_client/agents/memory_variables/__init__.py +2 -2
  8. letta_client/agents/memory_variables/client.py +13 -13
  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 +20 -26
  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 +4 -4
  32. letta_client/runs/client.py +14 -12
  33. letta_client/sources/client.py +12 -288
  34. letta_client/tools/client.py +63 -69
  35. letta_client/types/__init__.py +21 -99
  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/{create_assistant_file_request.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/{function_call_output.py → function.py} +1 -1
  44. letta_client/types/{function_schema.py → function_definition.py} +2 -1
  45. letta_client/types/{function_call_input.py → function_tool.py} +5 -3
  46. letta_client/types/job.py +1 -5
  47. letta_client/types/letta_message_union.py +9 -121
  48. letta_client/types/letta_usage_statistics.py +1 -0
  49. letta_client/types/{letta_schemas_message_message.py → message.py} +4 -6
  50. letta_client/types/passage.py +1 -5
  51. letta_client/types/reasoning_message.py +2 -1
  52. letta_client/types/run.py +1 -5
  53. letta_client/types/source.py +2 -6
  54. letta_client/types/{system_message_output.py → system_message.py} +3 -2
  55. letta_client/types/{letta_schemas_tool_tool.py → tool.py} +1 -1
  56. letta_client/types/{letta_schemas_letta_message_tool_call.py → tool_call.py} +1 -1
  57. letta_client/types/tool_call_message.py +2 -1
  58. letta_client/types/tool_call_message_tool_call.py +2 -2
  59. letta_client/types/tool_return_message.py +2 -1
  60. letta_client/types/tool_type.py +2 -1
  61. letta_client/types/{user_message_output.py → user_message.py} +3 -2
  62. {letta_client-0.1.17.dist-info → letta_client-0.1.19.dist-info}/METADATA +1 -1
  63. {letta_client-0.1.17.dist-info → letta_client-0.1.19.dist-info}/RECORD +64 -95
  64. letta_client/agents/types/agents_search_request_search_item_name_operator.py +0 -5
  65. letta_client/agents/types/agents_search_request_search_item_order_by_direction.py +0 -5
  66. letta_client/agents/types/agents_search_request_search_item_order_by_value.py +0 -5
  67. letta_client/types/assistant_file.py +0 -33
  68. letta_client/types/assistant_message_input.py +0 -23
  69. letta_client/types/chat_completion_request.py +0 -49
  70. letta_client/types/chat_completion_request_function_call.py +0 -6
  71. letta_client/types/chat_completion_request_messages_item.py +0 -11
  72. letta_client/types/chat_completion_request_stop.py +0 -5
  73. letta_client/types/chat_completion_request_tool_choice.py +0 -8
  74. letta_client/types/chat_completion_response.py +0 -32
  75. letta_client/types/choice.py +0 -25
  76. letta_client/types/create_assistant_request.py +0 -57
  77. letta_client/types/delete_assistant_file_response.py +0 -28
  78. letta_client/types/delete_assistant_response.py +0 -28
  79. letta_client/types/letta_schemas_openai_chat_completion_request_tool.py +0 -21
  80. letta_client/types/letta_schemas_openai_chat_completion_request_tool_call.py +0 -24
  81. letta_client/types/letta_schemas_openai_chat_completion_request_tool_call_function.py +0 -20
  82. letta_client/types/letta_schemas_openai_chat_completion_response_message.py +0 -24
  83. letta_client/types/letta_schemas_openai_chat_completion_response_tool_call.py +0 -22
  84. letta_client/types/letta_schemas_openai_chat_completions_tool_call_function.py +0 -27
  85. letta_client/types/letta_schemas_openai_chat_completions_tool_call_input.py +0 -29
  86. letta_client/types/letta_schemas_openai_chat_completions_tool_call_output.py +0 -29
  87. letta_client/types/log_prob_token.py +0 -21
  88. letta_client/types/message_content_log_prob.py +0 -23
  89. letta_client/types/open_ai_assistant.py +0 -67
  90. letta_client/types/response_format.py +0 -19
  91. letta_client/types/system_message_input.py +0 -21
  92. letta_client/types/tool_call_function_output.py +0 -27
  93. letta_client/types/tool_function_choice.py +0 -21
  94. letta_client/types/tool_input.py +0 -21
  95. letta_client/types/tool_message.py +0 -21
  96. letta_client/types/user_message_input.py +0 -22
  97. letta_client/types/user_message_input_content.py +0 -5
  98. {letta_client-0.1.17.dist-info → letta_client-0.1.19.dist-info}/WHEEL +0 -0
@@ -1,11 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
- from .system_message_input import SystemMessageInput
5
- from .user_message_input import UserMessageInput
6
- from .assistant_message_input import AssistantMessageInput
7
- from .tool_message import ToolMessage
8
-
9
- ChatCompletionRequestMessagesItem = typing.Union[
10
- SystemMessageInput, UserMessageInput, AssistantMessageInput, ToolMessage
11
- ]
@@ -1,5 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
-
5
- ChatCompletionRequestStop = typing.Union[str, typing.List[str]]
@@ -1,8 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
- from .tool_function_choice import ToolFunctionChoice
5
-
6
- ChatCompletionRequestToolChoice = typing.Union[
7
- typing.Literal["none"], typing.Literal["auto"], typing.Literal["required"], ToolFunctionChoice
8
- ]
@@ -1,32 +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 .choice import Choice
6
- import datetime as dt
7
- from .usage_statistics import UsageStatistics
8
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
- import pydantic
10
-
11
-
12
- class ChatCompletionResponse(UncheckedBaseModel):
13
- """
14
- https://platform.openai.com/docs/api-reference/chat/object
15
- """
16
-
17
- id: str
18
- choices: typing.List[Choice]
19
- created: dt.datetime
20
- model: typing.Optional[str] = None
21
- system_fingerprint: typing.Optional[str] = None
22
- object: typing.Optional[typing.Literal["chat.completion"]] = None
23
- usage: UsageStatistics
24
-
25
- if IS_PYDANTIC_V2:
26
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
27
- else:
28
-
29
- class Config:
30
- frozen = True
31
- smart_union = True
32
- extra = pydantic.Extra.allow
@@ -1,25 +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 .letta_schemas_openai_chat_completion_response_message import LettaSchemasOpenaiChatCompletionResponseMessage
5
- import typing
6
- from .message_content_log_prob import MessageContentLogProb
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
- import pydantic
9
-
10
-
11
- class Choice(UncheckedBaseModel):
12
- finish_reason: str
13
- index: int
14
- message: LettaSchemasOpenaiChatCompletionResponseMessage
15
- logprobs: typing.Optional[typing.Dict[str, typing.Optional[typing.List[MessageContentLogProb]]]] = None
16
- seed: typing.Optional[int] = None
17
-
18
- if IS_PYDANTIC_V2:
19
- model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
20
- else:
21
-
22
- class Config:
23
- frozen = True
24
- smart_union = True
25
- extra = pydantic.Extra.allow
@@ -1,57 +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 CreateAssistantRequest(UncheckedBaseModel):
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
@@ -1,28 +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 DeleteAssistantFileResponse(UncheckedBaseModel):
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
@@ -1,28 +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 DeleteAssistantResponse(UncheckedBaseModel):
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
@@ -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 LettaSchemasOpenaiChatCompletionRequestTool(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,24 +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 .letta_schemas_openai_chat_completion_request_tool_call_function import (
6
- LettaSchemasOpenaiChatCompletionRequestToolCallFunction,
7
- )
8
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
- import pydantic
10
-
11
-
12
- class LettaSchemasOpenaiChatCompletionRequestToolCall(UncheckedBaseModel):
13
- id: str
14
- type: typing.Optional[typing.Literal["function"]] = None
15
- function: LettaSchemasOpenaiChatCompletionRequestToolCallFunction
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
@@ -1,20 +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 ..core.pydantic_utilities import IS_PYDANTIC_V2
5
- import typing
6
- import pydantic
7
-
8
-
9
- class LettaSchemasOpenaiChatCompletionRequestToolCallFunction(UncheckedBaseModel):
10
- name: str
11
- arguments: 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
@@ -1,24 +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 .letta_schemas_openai_chat_completion_response_tool_call import LettaSchemasOpenaiChatCompletionResponseToolCall
6
- from .function_call_output import FunctionCallOutput
7
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
- import pydantic
9
-
10
-
11
- class LettaSchemasOpenaiChatCompletionResponseMessage(UncheckedBaseModel):
12
- content: typing.Optional[str] = None
13
- tool_calls: typing.Optional[typing.List[LettaSchemasOpenaiChatCompletionResponseToolCall]] = None
14
- role: str
15
- function_call: typing.Optional[FunctionCallOutput] = None
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
@@ -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 typing
5
- from .function_call_output import FunctionCallOutput
6
- from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
- import pydantic
8
-
9
-
10
- class LettaSchemasOpenaiChatCompletionResponseToolCall(UncheckedBaseModel):
11
- id: str
12
- type: typing.Optional[typing.Literal["function"]] = None
13
- function: FunctionCallOutput
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,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 LettaSchemasOpenaiChatCompletionsToolCallFunction(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,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,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