letta-client 1.0.0a10__py3-none-any.whl → 1.0.0a12__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/_client.py +28 -1
- letta_client/_streaming.py +44 -8
- letta_client/_version.py +1 -1
- letta_client/resources/__init__.py +14 -0
- letta_client/resources/agents/agents.py +0 -8
- letta_client/resources/agents/blocks.py +15 -17
- letta_client/resources/agents/files.py +10 -13
- letta_client/resources/agents/folders.py +10 -13
- letta_client/resources/agents/messages.py +14 -4
- letta_client/resources/agents/tools.py +10 -13
- letta_client/resources/archives.py +10 -12
- letta_client/resources/batches/batches.py +10 -12
- letta_client/resources/batches/messages.py +11 -14
- letta_client/resources/blocks/blocks.py +19 -22
- letta_client/resources/folders/agents.py +10 -13
- letta_client/resources/folders/files.py +9 -12
- letta_client/resources/folders/folders.py +10 -12
- letta_client/resources/groups/groups.py +1 -17
- letta_client/resources/identities/blocks.py +7 -7
- letta_client/resources/identities/identities.py +11 -29
- letta_client/resources/mcp_servers/__init__.py +47 -0
- letta_client/resources/mcp_servers/mcp_servers.py +1165 -0
- letta_client/resources/mcp_servers/refresh.py +192 -0
- letta_client/resources/mcp_servers/tools.py +351 -0
- letta_client/resources/runs/runs.py +11 -13
- letta_client/resources/steps/steps.py +1 -9
- letta_client/resources/tags.py +10 -13
- letta_client/resources/tools.py +14 -16
- letta_client/types/__init__.py +13 -4
- letta_client/types/agent_create_params.py +1 -5
- letta_client/types/agents/__init__.py +2 -3
- letta_client/types/agents/file_list_response.py +14 -3
- letta_client/types/agents/folder_list_response.py +7 -3
- letta_client/types/agents/letta_streaming_response.py +70 -0
- letta_client/types/agents/tool_list_response.py +10 -0
- letta_client/types/archive_list_response.py +10 -0
- letta_client/types/batch_list_response.py +10 -0
- letta_client/types/batches/__init__.py +1 -0
- letta_client/types/batches/message_list_response.py +12 -0
- letta_client/types/{block_list_response.py → block_response.py} +5 -5
- letta_client/types/folder_list_response.py +10 -0
- letta_client/types/folders/agent_list_response.py +2 -1
- letta_client/types/folders/file_list_response.py +7 -4
- letta_client/types/group_create_params.py +1 -5
- letta_client/types/group_modify_params.py +1 -5
- letta_client/types/identities/__init__.py +0 -1
- letta_client/types/identity_create_params.py +1 -5
- letta_client/types/identity_list_response.py +10 -0
- letta_client/types/identity_upsert_params.py +1 -5
- letta_client/types/mcp_server_create_params.py +67 -0
- letta_client/types/mcp_server_create_response.py +74 -0
- letta_client/types/mcp_server_list_response.py +86 -0
- letta_client/types/mcp_server_modify_params.py +76 -0
- letta_client/types/mcp_server_modify_response.py +74 -0
- letta_client/types/mcp_server_retrieve_response.py +74 -0
- letta_client/types/mcp_servers/__init__.py +8 -0
- letta_client/types/mcp_servers/refresh_trigger_params.py +12 -0
- letta_client/types/mcp_servers/tool_list_response.py +10 -0
- letta_client/types/mcp_servers/tool_run_params.py +15 -0
- letta_client/types/mcp_servers/tool_run_response.py +43 -0
- letta_client/types/run_list_response.py +10 -0
- letta_client/types/step_list_params.py +1 -5
- letta_client/types/tag_list_response.py +2 -1
- letta_client/types/tool.py +28 -28
- letta_client/types/tool_list_response.py +10 -0
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a12.dist-info}/METADATA +1 -1
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a12.dist-info}/RECORD +69 -52
- letta_client/types/agents/block_list_response.py +0 -63
- letta_client/types/agents/block_modify_response.py +0 -63
- letta_client/types/agents/block_retrieve_response.py +0 -63
- letta_client/types/block_create_response.py +0 -63
- letta_client/types/block_modify_response.py +0 -63
- letta_client/types/block_retrieve_response.py +0 -63
- letta_client/types/identities/block_list_response.py +0 -63
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a12.dist-info}/WHEEL +0 -0
- {letta_client-1.0.0a10.dist-info → letta_client-1.0.0a12.dist-info}/licenses/LICENSE +0 -0
letta_client/resources/tags.py
CHANGED
|
@@ -9,7 +9,7 @@ import httpx
|
|
|
9
9
|
|
|
10
10
|
from ..types import tag_list_params
|
|
11
11
|
from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
12
|
-
from .._utils import maybe_transform
|
|
12
|
+
from .._utils import maybe_transform, async_maybe_transform
|
|
13
13
|
from .._compat import cached_property
|
|
14
14
|
from .._resource import SyncAPIResource, AsyncAPIResource
|
|
15
15
|
from .._response import (
|
|
@@ -18,8 +18,7 @@ from .._response import (
|
|
|
18
18
|
async_to_raw_response_wrapper,
|
|
19
19
|
async_to_streamed_response_wrapper,
|
|
20
20
|
)
|
|
21
|
-
from ..
|
|
22
|
-
from .._base_client import AsyncPaginator, make_request_options
|
|
21
|
+
from .._base_client import make_request_options
|
|
23
22
|
from ..types.tag_list_response import TagListResponse
|
|
24
23
|
|
|
25
24
|
__all__ = ["TagsResource", "AsyncTagsResource"]
|
|
@@ -61,7 +60,7 @@ class TagsResource(SyncAPIResource):
|
|
|
61
60
|
extra_query: Query | None = None,
|
|
62
61
|
extra_body: Body | None = None,
|
|
63
62
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
64
|
-
) ->
|
|
63
|
+
) -> TagListResponse:
|
|
65
64
|
"""
|
|
66
65
|
Get the list of all agent tags that have been created.
|
|
67
66
|
|
|
@@ -91,9 +90,8 @@ class TagsResource(SyncAPIResource):
|
|
|
91
90
|
|
|
92
91
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
93
92
|
"""
|
|
94
|
-
return self.
|
|
93
|
+
return self._get(
|
|
95
94
|
"/v1/tags/",
|
|
96
|
-
page=SyncArrayPage[TagListResponse],
|
|
97
95
|
options=make_request_options(
|
|
98
96
|
extra_headers=extra_headers,
|
|
99
97
|
extra_query=extra_query,
|
|
@@ -112,7 +110,7 @@ class TagsResource(SyncAPIResource):
|
|
|
112
110
|
tag_list_params.TagListParams,
|
|
113
111
|
),
|
|
114
112
|
),
|
|
115
|
-
|
|
113
|
+
cast_to=TagListResponse,
|
|
116
114
|
)
|
|
117
115
|
|
|
118
116
|
|
|
@@ -136,7 +134,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
136
134
|
"""
|
|
137
135
|
return AsyncTagsResourceWithStreamingResponse(self)
|
|
138
136
|
|
|
139
|
-
def list(
|
|
137
|
+
async def list(
|
|
140
138
|
self,
|
|
141
139
|
*,
|
|
142
140
|
after: Optional[str] | Omit = omit,
|
|
@@ -152,7 +150,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
152
150
|
extra_query: Query | None = None,
|
|
153
151
|
extra_body: Body | None = None,
|
|
154
152
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
155
|
-
) ->
|
|
153
|
+
) -> TagListResponse:
|
|
156
154
|
"""
|
|
157
155
|
Get the list of all agent tags that have been created.
|
|
158
156
|
|
|
@@ -182,15 +180,14 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
182
180
|
|
|
183
181
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
184
182
|
"""
|
|
185
|
-
return self.
|
|
183
|
+
return await self._get(
|
|
186
184
|
"/v1/tags/",
|
|
187
|
-
page=AsyncArrayPage[TagListResponse],
|
|
188
185
|
options=make_request_options(
|
|
189
186
|
extra_headers=extra_headers,
|
|
190
187
|
extra_query=extra_query,
|
|
191
188
|
extra_body=extra_body,
|
|
192
189
|
timeout=timeout,
|
|
193
|
-
query=
|
|
190
|
+
query=await async_maybe_transform(
|
|
194
191
|
{
|
|
195
192
|
"after": after,
|
|
196
193
|
"before": before,
|
|
@@ -203,7 +200,7 @@ class AsyncTagsResource(AsyncAPIResource):
|
|
|
203
200
|
tag_list_params.TagListParams,
|
|
204
201
|
),
|
|
205
202
|
),
|
|
206
|
-
|
|
203
|
+
cast_to=TagListResponse,
|
|
207
204
|
)
|
|
208
205
|
|
|
209
206
|
|
letta_client/resources/tools.py
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import typing
|
|
6
|
+
import inspect
|
|
5
7
|
from typing import Dict, Iterable, Optional
|
|
8
|
+
from textwrap import dedent
|
|
6
9
|
from typing_extensions import Literal
|
|
7
10
|
|
|
8
11
|
import httpx
|
|
12
|
+
from pydantic import BaseModel
|
|
9
13
|
|
|
10
14
|
from ..types import tool_list_params, tool_count_params, tool_create_params, tool_modify_params, tool_upsert_params
|
|
11
15
|
from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
@@ -18,17 +22,13 @@ from .._response import (
|
|
|
18
22
|
async_to_raw_response_wrapper,
|
|
19
23
|
async_to_streamed_response_wrapper,
|
|
20
24
|
)
|
|
21
|
-
from ..pagination import SyncArrayPage, AsyncArrayPage
|
|
22
25
|
from ..types.tool import Tool, BaseTool
|
|
23
|
-
from .._base_client import
|
|
26
|
+
from .._base_client import make_request_options
|
|
27
|
+
from ..types.tool_list_response import ToolListResponse
|
|
24
28
|
from ..types.tool_count_response import ToolCountResponse
|
|
25
29
|
from ..types.npm_requirement_param import NpmRequirementParam
|
|
26
30
|
from ..types.pip_requirement_param import PipRequirementParam
|
|
27
31
|
from ..types.tool_upsert_base_tools_response import ToolUpsertBaseToolsResponse
|
|
28
|
-
import typing
|
|
29
|
-
from pydantic import BaseModel
|
|
30
|
-
from textwrap import dedent
|
|
31
|
-
import inspect
|
|
32
32
|
|
|
33
33
|
__all__ = ["ToolsResource", "AsyncToolsResource"]
|
|
34
34
|
|
|
@@ -190,7 +190,7 @@ class ToolsResource(SyncAPIResource):
|
|
|
190
190
|
extra_query: Query | None = None,
|
|
191
191
|
extra_body: Body | None = None,
|
|
192
192
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
193
|
-
) ->
|
|
193
|
+
) -> ToolListResponse:
|
|
194
194
|
"""
|
|
195
195
|
Get a list of all tools available to agents.
|
|
196
196
|
|
|
@@ -230,9 +230,8 @@ class ToolsResource(SyncAPIResource):
|
|
|
230
230
|
|
|
231
231
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
232
232
|
"""
|
|
233
|
-
return self.
|
|
233
|
+
return self._get(
|
|
234
234
|
"/v1/tools/",
|
|
235
|
-
page=SyncArrayPage[Tool],
|
|
236
235
|
options=make_request_options(
|
|
237
236
|
extra_headers=extra_headers,
|
|
238
237
|
extra_query=extra_query,
|
|
@@ -256,7 +255,7 @@ class ToolsResource(SyncAPIResource):
|
|
|
256
255
|
tool_list_params.ToolListParams,
|
|
257
256
|
),
|
|
258
257
|
),
|
|
259
|
-
|
|
258
|
+
cast_to=ToolListResponse,
|
|
260
259
|
)
|
|
261
260
|
|
|
262
261
|
def delete(
|
|
@@ -986,7 +985,7 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
986
985
|
cast_to=Tool,
|
|
987
986
|
)
|
|
988
987
|
|
|
989
|
-
def list(
|
|
988
|
+
async def list(
|
|
990
989
|
self,
|
|
991
990
|
*,
|
|
992
991
|
after: Optional[str] | Omit = omit,
|
|
@@ -1007,7 +1006,7 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
1007
1006
|
extra_query: Query | None = None,
|
|
1008
1007
|
extra_body: Body | None = None,
|
|
1009
1008
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1010
|
-
) ->
|
|
1009
|
+
) -> ToolListResponse:
|
|
1011
1010
|
"""
|
|
1012
1011
|
Get a list of all tools available to agents.
|
|
1013
1012
|
|
|
@@ -1047,15 +1046,14 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
1047
1046
|
|
|
1048
1047
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
1049
1048
|
"""
|
|
1050
|
-
return self.
|
|
1049
|
+
return await self._get(
|
|
1051
1050
|
"/v1/tools/",
|
|
1052
|
-
page=AsyncArrayPage[Tool],
|
|
1053
1051
|
options=make_request_options(
|
|
1054
1052
|
extra_headers=extra_headers,
|
|
1055
1053
|
extra_query=extra_query,
|
|
1056
1054
|
extra_body=extra_body,
|
|
1057
1055
|
timeout=timeout,
|
|
1058
|
-
query=
|
|
1056
|
+
query=await async_maybe_transform(
|
|
1059
1057
|
{
|
|
1060
1058
|
"after": after,
|
|
1061
1059
|
"before": before,
|
|
@@ -1073,7 +1071,7 @@ class AsyncToolsResource(AsyncAPIResource):
|
|
|
1073
1071
|
tool_list_params.ToolListParams,
|
|
1074
1072
|
),
|
|
1075
1073
|
),
|
|
1076
|
-
|
|
1074
|
+
cast_to=ToolListResponse,
|
|
1077
1075
|
)
|
|
1078
1076
|
|
|
1079
1077
|
async def delete(
|
letta_client/types/__init__.py
CHANGED
|
@@ -16,6 +16,7 @@ from .agent_state import AgentState as AgentState
|
|
|
16
16
|
from .manager_type import ManagerType as ManagerType
|
|
17
17
|
from .identity_type import IdentityType as IdentityType
|
|
18
18
|
from .provider_type import ProviderType as ProviderType
|
|
19
|
+
from .block_response import BlockResponse as BlockResponse
|
|
19
20
|
from .init_tool_rule import InitToolRule as InitToolRule
|
|
20
21
|
from .provider_trace import ProviderTrace as ProviderTrace
|
|
21
22
|
from .child_tool_rule import ChildToolRule as ChildToolRule
|
|
@@ -37,6 +38,7 @@ from .group_list_params import GroupListParams as GroupListParams
|
|
|
37
38
|
from .identity_property import IdentityProperty as IdentityProperty
|
|
38
39
|
from .model_list_params import ModelListParams as ModelListParams
|
|
39
40
|
from .provider_category import ProviderCategory as ProviderCategory
|
|
41
|
+
from .run_list_response import RunListResponse as RunListResponse
|
|
40
42
|
from .tag_list_response import TagListResponse as TagListResponse
|
|
41
43
|
from .tool_count_params import ToolCountParams as ToolCountParams
|
|
42
44
|
from .continue_tool_rule import ContinueToolRule as ContinueToolRule
|
|
@@ -44,6 +46,7 @@ from .create_block_param import CreateBlockParam as CreateBlockParam
|
|
|
44
46
|
from .folder_list_params import FolderListParams as FolderListParams
|
|
45
47
|
from .terminal_tool_rule import TerminalToolRule as TerminalToolRule
|
|
46
48
|
from .tool_create_params import ToolCreateParams as ToolCreateParams
|
|
49
|
+
from .tool_list_response import ToolListResponse as ToolListResponse
|
|
47
50
|
from .tool_modify_params import ToolModifyParams as ToolModifyParams
|
|
48
51
|
from .tool_upsert_params import ToolUpsertParams as ToolUpsertParams
|
|
49
52
|
from .vector_db_provider import VectorDBProvider as VectorDBProvider
|
|
@@ -51,8 +54,8 @@ from .agent_create_params import AgentCreateParams as AgentCreateParams
|
|
|
51
54
|
from .agent_modify_params import AgentModifyParams as AgentModifyParams
|
|
52
55
|
from .archive_list_params import ArchiveListParams as ArchiveListParams
|
|
53
56
|
from .batch_create_params import BatchCreateParams as BatchCreateParams
|
|
57
|
+
from .batch_list_response import BatchListResponse as BatchListResponse
|
|
54
58
|
from .block_create_params import BlockCreateParams as BlockCreateParams
|
|
55
|
-
from .block_list_response import BlockListResponse as BlockListResponse
|
|
56
59
|
from .block_modify_params import BlockModifyParams as BlockModifyParams
|
|
57
60
|
from .group_create_params import GroupCreateParams as GroupCreateParams
|
|
58
61
|
from .group_modify_params import GroupModifyParams as GroupModifyParams
|
|
@@ -62,6 +65,7 @@ from .tool_return_message import ToolReturnMessage as ToolReturnMessage
|
|
|
62
65
|
from .agent_count_response import AgentCountResponse as AgentCountResponse
|
|
63
66
|
from .block_count_response import BlockCountResponse as BlockCountResponse
|
|
64
67
|
from .folder_create_params import FolderCreateParams as FolderCreateParams
|
|
68
|
+
from .folder_list_response import FolderListResponse as FolderListResponse
|
|
65
69
|
from .folder_modify_params import FolderModifyParams as FolderModifyParams
|
|
66
70
|
from .group_count_response import GroupCountResponse as GroupCountResponse
|
|
67
71
|
from .identity_list_params import IdentityListParams as IdentityListParams
|
|
@@ -70,9 +74,8 @@ from .message_create_param import MessageCreateParam as MessageCreateParam
|
|
|
70
74
|
from .text_response_format import TextResponseFormat as TextResponseFormat
|
|
71
75
|
from .agent_retrieve_params import AgentRetrieveParams as AgentRetrieveParams
|
|
72
76
|
from .archive_create_params import ArchiveCreateParams as ArchiveCreateParams
|
|
77
|
+
from .archive_list_response import ArchiveListResponse as ArchiveListResponse
|
|
73
78
|
from .archive_modify_params import ArchiveModifyParams as ArchiveModifyParams
|
|
74
|
-
from .block_create_response import BlockCreateResponse as BlockCreateResponse
|
|
75
|
-
from .block_modify_response import BlockModifyResponse as BlockModifyResponse
|
|
76
79
|
from .child_tool_rule_param import ChildToolRuleParam as ChildToolRuleParam
|
|
77
80
|
from .conditional_tool_rule import ConditionalToolRule as ConditionalToolRule
|
|
78
81
|
from .dynamic_manager_param import DynamicManagerParam as DynamicManagerParam
|
|
@@ -81,28 +84,34 @@ from .npm_requirement_param import NpmRequirementParam as NpmRequirementParam
|
|
|
81
84
|
from .pip_requirement_param import PipRequirementParam as PipRequirementParam
|
|
82
85
|
from .embedding_config_param import EmbeddingConfigParam as EmbeddingConfigParam
|
|
83
86
|
from .identity_create_params import IdentityCreateParams as IdentityCreateParams
|
|
87
|
+
from .identity_list_response import IdentityListResponse as IdentityListResponse
|
|
84
88
|
from .identity_modify_params import IdentityModifyParams as IdentityModifyParams
|
|
85
89
|
from .identity_upsert_params import IdentityUpsertParams as IdentityUpsertParams
|
|
86
90
|
from .parent_tool_rule_param import ParentToolRuleParam as ParentToolRuleParam
|
|
87
|
-
from .block_retrieve_response import BlockRetrieveResponse as BlockRetrieveResponse
|
|
88
91
|
from .identity_count_response import IdentityCountResponse as IdentityCountResponse
|
|
89
92
|
from .identity_property_param import IdentityPropertyParam as IdentityPropertyParam
|
|
90
93
|
from .sleeptime_manager_param import SleeptimeManagerParam as SleeptimeManagerParam
|
|
91
94
|
from .agent_export_file_params import AgentExportFileParams as AgentExportFileParams
|
|
92
95
|
from .agent_import_file_params import AgentImportFileParams as AgentImportFileParams
|
|
93
96
|
from .continue_tool_rule_param import ContinueToolRuleParam as ContinueToolRuleParam
|
|
97
|
+
from .mcp_server_create_params import McpServerCreateParams as McpServerCreateParams
|
|
98
|
+
from .mcp_server_list_response import McpServerListResponse as McpServerListResponse
|
|
99
|
+
from .mcp_server_modify_params import McpServerModifyParams as McpServerModifyParams
|
|
94
100
|
from .supervisor_manager_param import SupervisorManagerParam as SupervisorManagerParam
|
|
95
101
|
from .terminal_tool_rule_param import TerminalToolRuleParam as TerminalToolRuleParam
|
|
96
102
|
from .round_robin_manager_param import RoundRobinManagerParam as RoundRobinManagerParam
|
|
97
103
|
from .agent_environment_variable import AgentEnvironmentVariable as AgentEnvironmentVariable
|
|
98
104
|
from .agent_export_file_response import AgentExportFileResponse as AgentExportFileResponse
|
|
99
105
|
from .agent_import_file_response import AgentImportFileResponse as AgentImportFileResponse
|
|
106
|
+
from .mcp_server_create_response import McpServerCreateResponse as McpServerCreateResponse
|
|
107
|
+
from .mcp_server_modify_response import McpServerModifyResponse as McpServerModifyResponse
|
|
100
108
|
from .text_response_format_param import TextResponseFormatParam as TextResponseFormatParam
|
|
101
109
|
from .conditional_tool_rule_param import ConditionalToolRuleParam as ConditionalToolRuleParam
|
|
102
110
|
from .json_object_response_format import JsonObjectResponseFormat as JsonObjectResponseFormat
|
|
103
111
|
from .json_schema_response_format import JsonSchemaResponseFormat as JsonSchemaResponseFormat
|
|
104
112
|
from .requires_approval_tool_rule import RequiresApprovalToolRule as RequiresApprovalToolRule
|
|
105
113
|
from .max_count_per_step_tool_rule import MaxCountPerStepToolRule as MaxCountPerStepToolRule
|
|
114
|
+
from .mcp_server_retrieve_response import McpServerRetrieveResponse as McpServerRetrieveResponse
|
|
106
115
|
from .voice_sleeptime_manager_param import VoiceSleeptimeManagerParam as VoiceSleeptimeManagerParam
|
|
107
116
|
from .required_before_exit_tool_rule import RequiredBeforeExitToolRule as RequiredBeforeExitToolRule
|
|
108
117
|
from .tool_upsert_base_tools_response import ToolUpsertBaseToolsResponse as ToolUpsertBaseToolsResponse
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Dict, Union, Iterable, Optional
|
|
6
|
-
from typing_extensions import
|
|
6
|
+
from typing_extensions import TypeAlias, TypedDict
|
|
7
7
|
|
|
8
8
|
from .._types import SequenceNotStr
|
|
9
|
-
from .._utils import PropertyInfo
|
|
10
9
|
from .agent_type import AgentType
|
|
11
10
|
from .llm_config_param import LlmConfigParam
|
|
12
11
|
from .create_block_param import CreateBlockParam
|
|
@@ -199,9 +198,6 @@ class AgentCreateParams(TypedDict, total=False):
|
|
|
199
198
|
tools: Optional[SequenceNotStr[str]]
|
|
200
199
|
"""The tools used by the agent."""
|
|
201
200
|
|
|
202
|
-
x_project: Annotated[str, PropertyInfo(alias="X-Project")]
|
|
203
|
-
"""The project slug to associate with the agent (cloud only)."""
|
|
204
|
-
|
|
205
201
|
|
|
206
202
|
ResponseFormat: TypeAlias = Union[TextResponseFormatParam, JsonSchemaResponseFormatParam, JsonObjectResponseFormatParam]
|
|
207
203
|
|
|
@@ -31,7 +31,7 @@ from .file_list_response import FileListResponse as FileListResponse
|
|
|
31
31
|
from .file_open_response import FileOpenResponse as FileOpenResponse
|
|
32
32
|
from .folder_list_params import FolderListParams as FolderListParams
|
|
33
33
|
from .text_content_param import TextContentParam as TextContentParam
|
|
34
|
-
from .
|
|
34
|
+
from .tool_list_response import ToolListResponse as ToolListResponse
|
|
35
35
|
from .block_modify_params import BlockModifyParams as BlockModifyParams
|
|
36
36
|
from .image_content_param import ImageContentParam as ImageContentParam
|
|
37
37
|
from .letta_message_union import LettaMessageUnion as LettaMessageUnion
|
|
@@ -41,11 +41,9 @@ from .tool_return_content import ToolReturnContent as ToolReturnContent
|
|
|
41
41
|
from .folder_list_response import FolderListResponse as FolderListResponse
|
|
42
42
|
from .message_reset_params import MessageResetParams as MessageResetParams
|
|
43
43
|
from .approval_create_param import ApprovalCreateParam as ApprovalCreateParam
|
|
44
|
-
from .block_modify_response import BlockModifyResponse as BlockModifyResponse
|
|
45
44
|
from .message_cancel_params import MessageCancelParams as MessageCancelParams
|
|
46
45
|
from .message_modify_params import MessageModifyParams as MessageModifyParams
|
|
47
46
|
from .message_stream_params import MessageStreamParams as MessageStreamParams
|
|
48
|
-
from .block_retrieve_response import BlockRetrieveResponse as BlockRetrieveResponse
|
|
49
47
|
from .file_close_all_response import FileCloseAllResponse as FileCloseAllResponse
|
|
50
48
|
from .message_cancel_response import MessageCancelResponse as MessageCancelResponse
|
|
51
49
|
from .message_modify_response import MessageModifyResponse as MessageModifyResponse
|
|
@@ -53,6 +51,7 @@ from .reasoning_content_param import ReasoningContentParam as ReasoningContentPa
|
|
|
53
51
|
from .tool_call_content_param import ToolCallContentParam as ToolCallContentParam
|
|
54
52
|
from .approval_request_message import ApprovalRequestMessage as ApprovalRequestMessage
|
|
55
53
|
from .hidden_reasoning_message import HiddenReasoningMessage as HiddenReasoningMessage
|
|
54
|
+
from .letta_streaming_response import LettaStreamingResponse as LettaStreamingResponse
|
|
56
55
|
from .approval_response_message import ApprovalResponseMessage as ApprovalResponseMessage
|
|
57
56
|
from .message_send_async_params import MessageSendAsyncParams as MessageSendAsyncParams
|
|
58
57
|
from .omitted_reasoning_content import OmittedReasoningContent as OmittedReasoningContent
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import Optional
|
|
3
|
+
from typing import List, Optional
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
|
|
6
6
|
from ..._models import BaseModel
|
|
7
7
|
|
|
8
|
-
__all__ = ["FileListResponse"]
|
|
8
|
+
__all__ = ["FileListResponse", "File"]
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class File(BaseModel):
|
|
12
12
|
id: str
|
|
13
13
|
"""Unique identifier of the file-agent relationship"""
|
|
14
14
|
|
|
@@ -38,3 +38,14 @@ class FileListResponse(BaseModel):
|
|
|
38
38
|
|
|
39
39
|
visible_content: Optional[str] = None
|
|
40
40
|
"""Portion of the file visible to the agent if open"""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class FileListResponse(BaseModel):
|
|
44
|
+
files: List[File]
|
|
45
|
+
"""List of file attachments for the agent"""
|
|
46
|
+
|
|
47
|
+
has_more: bool
|
|
48
|
+
"""Whether more results exist after this page"""
|
|
49
|
+
|
|
50
|
+
next_cursor: Optional[str] = None
|
|
51
|
+
"""Cursor for fetching the next page (file-agent relationship ID)"""
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import Dict, Optional
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
4
|
from datetime import datetime
|
|
5
|
+
from typing_extensions import TypeAlias
|
|
5
6
|
|
|
6
7
|
from ..._models import BaseModel
|
|
7
8
|
from ..embedding_config import EmbeddingConfig
|
|
8
9
|
from ..vector_db_provider import VectorDBProvider
|
|
9
10
|
|
|
10
|
-
__all__ = ["FolderListResponse"]
|
|
11
|
+
__all__ = ["FolderListResponse", "FolderListResponseItem"]
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
class
|
|
14
|
+
class FolderListResponseItem(BaseModel):
|
|
14
15
|
embedding_config: EmbeddingConfig
|
|
15
16
|
"""The embedding configuration used by the source."""
|
|
16
17
|
|
|
@@ -43,3 +44,6 @@ class FolderListResponse(BaseModel):
|
|
|
43
44
|
|
|
44
45
|
vector_db_provider: Optional[VectorDBProvider] = None
|
|
45
46
|
"""The vector database provider used for this source's passages"""
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
FolderListResponse: TypeAlias = List[FolderListResponseItem]
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union, Optional
|
|
4
|
+
from typing_extensions import Literal, Annotated, TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..._utils import PropertyInfo
|
|
7
|
+
from ..._models import BaseModel
|
|
8
|
+
from .user_message import UserMessage
|
|
9
|
+
from .system_message import SystemMessage
|
|
10
|
+
from ..stop_reason_type import StopReasonType
|
|
11
|
+
from .assistant_message import AssistantMessage
|
|
12
|
+
from .reasoning_message import ReasoningMessage
|
|
13
|
+
from .tool_call_message import ToolCallMessage
|
|
14
|
+
from ..tool_return_message import ToolReturnMessage
|
|
15
|
+
from .approval_request_message import ApprovalRequestMessage
|
|
16
|
+
from .hidden_reasoning_message import HiddenReasoningMessage
|
|
17
|
+
from .approval_response_message import ApprovalResponseMessage
|
|
18
|
+
|
|
19
|
+
__all__ = ["LettaStreamingResponse", "LettaPing", "LettaStopReason", "LettaUsageStatistics"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class LettaPing(BaseModel):
|
|
23
|
+
message_type: Literal["ping"]
|
|
24
|
+
"""The type of the message."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class LettaStopReason(BaseModel):
|
|
28
|
+
stop_reason: StopReasonType
|
|
29
|
+
"""The reason why execution stopped."""
|
|
30
|
+
|
|
31
|
+
message_type: Optional[Literal["stop_reason"]] = None
|
|
32
|
+
"""The type of the message."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class LettaUsageStatistics(BaseModel):
|
|
36
|
+
completion_tokens: Optional[int] = None
|
|
37
|
+
"""The number of tokens generated by the agent."""
|
|
38
|
+
|
|
39
|
+
message_type: Optional[Literal["usage_statistics"]] = None
|
|
40
|
+
|
|
41
|
+
prompt_tokens: Optional[int] = None
|
|
42
|
+
"""The number of tokens in the prompt."""
|
|
43
|
+
|
|
44
|
+
run_ids: Optional[List[str]] = None
|
|
45
|
+
"""The background task run IDs associated with the agent interaction"""
|
|
46
|
+
|
|
47
|
+
step_count: Optional[int] = None
|
|
48
|
+
"""The number of steps taken by the agent."""
|
|
49
|
+
|
|
50
|
+
total_tokens: Optional[int] = None
|
|
51
|
+
"""The total number of tokens processed by the agent."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
LettaStreamingResponse: TypeAlias = Annotated[
|
|
55
|
+
Union[
|
|
56
|
+
SystemMessage,
|
|
57
|
+
UserMessage,
|
|
58
|
+
ReasoningMessage,
|
|
59
|
+
HiddenReasoningMessage,
|
|
60
|
+
ToolCallMessage,
|
|
61
|
+
ToolReturnMessage,
|
|
62
|
+
AssistantMessage,
|
|
63
|
+
ApprovalRequestMessage,
|
|
64
|
+
ApprovalResponseMessage,
|
|
65
|
+
LettaPing,
|
|
66
|
+
LettaStopReason,
|
|
67
|
+
LettaUsageStatistics,
|
|
68
|
+
],
|
|
69
|
+
PropertyInfo(discriminator="message_type"),
|
|
70
|
+
]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from ..tool import Tool
|
|
7
|
+
|
|
8
|
+
__all__ = ["ToolListResponse"]
|
|
9
|
+
|
|
10
|
+
ToolListResponse: TypeAlias = List[Tool]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .archive import Archive
|
|
7
|
+
|
|
8
|
+
__all__ = ["ArchiveListResponse"]
|
|
9
|
+
|
|
10
|
+
ArchiveListResponse: TypeAlias = List[Archive]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .batch_job import BatchJob
|
|
7
|
+
|
|
8
|
+
__all__ = ["BatchListResponse"]
|
|
9
|
+
|
|
10
|
+
BatchListResponse: TypeAlias = List[BatchJob]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from ..._models import BaseModel
|
|
6
|
+
from ..agents.message import Message
|
|
7
|
+
|
|
8
|
+
__all__ = ["MessageListResponse"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class MessageListResponse(BaseModel):
|
|
12
|
+
messages: List[Message]
|
|
@@ -4,16 +4,16 @@ from typing import Dict, Optional
|
|
|
4
4
|
|
|
5
5
|
from .._models import BaseModel
|
|
6
6
|
|
|
7
|
-
__all__ = ["
|
|
7
|
+
__all__ = ["BlockResponse"]
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class BlockResponse(BaseModel):
|
|
11
|
+
id: str
|
|
12
|
+
"""The id of the block."""
|
|
13
|
+
|
|
11
14
|
value: str
|
|
12
15
|
"""Value of the block."""
|
|
13
16
|
|
|
14
|
-
id: Optional[str] = None
|
|
15
|
-
"""The human-friendly ID of the Block"""
|
|
16
|
-
|
|
17
17
|
base_template_id: Optional[str] = None
|
|
18
18
|
"""(Deprecated) The base template id of the block."""
|
|
19
19
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
from typing_extensions import TypeAlias
|
|
5
|
+
|
|
6
|
+
from .folder import Folder
|
|
7
|
+
|
|
8
|
+
__all__ = ["FolderListResponse"]
|
|
9
|
+
|
|
10
|
+
FolderListResponse: TypeAlias = List[Folder]
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
from typing import List
|
|
3
4
|
from typing_extensions import TypeAlias
|
|
4
5
|
|
|
5
6
|
__all__ = ["AgentListResponse"]
|
|
6
7
|
|
|
7
|
-
AgentListResponse: TypeAlias = str
|
|
8
|
+
AgentListResponse: TypeAlias = List[str]
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing import Optional
|
|
3
|
+
from typing import List, Optional
|
|
4
4
|
from datetime import datetime
|
|
5
|
-
from typing_extensions import Literal
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
6
|
|
|
7
7
|
from ..._models import BaseModel
|
|
8
8
|
|
|
9
|
-
__all__ = ["FileListResponse"]
|
|
9
|
+
__all__ = ["FileListResponse", "FileListResponseItem"]
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class FileListResponseItem(BaseModel):
|
|
13
13
|
source_id: str
|
|
14
14
|
"""The unique identifier of the source associated with the document."""
|
|
15
15
|
|
|
@@ -63,3 +63,6 @@ class FileListResponse(BaseModel):
|
|
|
63
63
|
|
|
64
64
|
updated_at: Optional[datetime] = None
|
|
65
65
|
"""The update date of the file."""
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
FileListResponse: TypeAlias = List[FileListResponseItem]
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Union, Optional
|
|
6
|
-
from typing_extensions import Required,
|
|
6
|
+
from typing_extensions import Required, TypeAlias, TypedDict
|
|
7
7
|
|
|
8
8
|
from .._types import SequenceNotStr
|
|
9
|
-
from .._utils import PropertyInfo
|
|
10
9
|
from .dynamic_manager_param import DynamicManagerParam
|
|
11
10
|
from .sleeptime_manager_param import SleeptimeManagerParam
|
|
12
11
|
from .supervisor_manager_param import SupervisorManagerParam
|
|
@@ -31,9 +30,6 @@ class GroupCreateParams(TypedDict, total=False):
|
|
|
31
30
|
|
|
32
31
|
shared_block_ids: SequenceNotStr[str]
|
|
33
32
|
|
|
34
|
-
x_project: Annotated[str, PropertyInfo(alias="X-Project")]
|
|
35
|
-
"""The project slug to associate with the group (cloud only)."""
|
|
36
|
-
|
|
37
33
|
|
|
38
34
|
ManagerConfig: TypeAlias = Union[
|
|
39
35
|
RoundRobinManagerParam,
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Union, Optional
|
|
6
|
-
from typing_extensions import Literal, Required,
|
|
6
|
+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
|
|
7
7
|
|
|
8
8
|
from .._types import SequenceNotStr
|
|
9
|
-
from .._utils import PropertyInfo
|
|
10
9
|
|
|
11
10
|
__all__ = [
|
|
12
11
|
"GroupModifyParams",
|
|
@@ -31,9 +30,6 @@ class GroupModifyParams(TypedDict, total=False):
|
|
|
31
30
|
|
|
32
31
|
shared_block_ids: Optional[SequenceNotStr[str]]
|
|
33
32
|
|
|
34
|
-
x_project: Annotated[str, PropertyInfo(alias="X-Project")]
|
|
35
|
-
"""The project slug to associate with the group (cloud only)."""
|
|
36
|
-
|
|
37
33
|
|
|
38
34
|
class ManagerConfigRoundRobinManagerUpdate(TypedDict, total=False):
|
|
39
35
|
manager_type: Literal["round_robin"]
|
|
@@ -4,5 +4,4 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
from .agent_list_params import AgentListParams as AgentListParams
|
|
6
6
|
from .block_list_params import BlockListParams as BlockListParams
|
|
7
|
-
from .block_list_response import BlockListResponse as BlockListResponse
|
|
8
7
|
from .property_upsert_params import PropertyUpsertParams as PropertyUpsertParams
|