letta-client 0.1.250__py3-none-any.whl → 0.1.252__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- letta_client/__init__.py +40 -8
- letta_client/agents/client.py +31 -8
- letta_client/agents/raw_client.py +31 -10
- letta_client/core/client_wrapper.py +2 -2
- letta_client/templates/types/templates_list_response.py +1 -3
- letta_client/templates/types/templates_list_response_templates_item.py +6 -0
- letta_client/types/__init__.py +48 -8
- letta_client/types/agent_file_schema.py +75 -0
- letta_client/types/block_schema.py +73 -0
- letta_client/types/body_export_agent_serialized.py +25 -0
- letta_client/types/completion_create_params_non_streaming.py +2 -0
- letta_client/types/completion_create_params_streaming.py +2 -0
- letta_client/types/file_agent_schema.py +73 -0
- letta_client/types/file_schema.py +93 -0
- letta_client/types/group_schema.py +53 -0
- letta_client/types/group_schema_manager_config.py +13 -0
- letta_client/types/imported_agents_response.py +27 -0
- letta_client/types/letta_schemas_agent_file_agent_schema.py +275 -0
- letta_client/types/letta_schemas_agent_file_agent_schema_response_format.py +11 -0
- letta_client/types/letta_schemas_agent_file_agent_schema_tool_rules_item.py +23 -0
- letta_client/types/letta_schemas_agent_file_message_schema.py +74 -0
- letta_client/types/letta_schemas_agent_file_message_schema_content.py +7 -0
- letta_client/types/letta_schemas_agent_file_tool_schema.py +104 -0
- letta_client/types/{agent_schema.py → letta_serialize_schemas_pydantic_agent_schema_agent_schema.py} +13 -7
- letta_client/types/{agent_schema_tool_rules_item.py → letta_serialize_schemas_pydantic_agent_schema_agent_schema_tool_rules_item.py} +1 -1
- letta_client/types/{message_schema.py → letta_serialize_schemas_pydantic_agent_schema_message_schema.py} +1 -1
- letta_client/types/{tool_schema.py → letta_serialize_schemas_pydantic_agent_schema_tool_schema.py} +1 -1
- letta_client/types/mcp_server_schema.py +37 -0
- letta_client/types/source_schema.py +63 -0
- {letta_client-0.1.250.dist-info → letta_client-0.1.252.dist-info}/METADATA +1 -1
- {letta_client-0.1.250.dist-info → letta_client-0.1.252.dist-info}/RECORD +32 -16
- {letta_client-0.1.250.dist-info → letta_client-0.1.252.dist-info}/WHEEL +0 -0
letta_client/types/__init__.py
CHANGED
|
@@ -6,8 +6,7 @@ from .action_model import ActionModel
|
|
|
6
6
|
from .action_parameters_model import ActionParametersModel
|
|
7
7
|
from .action_response_model import ActionResponseModel
|
|
8
8
|
from .agent_environment_variable import AgentEnvironmentVariable
|
|
9
|
-
from .
|
|
10
|
-
from .agent_schema_tool_rules_item import AgentSchemaToolRulesItem
|
|
9
|
+
from .agent_file_schema import AgentFileSchema
|
|
11
10
|
from .agent_state import AgentState
|
|
12
11
|
from .agent_state_response_format import AgentStateResponseFormat
|
|
13
12
|
from .agent_state_tool_rules_item import AgentStateToolRulesItem
|
|
@@ -26,7 +25,9 @@ from .base_64_image import Base64Image
|
|
|
26
25
|
from .base_tool_rule_schema import BaseToolRuleSchema
|
|
27
26
|
from .batch_job import BatchJob
|
|
28
27
|
from .block import Block
|
|
28
|
+
from .block_schema import BlockSchema
|
|
29
29
|
from .block_update import BlockUpdate
|
|
30
|
+
from .body_export_agent_serialized import BodyExportAgentSerialized
|
|
30
31
|
from .chat_completion_assistant_message_param import ChatCompletionAssistantMessageParam
|
|
31
32
|
from .chat_completion_assistant_message_param_content import ChatCompletionAssistantMessageParamContent
|
|
32
33
|
from .chat_completion_assistant_message_param_content_item import ChatCompletionAssistantMessageParamContentItem
|
|
@@ -94,10 +95,12 @@ from .embedding_config import EmbeddingConfig
|
|
|
94
95
|
from .embedding_config_embedding_endpoint_type import EmbeddingConfigEmbeddingEndpointType
|
|
95
96
|
from .feedback_type import FeedbackType
|
|
96
97
|
from .file import File
|
|
98
|
+
from .file_agent_schema import FileAgentSchema
|
|
97
99
|
from .file_block import FileBlock
|
|
98
100
|
from .file_file import FileFile
|
|
99
101
|
from .file_metadata import FileMetadata
|
|
100
102
|
from .file_processing_status import FileProcessingStatus
|
|
103
|
+
from .file_schema import FileSchema
|
|
101
104
|
from .file_stats import FileStats
|
|
102
105
|
from .folder import Folder
|
|
103
106
|
from .function_call import FunctionCall
|
|
@@ -108,6 +111,8 @@ from .function_tool import FunctionTool
|
|
|
108
111
|
from .generate_tool_input import GenerateToolInput
|
|
109
112
|
from .generate_tool_output import GenerateToolOutput
|
|
110
113
|
from .group import Group
|
|
114
|
+
from .group_schema import GroupSchema
|
|
115
|
+
from .group_schema_manager_config import GroupSchemaManagerConfig
|
|
111
116
|
from .health import Health
|
|
112
117
|
from .hidden_reasoning_message import HiddenReasoningMessage
|
|
113
118
|
from .hidden_reasoning_message_state import HiddenReasoningMessageState
|
|
@@ -121,6 +126,7 @@ from .image_content import ImageContent
|
|
|
121
126
|
from .image_content_source import ImageContentSource
|
|
122
127
|
from .image_url import ImageUrl
|
|
123
128
|
from .image_url_detail import ImageUrlDetail
|
|
129
|
+
from .imported_agents_response import ImportedAgentsResponse
|
|
124
130
|
from .init_tool_rule import InitToolRule
|
|
125
131
|
from .input_audio import InputAudio
|
|
126
132
|
from .input_audio_format import InputAudioFormat
|
|
@@ -140,6 +146,24 @@ from .letta_ping import LettaPing
|
|
|
140
146
|
from .letta_request import LettaRequest
|
|
141
147
|
from .letta_request_config import LettaRequestConfig
|
|
142
148
|
from .letta_response import LettaResponse
|
|
149
|
+
from .letta_schemas_agent_file_agent_schema import LettaSchemasAgentFileAgentSchema
|
|
150
|
+
from .letta_schemas_agent_file_agent_schema_response_format import LettaSchemasAgentFileAgentSchemaResponseFormat
|
|
151
|
+
from .letta_schemas_agent_file_agent_schema_tool_rules_item import LettaSchemasAgentFileAgentSchemaToolRulesItem
|
|
152
|
+
from .letta_schemas_agent_file_message_schema import LettaSchemasAgentFileMessageSchema
|
|
153
|
+
from .letta_schemas_agent_file_message_schema_content import LettaSchemasAgentFileMessageSchemaContent
|
|
154
|
+
from .letta_schemas_agent_file_tool_schema import LettaSchemasAgentFileToolSchema
|
|
155
|
+
from .letta_serialize_schemas_pydantic_agent_schema_agent_schema import (
|
|
156
|
+
LettaSerializeSchemasPydanticAgentSchemaAgentSchema,
|
|
157
|
+
)
|
|
158
|
+
from .letta_serialize_schemas_pydantic_agent_schema_agent_schema_tool_rules_item import (
|
|
159
|
+
LettaSerializeSchemasPydanticAgentSchemaAgentSchemaToolRulesItem,
|
|
160
|
+
)
|
|
161
|
+
from .letta_serialize_schemas_pydantic_agent_schema_message_schema import (
|
|
162
|
+
LettaSerializeSchemasPydanticAgentSchemaMessageSchema,
|
|
163
|
+
)
|
|
164
|
+
from .letta_serialize_schemas_pydantic_agent_schema_tool_schema import (
|
|
165
|
+
LettaSerializeSchemasPydanticAgentSchemaToolSchema,
|
|
166
|
+
)
|
|
143
167
|
from .letta_stop_reason import LettaStopReason
|
|
144
168
|
from .letta_streaming_request import LettaStreamingRequest
|
|
145
169
|
from .letta_usage_statistics import LettaUsageStatistics
|
|
@@ -152,6 +176,7 @@ from .local_sandbox_config import LocalSandboxConfig
|
|
|
152
176
|
from .manager_type import ManagerType
|
|
153
177
|
from .max_count_per_step_tool_rule import MaxCountPerStepToolRule
|
|
154
178
|
from .max_count_per_step_tool_rule_schema import MaxCountPerStepToolRuleSchema
|
|
179
|
+
from .mcp_server_schema import McpServerSchema
|
|
155
180
|
from .mcp_server_type import McpServerType
|
|
156
181
|
from .mcp_tool import McpTool
|
|
157
182
|
from .memory import Memory
|
|
@@ -161,7 +186,6 @@ from .message_create import MessageCreate
|
|
|
161
186
|
from .message_create_content import MessageCreateContent
|
|
162
187
|
from .message_create_role import MessageCreateRole
|
|
163
188
|
from .message_role import MessageRole
|
|
164
|
-
from .message_schema import MessageSchema
|
|
165
189
|
from .message_type import MessageType
|
|
166
190
|
from .modal_sandbox_config import ModalSandboxConfig
|
|
167
191
|
from .modal_sandbox_config_language import ModalSandboxConfigLanguage
|
|
@@ -215,6 +239,7 @@ from .sleeptime_manager import SleeptimeManager
|
|
|
215
239
|
from .sleeptime_manager_update import SleeptimeManagerUpdate
|
|
216
240
|
from .source import Source
|
|
217
241
|
from .source_create import SourceCreate
|
|
242
|
+
from .source_schema import SourceSchema
|
|
218
243
|
from .source_stats import SourceStats
|
|
219
244
|
from .source_update import SourceUpdate
|
|
220
245
|
from .sse_server_config import SseServerConfig
|
|
@@ -246,7 +271,6 @@ from .tool_return_content import ToolReturnContent
|
|
|
246
271
|
from .tool_return_message import ToolReturnMessage
|
|
247
272
|
from .tool_return_message_status import ToolReturnMessageStatus
|
|
248
273
|
from .tool_return_status import ToolReturnStatus
|
|
249
|
-
from .tool_schema import ToolSchema
|
|
250
274
|
from .tool_type import ToolType
|
|
251
275
|
from .update_assistant_message import UpdateAssistantMessage
|
|
252
276
|
from .update_assistant_message_content import UpdateAssistantMessageContent
|
|
@@ -280,8 +304,7 @@ __all__ = [
|
|
|
280
304
|
"ActionParametersModel",
|
|
281
305
|
"ActionResponseModel",
|
|
282
306
|
"AgentEnvironmentVariable",
|
|
283
|
-
"
|
|
284
|
-
"AgentSchemaToolRulesItem",
|
|
307
|
+
"AgentFileSchema",
|
|
285
308
|
"AgentState",
|
|
286
309
|
"AgentStateResponseFormat",
|
|
287
310
|
"AgentStateToolRulesItem",
|
|
@@ -300,7 +323,9 @@ __all__ = [
|
|
|
300
323
|
"BaseToolRuleSchema",
|
|
301
324
|
"BatchJob",
|
|
302
325
|
"Block",
|
|
326
|
+
"BlockSchema",
|
|
303
327
|
"BlockUpdate",
|
|
328
|
+
"BodyExportAgentSerialized",
|
|
304
329
|
"ChatCompletionAssistantMessageParam",
|
|
305
330
|
"ChatCompletionAssistantMessageParamContent",
|
|
306
331
|
"ChatCompletionAssistantMessageParamContentItem",
|
|
@@ -368,10 +393,12 @@ __all__ = [
|
|
|
368
393
|
"EmbeddingConfigEmbeddingEndpointType",
|
|
369
394
|
"FeedbackType",
|
|
370
395
|
"File",
|
|
396
|
+
"FileAgentSchema",
|
|
371
397
|
"FileBlock",
|
|
372
398
|
"FileFile",
|
|
373
399
|
"FileMetadata",
|
|
374
400
|
"FileProcessingStatus",
|
|
401
|
+
"FileSchema",
|
|
375
402
|
"FileStats",
|
|
376
403
|
"Folder",
|
|
377
404
|
"FunctionCall",
|
|
@@ -382,6 +409,8 @@ __all__ = [
|
|
|
382
409
|
"GenerateToolInput",
|
|
383
410
|
"GenerateToolOutput",
|
|
384
411
|
"Group",
|
|
412
|
+
"GroupSchema",
|
|
413
|
+
"GroupSchemaManagerConfig",
|
|
385
414
|
"Health",
|
|
386
415
|
"HiddenReasoningMessage",
|
|
387
416
|
"HiddenReasoningMessageState",
|
|
@@ -395,6 +424,7 @@ __all__ = [
|
|
|
395
424
|
"ImageContentSource",
|
|
396
425
|
"ImageUrl",
|
|
397
426
|
"ImageUrlDetail",
|
|
427
|
+
"ImportedAgentsResponse",
|
|
398
428
|
"InitToolRule",
|
|
399
429
|
"InputAudio",
|
|
400
430
|
"InputAudioFormat",
|
|
@@ -414,6 +444,16 @@ __all__ = [
|
|
|
414
444
|
"LettaRequest",
|
|
415
445
|
"LettaRequestConfig",
|
|
416
446
|
"LettaResponse",
|
|
447
|
+
"LettaSchemasAgentFileAgentSchema",
|
|
448
|
+
"LettaSchemasAgentFileAgentSchemaResponseFormat",
|
|
449
|
+
"LettaSchemasAgentFileAgentSchemaToolRulesItem",
|
|
450
|
+
"LettaSchemasAgentFileMessageSchema",
|
|
451
|
+
"LettaSchemasAgentFileMessageSchemaContent",
|
|
452
|
+
"LettaSchemasAgentFileToolSchema",
|
|
453
|
+
"LettaSerializeSchemasPydanticAgentSchemaAgentSchema",
|
|
454
|
+
"LettaSerializeSchemasPydanticAgentSchemaAgentSchemaToolRulesItem",
|
|
455
|
+
"LettaSerializeSchemasPydanticAgentSchemaMessageSchema",
|
|
456
|
+
"LettaSerializeSchemasPydanticAgentSchemaToolSchema",
|
|
417
457
|
"LettaStopReason",
|
|
418
458
|
"LettaStreamingRequest",
|
|
419
459
|
"LettaUsageStatistics",
|
|
@@ -426,6 +466,7 @@ __all__ = [
|
|
|
426
466
|
"ManagerType",
|
|
427
467
|
"MaxCountPerStepToolRule",
|
|
428
468
|
"MaxCountPerStepToolRuleSchema",
|
|
469
|
+
"McpServerSchema",
|
|
429
470
|
"McpServerType",
|
|
430
471
|
"McpTool",
|
|
431
472
|
"Memory",
|
|
@@ -435,7 +476,6 @@ __all__ = [
|
|
|
435
476
|
"MessageCreateContent",
|
|
436
477
|
"MessageCreateRole",
|
|
437
478
|
"MessageRole",
|
|
438
|
-
"MessageSchema",
|
|
439
479
|
"MessageType",
|
|
440
480
|
"ModalSandboxConfig",
|
|
441
481
|
"ModalSandboxConfigLanguage",
|
|
@@ -485,6 +525,7 @@ __all__ = [
|
|
|
485
525
|
"SleeptimeManagerUpdate",
|
|
486
526
|
"Source",
|
|
487
527
|
"SourceCreate",
|
|
528
|
+
"SourceSchema",
|
|
488
529
|
"SourceStats",
|
|
489
530
|
"SourceUpdate",
|
|
490
531
|
"SseServerConfig",
|
|
@@ -516,7 +557,6 @@ __all__ = [
|
|
|
516
557
|
"ToolReturnMessage",
|
|
517
558
|
"ToolReturnMessageStatus",
|
|
518
559
|
"ToolReturnStatus",
|
|
519
|
-
"ToolSchema",
|
|
520
560
|
"ToolType",
|
|
521
561
|
"UpdateAssistantMessage",
|
|
522
562
|
"UpdateAssistantMessageContent",
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
9
|
+
from .block_schema import BlockSchema
|
|
10
|
+
from .file_schema import FileSchema
|
|
11
|
+
from .group_schema import GroupSchema
|
|
12
|
+
from .letta_schemas_agent_file_agent_schema import LettaSchemasAgentFileAgentSchema
|
|
13
|
+
from .letta_schemas_agent_file_tool_schema import LettaSchemasAgentFileToolSchema
|
|
14
|
+
from .mcp_server_schema import McpServerSchema
|
|
15
|
+
from .source_schema import SourceSchema
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class AgentFileSchema(UncheckedBaseModel):
|
|
19
|
+
"""
|
|
20
|
+
Schema for serialized agent file that can be exported to JSON and imported into agent server.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
agents: typing.List[LettaSchemasAgentFileAgentSchema] = pydantic.Field()
|
|
24
|
+
"""
|
|
25
|
+
List of agents in this agent file
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
groups: typing.List[GroupSchema] = pydantic.Field()
|
|
29
|
+
"""
|
|
30
|
+
List of groups in this agent file
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
blocks: typing.List[BlockSchema] = pydantic.Field()
|
|
34
|
+
"""
|
|
35
|
+
List of memory blocks in this agent file
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
files: typing.List[FileSchema] = pydantic.Field()
|
|
39
|
+
"""
|
|
40
|
+
List of files in this agent file
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
sources: typing.List[SourceSchema] = pydantic.Field()
|
|
44
|
+
"""
|
|
45
|
+
List of sources in this agent file
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
tools: typing.List[LettaSchemasAgentFileToolSchema] = pydantic.Field()
|
|
49
|
+
"""
|
|
50
|
+
List of tools in this agent file
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
mcp_servers: typing.List[McpServerSchema] = pydantic.Field()
|
|
54
|
+
"""
|
|
55
|
+
List of MCP servers in this agent file
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
metadata: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
|
|
59
|
+
"""
|
|
60
|
+
Metadata for this agent file, including revision_id and other export information.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
64
|
+
"""
|
|
65
|
+
The timestamp when the object was created.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
if IS_PYDANTIC_V2:
|
|
69
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
70
|
+
else:
|
|
71
|
+
|
|
72
|
+
class Config:
|
|
73
|
+
frozen = True
|
|
74
|
+
smart_union = True
|
|
75
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class BlockSchema(UncheckedBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Block with human-readable ID for agent file
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
value: str = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
Value of the block.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
limit: typing.Optional[int] = pydantic.Field(default=None)
|
|
21
|
+
"""
|
|
22
|
+
Character limit of the block.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
project_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
26
|
+
"""
|
|
27
|
+
The associated project id.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
31
|
+
"""
|
|
32
|
+
Name of the block if it is a template.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
is_template: typing.Optional[bool] = None
|
|
36
|
+
preserve_on_migration: typing.Optional[bool] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
Preserve the block on template migration.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
label: str = pydantic.Field()
|
|
42
|
+
"""
|
|
43
|
+
Label of the block.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
read_only: typing.Optional[bool] = pydantic.Field(default=None)
|
|
47
|
+
"""
|
|
48
|
+
Whether the agent has read-only access to the block.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
description: typing.Optional[str] = pydantic.Field(default=None)
|
|
52
|
+
"""
|
|
53
|
+
Description of the block.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
|
|
57
|
+
"""
|
|
58
|
+
Metadata of the block.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
id: str = pydantic.Field()
|
|
62
|
+
"""
|
|
63
|
+
Human-readable identifier for this block in the file
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
if IS_PYDANTIC_V2:
|
|
67
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
68
|
+
else:
|
|
69
|
+
|
|
70
|
+
class Config:
|
|
71
|
+
frozen = True
|
|
72
|
+
smart_union = True
|
|
73
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .agent_file_schema import AgentFileSchema
|
|
9
|
+
from .letta_serialize_schemas_pydantic_agent_schema_agent_schema import (
|
|
10
|
+
LettaSerializeSchemasPydanticAgentSchemaAgentSchema,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class BodyExportAgentSerialized(UncheckedBaseModel):
|
|
15
|
+
spec: typing.Optional[AgentFileSchema] = None
|
|
16
|
+
legacy_spec: typing.Optional[LettaSerializeSchemasPydanticAgentSchemaAgentSchema] = 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
|
|
@@ -39,8 +39,10 @@ class CompletionCreateParamsNonStreaming(UncheckedBaseModel):
|
|
|
39
39
|
parallel_tool_calls: typing.Optional[bool] = None
|
|
40
40
|
prediction: typing.Optional[ChatCompletionPredictionContentParam] = None
|
|
41
41
|
presence_penalty: typing.Optional[float] = None
|
|
42
|
+
prompt_cache_key: typing.Optional[str] = None
|
|
42
43
|
reasoning_effort: typing.Optional[CompletionCreateParamsNonStreamingReasoningEffort] = None
|
|
43
44
|
response_format: typing.Optional[CompletionCreateParamsNonStreamingResponseFormat] = None
|
|
45
|
+
safety_identifier: typing.Optional[str] = None
|
|
44
46
|
seed: typing.Optional[int] = None
|
|
45
47
|
service_tier: typing.Optional[CompletionCreateParamsNonStreamingServiceTier] = None
|
|
46
48
|
stop: typing.Optional[CompletionCreateParamsNonStreamingStop] = None
|
|
@@ -39,8 +39,10 @@ class CompletionCreateParamsStreaming(UncheckedBaseModel):
|
|
|
39
39
|
parallel_tool_calls: typing.Optional[bool] = None
|
|
40
40
|
prediction: typing.Optional[ChatCompletionPredictionContentParam] = None
|
|
41
41
|
presence_penalty: typing.Optional[float] = None
|
|
42
|
+
prompt_cache_key: typing.Optional[str] = None
|
|
42
43
|
reasoning_effort: typing.Optional[CompletionCreateParamsStreamingReasoningEffort] = None
|
|
43
44
|
response_format: typing.Optional[CompletionCreateParamsStreamingResponseFormat] = None
|
|
45
|
+
safety_identifier: typing.Optional[str] = None
|
|
44
46
|
seed: typing.Optional[int] = None
|
|
45
47
|
service_tier: typing.Optional[CompletionCreateParamsStreamingServiceTier] = None
|
|
46
48
|
stop: typing.Optional[CompletionCreateParamsStreamingStop] = None
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FileAgentSchema(UncheckedBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
File-Agent relationship with human-readable ID for agent file
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
agent_id: str = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Unique identifier of the agent.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
file_id: str = pydantic.Field()
|
|
22
|
+
"""
|
|
23
|
+
Unique identifier of the file.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
source_id: str = pydantic.Field()
|
|
27
|
+
"""
|
|
28
|
+
Unique identifier of the source.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
file_name: str = pydantic.Field()
|
|
32
|
+
"""
|
|
33
|
+
Name of the file.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
is_open: typing.Optional[bool] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
True if the agent currently has the file open.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
visible_content: typing.Optional[str] = pydantic.Field(default=None)
|
|
42
|
+
"""
|
|
43
|
+
Portion of the file the agent is focused on (may be large).
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
last_accessed_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
47
|
+
"""
|
|
48
|
+
UTC timestamp of the agent's most recent access to this file.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
start_line: typing.Optional[int] = pydantic.Field(default=None)
|
|
52
|
+
"""
|
|
53
|
+
Starting line number (1-indexed) when file was opened with line range.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
end_line: typing.Optional[int] = pydantic.Field(default=None)
|
|
57
|
+
"""
|
|
58
|
+
Ending line number (exclusive) when file was opened with line range.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
id: str = pydantic.Field()
|
|
62
|
+
"""
|
|
63
|
+
Human-readable identifier for this file-agent relationship in the file
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
if IS_PYDANTIC_V2:
|
|
67
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
68
|
+
else:
|
|
69
|
+
|
|
70
|
+
class Config:
|
|
71
|
+
frozen = True
|
|
72
|
+
smart_union = True
|
|
73
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .file_processing_status import FileProcessingStatus
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FileSchema(UncheckedBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
File with human-readable ID for agent file
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
source_id: str = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
The unique identifier of the source associated with the document.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
file_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
The name of the file.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
original_file_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
The original name of the file as uploaded.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
file_path: typing.Optional[str] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
The path to the file.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
file_type: typing.Optional[str] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
The type of the file (MIME type).
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
file_size: typing.Optional[int] = pydantic.Field(default=None)
|
|
42
|
+
"""
|
|
43
|
+
The size of the file in bytes.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
file_creation_date: typing.Optional[str] = pydantic.Field(default=None)
|
|
47
|
+
"""
|
|
48
|
+
The creation date of the file.
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
file_last_modified_date: typing.Optional[str] = pydantic.Field(default=None)
|
|
52
|
+
"""
|
|
53
|
+
The last modified date of the file.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
processing_status: typing.Optional[FileProcessingStatus] = pydantic.Field(default=None)
|
|
57
|
+
"""
|
|
58
|
+
The current processing status of the file (e.g. pending, parsing, embedding, completed, error).
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
error_message: typing.Optional[str] = pydantic.Field(default=None)
|
|
62
|
+
"""
|
|
63
|
+
Optional error message if the file failed processing.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
total_chunks: typing.Optional[int] = pydantic.Field(default=None)
|
|
67
|
+
"""
|
|
68
|
+
Total number of chunks for the file.
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
chunks_embedded: typing.Optional[int] = pydantic.Field(default=None)
|
|
72
|
+
"""
|
|
73
|
+
Number of chunks that have been embedded.
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
content: typing.Optional[str] = pydantic.Field(default=None)
|
|
77
|
+
"""
|
|
78
|
+
Optional full-text content of the file; only populated on demand due to its size.
|
|
79
|
+
"""
|
|
80
|
+
|
|
81
|
+
id: str = pydantic.Field()
|
|
82
|
+
"""
|
|
83
|
+
Human-readable identifier for this file in the file
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
if IS_PYDANTIC_V2:
|
|
87
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
88
|
+
else:
|
|
89
|
+
|
|
90
|
+
class Config:
|
|
91
|
+
frozen = True
|
|
92
|
+
smart_union = True
|
|
93
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .group_schema_manager_config import GroupSchemaManagerConfig
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class GroupSchema(UncheckedBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
Group with human-readable ID for agent file
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
agent_ids: typing.List[str] = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
description: str = pydantic.Field()
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
manager_config: typing.Optional[GroupSchemaManagerConfig] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
project_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
The associated project id.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
shared_block_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
id: str = pydantic.Field()
|
|
42
|
+
"""
|
|
43
|
+
Human-readable identifier for this group in the file
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
if IS_PYDANTIC_V2:
|
|
47
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
48
|
+
else:
|
|
49
|
+
|
|
50
|
+
class Config:
|
|
51
|
+
frozen = True
|
|
52
|
+
smart_union = True
|
|
53
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .dynamic_manager import DynamicManager
|
|
6
|
+
from .round_robin_manager import RoundRobinManager
|
|
7
|
+
from .sleeptime_manager import SleeptimeManager
|
|
8
|
+
from .supervisor_manager import SupervisorManager
|
|
9
|
+
from .voice_sleeptime_manager import VoiceSleeptimeManager
|
|
10
|
+
|
|
11
|
+
GroupSchemaManagerConfig = typing.Union[
|
|
12
|
+
DynamicManager, RoundRobinManager, SleeptimeManager, SupervisorManager, VoiceSleeptimeManager
|
|
13
|
+
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ImportedAgentsResponse(UncheckedBaseModel):
|
|
11
|
+
"""
|
|
12
|
+
Response model for imported agents
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
agent_ids: typing.List[str] = pydantic.Field()
|
|
16
|
+
"""
|
|
17
|
+
List of IDs of the imported agents
|
|
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
|