letta-client 0.1.319__py3-none-any.whl → 0.1.321__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 +51 -9
- letta_client/agents/__init__.py +6 -2
- letta_client/agents/client.py +50 -213
- letta_client/agents/files/client.py +51 -6
- letta_client/agents/files/raw_client.py +94 -9
- letta_client/agents/messages/__init__.py +2 -2
- letta_client/agents/messages/client.py +104 -24
- letta_client/agents/messages/raw_client.py +109 -17
- letta_client/agents/messages/types/__init__.py +2 -2
- letta_client/agents/messages/types/{messages_preview_raw_payload_request.py → messages_preview_request.py} +1 -1
- letta_client/agents/raw_client.py +50 -253
- letta_client/agents/types/__init__.py +4 -0
- letta_client/agents/types/agents_list_request_order.py +5 -0
- letta_client/agents/types/agents_list_request_order_by.py +5 -0
- letta_client/archives/__init__.py +7 -0
- letta_client/archives/client.py +362 -0
- letta_client/archives/raw_client.py +448 -0
- letta_client/archives/types/__init__.py +7 -0
- letta_client/archives/types/list_archives_request_order.py +5 -0
- letta_client/base_client.py +3 -6
- letta_client/batches/__init__.py +5 -0
- letta_client/batches/client.py +68 -8
- letta_client/batches/messages/__init__.py +7 -0
- letta_client/{messages → batches/messages}/client.py +50 -43
- letta_client/{messages → batches/messages}/raw_client.py +52 -45
- letta_client/batches/messages/types/__init__.py +7 -0
- letta_client/batches/messages/types/messages_list_request_order.py +5 -0
- letta_client/batches/raw_client.py +71 -6
- letta_client/batches/types/__init__.py +7 -0
- letta_client/batches/types/batches_list_request_order.py +5 -0
- letta_client/blocks/__init__.py +3 -1
- letta_client/blocks/agents/__init__.py +3 -0
- letta_client/blocks/agents/client.py +57 -2
- letta_client/blocks/agents/raw_client.py +51 -0
- letta_client/blocks/agents/types/__init__.py +7 -0
- letta_client/blocks/agents/types/agents_list_request_order.py +5 -0
- letta_client/blocks/client.py +25 -4
- letta_client/blocks/raw_client.py +25 -4
- letta_client/blocks/types/__init__.py +7 -0
- letta_client/blocks/types/blocks_list_request_order.py +5 -0
- letta_client/core/client_wrapper.py +2 -2
- letta_client/errors/__init__.py +9 -1
- letta_client/errors/internal_server_error.py +10 -0
- letta_client/folders/__init__.py +14 -2
- letta_client/folders/agents/__init__.py +7 -0
- letta_client/folders/agents/client.py +176 -0
- letta_client/folders/agents/raw_client.py +182 -0
- letta_client/folders/agents/types/__init__.py +7 -0
- letta_client/folders/agents/types/agents_list_request_order.py +5 -0
- letta_client/folders/client.py +96 -86
- letta_client/folders/files/__init__.py +3 -0
- letta_client/folders/files/client.py +49 -10
- letta_client/folders/files/raw_client.py +41 -10
- letta_client/folders/files/types/__init__.py +7 -0
- letta_client/folders/files/types/files_list_request_order.py +5 -0
- letta_client/folders/passages/__init__.py +3 -0
- letta_client/folders/passages/client.py +43 -14
- letta_client/folders/passages/raw_client.py +35 -14
- letta_client/folders/passages/types/__init__.py +7 -0
- letta_client/folders/passages/types/passages_list_request_order.py +5 -0
- letta_client/folders/raw_client.py +83 -104
- letta_client/folders/types/__init__.py +7 -0
- letta_client/folders/types/folders_list_request_order.py +5 -0
- letta_client/groups/__init__.py +4 -2
- letta_client/groups/client.py +27 -6
- letta_client/groups/messages/__init__.py +2 -2
- letta_client/groups/messages/client.py +39 -18
- letta_client/groups/messages/raw_client.py +35 -14
- letta_client/groups/messages/types/__init__.py +2 -1
- letta_client/groups/messages/types/messages_list_request_order.py +5 -0
- letta_client/groups/raw_client.py +27 -6
- letta_client/groups/types/__init__.py +2 -1
- letta_client/groups/types/groups_list_request_order.py +5 -0
- letta_client/identities/__init__.py +12 -2
- letta_client/identities/agents/__init__.py +7 -0
- letta_client/identities/agents/client.py +177 -0
- letta_client/identities/agents/raw_client.py +183 -0
- letta_client/identities/agents/types/__init__.py +7 -0
- letta_client/identities/agents/types/agents_list_request_order.py +5 -0
- letta_client/identities/blocks/__init__.py +7 -0
- letta_client/identities/blocks/client.py +177 -0
- letta_client/identities/blocks/raw_client.py +183 -0
- letta_client/identities/blocks/types/__init__.py +7 -0
- letta_client/identities/blocks/types/blocks_list_request_order.py +5 -0
- letta_client/identities/client.py +37 -0
- letta_client/identities/raw_client.py +27 -0
- letta_client/identities/types/__init__.py +7 -0
- letta_client/identities/types/identities_list_request_order.py +5 -0
- letta_client/jobs/client.py +10 -2
- letta_client/jobs/raw_client.py +10 -2
- letta_client/models/__init__.py +3 -0
- letta_client/models/client.py +3 -0
- letta_client/{embedding_models → models/embeddings}/client.py +14 -14
- letta_client/{embedding_models → models/embeddings}/raw_client.py +10 -10
- letta_client/providers/__init__.py +3 -0
- letta_client/providers/client.py +151 -82
- letta_client/providers/raw_client.py +165 -72
- letta_client/providers/types/__init__.py +7 -0
- letta_client/providers/types/providers_list_request_order.py +5 -0
- letta_client/runs/__init__.py +2 -1
- letta_client/runs/client.py +39 -8
- letta_client/runs/messages/__init__.py +3 -0
- letta_client/runs/messages/client.py +15 -49
- letta_client/runs/messages/raw_client.py +13 -49
- letta_client/runs/messages/types/__init__.py +7 -0
- letta_client/runs/messages/types/messages_list_request_order.py +5 -0
- letta_client/runs/raw_client.py +39 -8
- letta_client/steps/__init__.py +13 -3
- letta_client/steps/client.py +32 -83
- letta_client/steps/feedback/client.py +21 -6
- letta_client/steps/feedback/raw_client.py +29 -6
- letta_client/steps/messages/__init__.py +7 -0
- letta_client/steps/messages/client.py +177 -0
- letta_client/steps/messages/raw_client.py +183 -0
- letta_client/steps/messages/types/__init__.py +8 -0
- letta_client/steps/messages/types/messages_list_request_order.py +5 -0
- letta_client/steps/messages/types/messages_list_response_item.py +25 -0
- letta_client/steps/metrics/client.py +110 -0
- letta_client/steps/metrics/raw_client.py +122 -0
- letta_client/steps/raw_client.py +17 -107
- letta_client/steps/trace/__init__.py +4 -0
- letta_client/steps/trace/client.py +110 -0
- letta_client/steps/trace/raw_client.py +122 -0
- letta_client/steps/types/__init__.py +2 -1
- letta_client/steps/types/steps_list_request_order.py +5 -0
- letta_client/tags/__init__.py +3 -0
- letta_client/tags/client.py +57 -4
- letta_client/tags/raw_client.py +49 -2
- letta_client/tags/types/__init__.py +7 -0
- letta_client/tags/types/tags_list_request_order.py +5 -0
- letta_client/telemetry/client.py +8 -0
- letta_client/telemetry/raw_client.py +8 -0
- letta_client/templates/__init__.py +64 -0
- letta_client/templates/agents/__init__.py +58 -0
- letta_client/templates/agents/types/__init__.py +66 -0
- letta_client/templates/agents/types/agents_create_response.py +6 -0
- letta_client/templates/agents/types/agents_create_response_group.py +52 -0
- letta_client/templates/agents/types/agents_create_response_group_base_template_id.py +12 -0
- letta_client/templates/agents/types/agents_create_response_group_base_template_id_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_deployment_id.py +12 -0
- letta_client/templates/agents/types/agents_create_response_group_deployment_id_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_hidden.py +12 -0
- letta_client/templates/agents/types/agents_create_response_group_hidden_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_last_processed_message_id.py +14 -0
- letta_client/templates/agents/types/agents_create_response_group_last_processed_message_id_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_manager_agent_id.py +12 -0
- letta_client/templates/agents/types/agents_create_response_group_manager_agent_id_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_manager_type.py +7 -0
- letta_client/templates/agents/types/agents_create_response_group_max_message_buffer_length.py +14 -0
- letta_client/templates/agents/types/agents_create_response_group_max_message_buffer_length_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_max_turns.py +12 -0
- letta_client/templates/agents/types/agents_create_response_group_max_turns_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_min_message_buffer_length.py +14 -0
- letta_client/templates/agents/types/agents_create_response_group_min_message_buffer_length_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_project_id.py +12 -0
- letta_client/templates/agents/types/agents_create_response_group_project_id_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_shared_block_ids.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_sleeptime_agent_frequency.py +14 -0
- letta_client/templates/agents/types/agents_create_response_group_sleeptime_agent_frequency_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_template_id.py +12 -0
- letta_client/templates/agents/types/agents_create_response_group_template_id_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_termination_token.py +12 -0
- letta_client/templates/agents/types/agents_create_response_group_termination_token_item.py +5 -0
- letta_client/templates/agents/types/agents_create_response_group_turns_counter.py +12 -0
- letta_client/templates/agents/types/agents_create_response_group_turns_counter_item.py +5 -0
- letta_client/templates/client.py +260 -0
- letta_client/templates/raw_client.py +395 -0
- letta_client/templates/types/__init__.py +8 -0
- letta_client/templates/types/templates_get_template_snapshot_response.py +4 -0
- letta_client/templates/types/templates_get_template_snapshot_response_blocks_item.py +1 -0
- letta_client/templates/types/templates_get_template_snapshot_response_relationships_item.py +23 -0
- letta_client/templates/types/templates_migrate_deployment_response.py +21 -0
- letta_client/templates/types/templates_set_current_template_from_snapshot_response.py +21 -0
- letta_client/tools/__init__.py +2 -0
- letta_client/tools/client.py +47 -20
- letta_client/tools/raw_client.py +43 -26
- letta_client/tools/types/__init__.py +2 -0
- letta_client/tools/types/tools_list_request_order.py +5 -0
- letta_client/types/__init__.py +10 -2
- letta_client/types/agent_state.py +5 -0
- letta_client/types/archive.py +77 -0
- letta_client/types/batch_job.py +16 -0
- letta_client/types/{body_export_agent_serialized.py → body_export_agent.py} +1 -1
- letta_client/types/child_tool_rule.py +1 -1
- letta_client/types/conditional_tool_rule.py +1 -1
- letta_client/types/continue_tool_rule.py +1 -1
- letta_client/types/deployment_entity.py +2 -0
- letta_client/types/init_tool_rule.py +1 -1
- letta_client/types/internal_server_error_body.py +20 -0
- letta_client/types/internal_template_agent_create.py +5 -0
- letta_client/types/job.py +16 -0
- letta_client/types/letta_schemas_agent_file_agent_schema.py +5 -0
- letta_client/types/max_count_per_step_tool_rule.py +1 -1
- letta_client/types/memory.py +7 -1
- letta_client/types/memory_agent_type.py +7 -0
- letta_client/types/parent_tool_rule.py +1 -1
- letta_client/types/required_before_exit_tool_rule.py +1 -1
- letta_client/types/requires_approval_tool_rule.py +1 -1
- letta_client/types/run.py +16 -0
- letta_client/types/source.py +6 -0
- letta_client/types/step.py +1 -1
- letta_client/types/stop_reason_type.py +1 -0
- letta_client/types/terminal_tool_rule.py +1 -1
- letta_client/types/vector_db_provider.py +5 -0
- letta_client/voice/client.py +2 -8
- letta_client/voice/raw_client.py +0 -8
- {letta_client-0.1.319.dist-info → letta_client-0.1.321.dist-info}/METADATA +9 -9
- {letta_client-0.1.319.dist-info → letta_client-0.1.321.dist-info}/RECORD +211 -114
- /letta_client/{embedding_models → models/embeddings}/__init__.py +0 -0
- /letta_client/{messages → steps/metrics}/__init__.py +0 -0
- {letta_client-0.1.319.dist-info → letta_client-0.1.321.dist-info}/WHEEL +0 -0
|
@@ -5,8 +5,8 @@ import typing
|
|
|
5
5
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
6
|
from ...core.request_options import RequestOptions
|
|
7
7
|
from ...types.letta_message_union import LettaMessageUnion
|
|
8
|
-
from ...types.message_role import MessageRole
|
|
9
8
|
from .raw_client import AsyncRawMessagesClient, RawMessagesClient
|
|
9
|
+
from .types.messages_list_request_order import MessagesListRequestOrder
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class MessagesClient:
|
|
@@ -31,44 +31,27 @@ class MessagesClient:
|
|
|
31
31
|
before: typing.Optional[str] = None,
|
|
32
32
|
after: typing.Optional[str] = None,
|
|
33
33
|
limit: typing.Optional[int] = None,
|
|
34
|
-
order: typing.Optional[
|
|
35
|
-
role: typing.Optional[MessageRole] = None,
|
|
34
|
+
order: typing.Optional[MessagesListRequestOrder] = None,
|
|
36
35
|
request_options: typing.Optional[RequestOptions] = None,
|
|
37
36
|
) -> typing.List[LettaMessageUnion]:
|
|
38
37
|
"""
|
|
39
|
-
Get messages associated with a run
|
|
40
|
-
|
|
41
|
-
Args:
|
|
42
|
-
run_id: ID of the run
|
|
43
|
-
before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
|
|
44
|
-
after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
|
|
45
|
-
limit: Maximum number of messages to return
|
|
46
|
-
order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
|
|
47
|
-
role: Filter by role (user/assistant/system/tool)
|
|
48
|
-
return_message_object: Whether to return Message objects or LettaMessage objects
|
|
49
|
-
user_id: ID of the user making the request
|
|
50
|
-
|
|
51
|
-
Returns:
|
|
52
|
-
A list of messages associated with the run. Default is List[LettaMessage].
|
|
38
|
+
Get response messages associated with a run.
|
|
53
39
|
|
|
54
40
|
Parameters
|
|
55
41
|
----------
|
|
56
42
|
run_id : str
|
|
57
43
|
|
|
58
44
|
before : typing.Optional[str]
|
|
59
|
-
|
|
45
|
+
Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
|
|
60
46
|
|
|
61
47
|
after : typing.Optional[str]
|
|
62
|
-
|
|
48
|
+
Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
|
|
63
49
|
|
|
64
50
|
limit : typing.Optional[int]
|
|
65
51
|
Maximum number of messages to return
|
|
66
52
|
|
|
67
|
-
order : typing.Optional[
|
|
68
|
-
Sort order
|
|
69
|
-
|
|
70
|
-
role : typing.Optional[MessageRole]
|
|
71
|
-
Filter by role
|
|
53
|
+
order : typing.Optional[MessagesListRequestOrder]
|
|
54
|
+
Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
|
|
72
55
|
|
|
73
56
|
request_options : typing.Optional[RequestOptions]
|
|
74
57
|
Request-specific configuration.
|
|
@@ -91,7 +74,7 @@ class MessagesClient:
|
|
|
91
74
|
)
|
|
92
75
|
"""
|
|
93
76
|
_response = self._raw_client.list(
|
|
94
|
-
run_id, before=before, after=after, limit=limit, order=order,
|
|
77
|
+
run_id, before=before, after=after, limit=limit, order=order, request_options=request_options
|
|
95
78
|
)
|
|
96
79
|
return _response.data
|
|
97
80
|
|
|
@@ -118,44 +101,27 @@ class AsyncMessagesClient:
|
|
|
118
101
|
before: typing.Optional[str] = None,
|
|
119
102
|
after: typing.Optional[str] = None,
|
|
120
103
|
limit: typing.Optional[int] = None,
|
|
121
|
-
order: typing.Optional[
|
|
122
|
-
role: typing.Optional[MessageRole] = None,
|
|
104
|
+
order: typing.Optional[MessagesListRequestOrder] = None,
|
|
123
105
|
request_options: typing.Optional[RequestOptions] = None,
|
|
124
106
|
) -> typing.List[LettaMessageUnion]:
|
|
125
107
|
"""
|
|
126
|
-
Get messages associated with a run
|
|
127
|
-
|
|
128
|
-
Args:
|
|
129
|
-
run_id: ID of the run
|
|
130
|
-
before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
|
|
131
|
-
after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
|
|
132
|
-
limit: Maximum number of messages to return
|
|
133
|
-
order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
|
|
134
|
-
role: Filter by role (user/assistant/system/tool)
|
|
135
|
-
return_message_object: Whether to return Message objects or LettaMessage objects
|
|
136
|
-
user_id: ID of the user making the request
|
|
137
|
-
|
|
138
|
-
Returns:
|
|
139
|
-
A list of messages associated with the run. Default is List[LettaMessage].
|
|
108
|
+
Get response messages associated with a run.
|
|
140
109
|
|
|
141
110
|
Parameters
|
|
142
111
|
----------
|
|
143
112
|
run_id : str
|
|
144
113
|
|
|
145
114
|
before : typing.Optional[str]
|
|
146
|
-
|
|
115
|
+
Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
|
|
147
116
|
|
|
148
117
|
after : typing.Optional[str]
|
|
149
|
-
|
|
118
|
+
Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
|
|
150
119
|
|
|
151
120
|
limit : typing.Optional[int]
|
|
152
121
|
Maximum number of messages to return
|
|
153
122
|
|
|
154
|
-
order : typing.Optional[
|
|
155
|
-
Sort order
|
|
156
|
-
|
|
157
|
-
role : typing.Optional[MessageRole]
|
|
158
|
-
Filter by role
|
|
123
|
+
order : typing.Optional[MessagesListRequestOrder]
|
|
124
|
+
Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
|
|
159
125
|
|
|
160
126
|
request_options : typing.Optional[RequestOptions]
|
|
161
127
|
Request-specific configuration.
|
|
@@ -186,6 +152,6 @@ class AsyncMessagesClient:
|
|
|
186
152
|
asyncio.run(main())
|
|
187
153
|
"""
|
|
188
154
|
_response = await self._raw_client.list(
|
|
189
|
-
run_id, before=before, after=after, limit=limit, order=order,
|
|
155
|
+
run_id, before=before, after=after, limit=limit, order=order, request_options=request_options
|
|
190
156
|
)
|
|
191
157
|
return _response.data
|
|
@@ -12,7 +12,7 @@ from ...core.unchecked_base_model import construct_type
|
|
|
12
12
|
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
13
13
|
from ...types.http_validation_error import HttpValidationError
|
|
14
14
|
from ...types.letta_message_union import LettaMessageUnion
|
|
15
|
-
from
|
|
15
|
+
from .types.messages_list_request_order import MessagesListRequestOrder
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class RawMessagesClient:
|
|
@@ -26,44 +26,27 @@ class RawMessagesClient:
|
|
|
26
26
|
before: typing.Optional[str] = None,
|
|
27
27
|
after: typing.Optional[str] = None,
|
|
28
28
|
limit: typing.Optional[int] = None,
|
|
29
|
-
order: typing.Optional[
|
|
30
|
-
role: typing.Optional[MessageRole] = None,
|
|
29
|
+
order: typing.Optional[MessagesListRequestOrder] = None,
|
|
31
30
|
request_options: typing.Optional[RequestOptions] = None,
|
|
32
31
|
) -> HttpResponse[typing.List[LettaMessageUnion]]:
|
|
33
32
|
"""
|
|
34
|
-
Get messages associated with a run
|
|
35
|
-
|
|
36
|
-
Args:
|
|
37
|
-
run_id: ID of the run
|
|
38
|
-
before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
|
|
39
|
-
after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
|
|
40
|
-
limit: Maximum number of messages to return
|
|
41
|
-
order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
|
|
42
|
-
role: Filter by role (user/assistant/system/tool)
|
|
43
|
-
return_message_object: Whether to return Message objects or LettaMessage objects
|
|
44
|
-
user_id: ID of the user making the request
|
|
45
|
-
|
|
46
|
-
Returns:
|
|
47
|
-
A list of messages associated with the run. Default is List[LettaMessage].
|
|
33
|
+
Get response messages associated with a run.
|
|
48
34
|
|
|
49
35
|
Parameters
|
|
50
36
|
----------
|
|
51
37
|
run_id : str
|
|
52
38
|
|
|
53
39
|
before : typing.Optional[str]
|
|
54
|
-
|
|
40
|
+
Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
|
|
55
41
|
|
|
56
42
|
after : typing.Optional[str]
|
|
57
|
-
|
|
43
|
+
Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
|
|
58
44
|
|
|
59
45
|
limit : typing.Optional[int]
|
|
60
46
|
Maximum number of messages to return
|
|
61
47
|
|
|
62
|
-
order : typing.Optional[
|
|
63
|
-
Sort order
|
|
64
|
-
|
|
65
|
-
role : typing.Optional[MessageRole]
|
|
66
|
-
Filter by role
|
|
48
|
+
order : typing.Optional[MessagesListRequestOrder]
|
|
49
|
+
Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
|
|
67
50
|
|
|
68
51
|
request_options : typing.Optional[RequestOptions]
|
|
69
52
|
Request-specific configuration.
|
|
@@ -81,7 +64,6 @@ class RawMessagesClient:
|
|
|
81
64
|
"after": after,
|
|
82
65
|
"limit": limit,
|
|
83
66
|
"order": order,
|
|
84
|
-
"role": role,
|
|
85
67
|
},
|
|
86
68
|
request_options=request_options,
|
|
87
69
|
)
|
|
@@ -123,44 +105,27 @@ class AsyncRawMessagesClient:
|
|
|
123
105
|
before: typing.Optional[str] = None,
|
|
124
106
|
after: typing.Optional[str] = None,
|
|
125
107
|
limit: typing.Optional[int] = None,
|
|
126
|
-
order: typing.Optional[
|
|
127
|
-
role: typing.Optional[MessageRole] = None,
|
|
108
|
+
order: typing.Optional[MessagesListRequestOrder] = None,
|
|
128
109
|
request_options: typing.Optional[RequestOptions] = None,
|
|
129
110
|
) -> AsyncHttpResponse[typing.List[LettaMessageUnion]]:
|
|
130
111
|
"""
|
|
131
|
-
Get messages associated with a run
|
|
132
|
-
|
|
133
|
-
Args:
|
|
134
|
-
run_id: ID of the run
|
|
135
|
-
before: A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
|
|
136
|
-
after: A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
|
|
137
|
-
limit: Maximum number of messages to return
|
|
138
|
-
order: Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
|
|
139
|
-
role: Filter by role (user/assistant/system/tool)
|
|
140
|
-
return_message_object: Whether to return Message objects or LettaMessage objects
|
|
141
|
-
user_id: ID of the user making the request
|
|
142
|
-
|
|
143
|
-
Returns:
|
|
144
|
-
A list of messages associated with the run. Default is List[LettaMessage].
|
|
112
|
+
Get response messages associated with a run.
|
|
145
113
|
|
|
146
114
|
Parameters
|
|
147
115
|
----------
|
|
148
116
|
run_id : str
|
|
149
117
|
|
|
150
118
|
before : typing.Optional[str]
|
|
151
|
-
|
|
119
|
+
Message ID cursor for pagination. Returns messages that come before this message ID in the specified sort order
|
|
152
120
|
|
|
153
121
|
after : typing.Optional[str]
|
|
154
|
-
|
|
122
|
+
Message ID cursor for pagination. Returns messages that come after this message ID in the specified sort order
|
|
155
123
|
|
|
156
124
|
limit : typing.Optional[int]
|
|
157
125
|
Maximum number of messages to return
|
|
158
126
|
|
|
159
|
-
order : typing.Optional[
|
|
160
|
-
Sort order
|
|
161
|
-
|
|
162
|
-
role : typing.Optional[MessageRole]
|
|
163
|
-
Filter by role
|
|
127
|
+
order : typing.Optional[MessagesListRequestOrder]
|
|
128
|
+
Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first
|
|
164
129
|
|
|
165
130
|
request_options : typing.Optional[RequestOptions]
|
|
166
131
|
Request-specific configuration.
|
|
@@ -178,7 +143,6 @@ class AsyncRawMessagesClient:
|
|
|
178
143
|
"after": after,
|
|
179
144
|
"limit": limit,
|
|
180
145
|
"order": order,
|
|
181
|
-
"role": role,
|
|
182
146
|
},
|
|
183
147
|
request_options=request_options,
|
|
184
148
|
)
|
letta_client/runs/raw_client.py
CHANGED
|
@@ -15,6 +15,7 @@ from ..core.unchecked_base_model import construct_type
|
|
|
15
15
|
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
16
16
|
from ..types.http_validation_error import HttpValidationError
|
|
17
17
|
from ..types.run import Run
|
|
18
|
+
from ..types.stop_reason_type import StopReasonType
|
|
18
19
|
from .types.letta_streaming_response import LettaStreamingResponse
|
|
19
20
|
|
|
20
21
|
# this is used as the default value for optional parameters
|
|
@@ -28,11 +29,14 @@ class RawRunsClient:
|
|
|
28
29
|
def list(
|
|
29
30
|
self,
|
|
30
31
|
*,
|
|
32
|
+
agent_id: typing.Optional[str] = None,
|
|
31
33
|
agent_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
32
34
|
background: typing.Optional[bool] = None,
|
|
35
|
+
stop_reason: typing.Optional[StopReasonType] = None,
|
|
33
36
|
after: typing.Optional[str] = None,
|
|
34
37
|
before: typing.Optional[str] = None,
|
|
35
38
|
limit: typing.Optional[int] = None,
|
|
39
|
+
active: typing.Optional[bool] = None,
|
|
36
40
|
ascending: typing.Optional[bool] = None,
|
|
37
41
|
request_options: typing.Optional[RequestOptions] = None,
|
|
38
42
|
) -> HttpResponse[typing.List[Run]]:
|
|
@@ -41,12 +45,18 @@ class RawRunsClient:
|
|
|
41
45
|
|
|
42
46
|
Parameters
|
|
43
47
|
----------
|
|
44
|
-
|
|
48
|
+
agent_id : typing.Optional[str]
|
|
45
49
|
The unique identifier of the agent associated with the run.
|
|
46
50
|
|
|
51
|
+
agent_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
52
|
+
(DEPRECATED) The unique identifiers of the agents associated with the run.
|
|
53
|
+
|
|
47
54
|
background : typing.Optional[bool]
|
|
48
55
|
If True, filters for runs that were created in background mode.
|
|
49
56
|
|
|
57
|
+
stop_reason : typing.Optional[StopReasonType]
|
|
58
|
+
Filter runs by stop reason.
|
|
59
|
+
|
|
50
60
|
after : typing.Optional[str]
|
|
51
61
|
Cursor for pagination
|
|
52
62
|
|
|
@@ -56,6 +66,9 @@ class RawRunsClient:
|
|
|
56
66
|
limit : typing.Optional[int]
|
|
57
67
|
Maximum number of runs to return
|
|
58
68
|
|
|
69
|
+
active : typing.Optional[bool]
|
|
70
|
+
Filter for active runs.
|
|
71
|
+
|
|
59
72
|
ascending : typing.Optional[bool]
|
|
60
73
|
Whether to sort agents oldest to newest (True) or newest to oldest (False, default)
|
|
61
74
|
|
|
@@ -71,11 +84,14 @@ class RawRunsClient:
|
|
|
71
84
|
"v1/runs/",
|
|
72
85
|
method="GET",
|
|
73
86
|
params={
|
|
87
|
+
"agent_id": agent_id,
|
|
74
88
|
"agent_ids": agent_ids,
|
|
75
89
|
"background": background,
|
|
90
|
+
"stop_reason": stop_reason,
|
|
76
91
|
"after": after,
|
|
77
92
|
"before": before,
|
|
78
93
|
"limit": limit,
|
|
94
|
+
"active": active,
|
|
79
95
|
"ascending": ascending,
|
|
80
96
|
},
|
|
81
97
|
request_options=request_options,
|
|
@@ -109,7 +125,7 @@ class RawRunsClient:
|
|
|
109
125
|
def list_active(
|
|
110
126
|
self,
|
|
111
127
|
*,
|
|
112
|
-
|
|
128
|
+
agent_id: typing.Optional[str] = None,
|
|
113
129
|
background: typing.Optional[bool] = None,
|
|
114
130
|
request_options: typing.Optional[RequestOptions] = None,
|
|
115
131
|
) -> HttpResponse[typing.List[Run]]:
|
|
@@ -118,7 +134,7 @@ class RawRunsClient:
|
|
|
118
134
|
|
|
119
135
|
Parameters
|
|
120
136
|
----------
|
|
121
|
-
|
|
137
|
+
agent_id : typing.Optional[str]
|
|
122
138
|
The unique identifier of the agent associated with the run.
|
|
123
139
|
|
|
124
140
|
background : typing.Optional[bool]
|
|
@@ -136,7 +152,7 @@ class RawRunsClient:
|
|
|
136
152
|
"v1/runs/active",
|
|
137
153
|
method="GET",
|
|
138
154
|
params={
|
|
139
|
-
"
|
|
155
|
+
"agent_id": agent_id,
|
|
140
156
|
"background": background,
|
|
141
157
|
},
|
|
142
158
|
request_options=request_options,
|
|
@@ -364,11 +380,14 @@ class AsyncRawRunsClient:
|
|
|
364
380
|
async def list(
|
|
365
381
|
self,
|
|
366
382
|
*,
|
|
383
|
+
agent_id: typing.Optional[str] = None,
|
|
367
384
|
agent_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
368
385
|
background: typing.Optional[bool] = None,
|
|
386
|
+
stop_reason: typing.Optional[StopReasonType] = None,
|
|
369
387
|
after: typing.Optional[str] = None,
|
|
370
388
|
before: typing.Optional[str] = None,
|
|
371
389
|
limit: typing.Optional[int] = None,
|
|
390
|
+
active: typing.Optional[bool] = None,
|
|
372
391
|
ascending: typing.Optional[bool] = None,
|
|
373
392
|
request_options: typing.Optional[RequestOptions] = None,
|
|
374
393
|
) -> AsyncHttpResponse[typing.List[Run]]:
|
|
@@ -377,12 +396,18 @@ class AsyncRawRunsClient:
|
|
|
377
396
|
|
|
378
397
|
Parameters
|
|
379
398
|
----------
|
|
380
|
-
|
|
399
|
+
agent_id : typing.Optional[str]
|
|
381
400
|
The unique identifier of the agent associated with the run.
|
|
382
401
|
|
|
402
|
+
agent_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
403
|
+
(DEPRECATED) The unique identifiers of the agents associated with the run.
|
|
404
|
+
|
|
383
405
|
background : typing.Optional[bool]
|
|
384
406
|
If True, filters for runs that were created in background mode.
|
|
385
407
|
|
|
408
|
+
stop_reason : typing.Optional[StopReasonType]
|
|
409
|
+
Filter runs by stop reason.
|
|
410
|
+
|
|
386
411
|
after : typing.Optional[str]
|
|
387
412
|
Cursor for pagination
|
|
388
413
|
|
|
@@ -392,6 +417,9 @@ class AsyncRawRunsClient:
|
|
|
392
417
|
limit : typing.Optional[int]
|
|
393
418
|
Maximum number of runs to return
|
|
394
419
|
|
|
420
|
+
active : typing.Optional[bool]
|
|
421
|
+
Filter for active runs.
|
|
422
|
+
|
|
395
423
|
ascending : typing.Optional[bool]
|
|
396
424
|
Whether to sort agents oldest to newest (True) or newest to oldest (False, default)
|
|
397
425
|
|
|
@@ -407,11 +435,14 @@ class AsyncRawRunsClient:
|
|
|
407
435
|
"v1/runs/",
|
|
408
436
|
method="GET",
|
|
409
437
|
params={
|
|
438
|
+
"agent_id": agent_id,
|
|
410
439
|
"agent_ids": agent_ids,
|
|
411
440
|
"background": background,
|
|
441
|
+
"stop_reason": stop_reason,
|
|
412
442
|
"after": after,
|
|
413
443
|
"before": before,
|
|
414
444
|
"limit": limit,
|
|
445
|
+
"active": active,
|
|
415
446
|
"ascending": ascending,
|
|
416
447
|
},
|
|
417
448
|
request_options=request_options,
|
|
@@ -445,7 +476,7 @@ class AsyncRawRunsClient:
|
|
|
445
476
|
async def list_active(
|
|
446
477
|
self,
|
|
447
478
|
*,
|
|
448
|
-
|
|
479
|
+
agent_id: typing.Optional[str] = None,
|
|
449
480
|
background: typing.Optional[bool] = None,
|
|
450
481
|
request_options: typing.Optional[RequestOptions] = None,
|
|
451
482
|
) -> AsyncHttpResponse[typing.List[Run]]:
|
|
@@ -454,7 +485,7 @@ class AsyncRawRunsClient:
|
|
|
454
485
|
|
|
455
486
|
Parameters
|
|
456
487
|
----------
|
|
457
|
-
|
|
488
|
+
agent_id : typing.Optional[str]
|
|
458
489
|
The unique identifier of the agent associated with the run.
|
|
459
490
|
|
|
460
491
|
background : typing.Optional[bool]
|
|
@@ -472,7 +503,7 @@ class AsyncRawRunsClient:
|
|
|
472
503
|
"v1/runs/active",
|
|
473
504
|
method="GET",
|
|
474
505
|
params={
|
|
475
|
-
"
|
|
506
|
+
"agent_id": agent_id,
|
|
476
507
|
"background": background,
|
|
477
508
|
},
|
|
478
509
|
request_options=request_options,
|
letta_client/steps/__init__.py
CHANGED
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
from .types import StepsListRequestFeedback
|
|
6
|
-
from . import feedback
|
|
5
|
+
from .types import StepsListRequestFeedback, StepsListRequestOrder
|
|
6
|
+
from . import feedback, messages, metrics, trace
|
|
7
|
+
from .messages import MessagesListRequestOrder, MessagesListResponseItem
|
|
7
8
|
|
|
8
|
-
__all__ = [
|
|
9
|
+
__all__ = [
|
|
10
|
+
"MessagesListRequestOrder",
|
|
11
|
+
"MessagesListResponseItem",
|
|
12
|
+
"StepsListRequestFeedback",
|
|
13
|
+
"StepsListRequestOrder",
|
|
14
|
+
"feedback",
|
|
15
|
+
"messages",
|
|
16
|
+
"metrics",
|
|
17
|
+
"trace",
|
|
18
|
+
]
|
letta_client/steps/client.py
CHANGED
|
@@ -5,17 +5,26 @@ import typing
|
|
|
5
5
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
6
|
from ..core.request_options import RequestOptions
|
|
7
7
|
from ..types.step import Step
|
|
8
|
-
from ..types.step_metrics import StepMetrics
|
|
9
8
|
from .feedback.client import AsyncFeedbackClient, FeedbackClient
|
|
9
|
+
from .messages.client import AsyncMessagesClient, MessagesClient
|
|
10
|
+
from .metrics.client import AsyncMetricsClient, MetricsClient
|
|
10
11
|
from .raw_client import AsyncRawStepsClient, RawStepsClient
|
|
12
|
+
from .trace.client import AsyncTraceClient, TraceClient
|
|
11
13
|
from .types.steps_list_request_feedback import StepsListRequestFeedback
|
|
14
|
+
from .types.steps_list_request_order import StepsListRequestOrder
|
|
12
15
|
|
|
13
16
|
|
|
14
17
|
class StepsClient:
|
|
15
18
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
16
19
|
self._raw_client = RawStepsClient(client_wrapper=client_wrapper)
|
|
20
|
+
self.metrics = MetricsClient(client_wrapper=client_wrapper)
|
|
21
|
+
|
|
22
|
+
self.trace = TraceClient(client_wrapper=client_wrapper)
|
|
23
|
+
|
|
17
24
|
self.feedback = FeedbackClient(client_wrapper=client_wrapper)
|
|
18
25
|
|
|
26
|
+
self.messages = MessagesClient(client_wrapper=client_wrapper)
|
|
27
|
+
|
|
19
28
|
@property
|
|
20
29
|
def with_raw_response(self) -> RawStepsClient:
|
|
21
30
|
"""
|
|
@@ -33,7 +42,8 @@ class StepsClient:
|
|
|
33
42
|
before: typing.Optional[str] = None,
|
|
34
43
|
after: typing.Optional[str] = None,
|
|
35
44
|
limit: typing.Optional[int] = None,
|
|
36
|
-
order: typing.Optional[
|
|
45
|
+
order: typing.Optional[StepsListRequestOrder] = None,
|
|
46
|
+
order_by: typing.Optional[typing.Literal["created_at"]] = None,
|
|
37
47
|
start_date: typing.Optional[str] = None,
|
|
38
48
|
end_date: typing.Optional[str] = None,
|
|
39
49
|
model: typing.Optional[str] = None,
|
|
@@ -47,7 +57,6 @@ class StepsClient:
|
|
|
47
57
|
) -> typing.List[Step]:
|
|
48
58
|
"""
|
|
49
59
|
List steps with optional pagination and date filters.
|
|
50
|
-
Dates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)
|
|
51
60
|
|
|
52
61
|
Parameters
|
|
53
62
|
----------
|
|
@@ -60,8 +69,11 @@ class StepsClient:
|
|
|
60
69
|
limit : typing.Optional[int]
|
|
61
70
|
Maximum number of steps to return
|
|
62
71
|
|
|
63
|
-
order : typing.Optional[
|
|
64
|
-
Sort order
|
|
72
|
+
order : typing.Optional[StepsListRequestOrder]
|
|
73
|
+
Sort order for steps by creation time. 'asc' for oldest first, 'desc' for newest first
|
|
74
|
+
|
|
75
|
+
order_by : typing.Optional[typing.Literal["created_at"]]
|
|
76
|
+
Field to sort by
|
|
65
77
|
|
|
66
78
|
start_date : typing.Optional[str]
|
|
67
79
|
Return steps after this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
|
|
@@ -113,6 +125,7 @@ class StepsClient:
|
|
|
113
125
|
after=after,
|
|
114
126
|
limit=limit,
|
|
115
127
|
order=order,
|
|
128
|
+
order_by=order_by,
|
|
116
129
|
start_date=start_date,
|
|
117
130
|
end_date=end_date,
|
|
118
131
|
model=model,
|
|
@@ -157,45 +170,18 @@ class StepsClient:
|
|
|
157
170
|
_response = self._raw_client.retrieve(step_id, request_options=request_options)
|
|
158
171
|
return _response.data
|
|
159
172
|
|
|
160
|
-
def retrieve_step_metrics(
|
|
161
|
-
self, step_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
162
|
-
) -> StepMetrics:
|
|
163
|
-
"""
|
|
164
|
-
Get step metrics by step ID.
|
|
165
|
-
|
|
166
|
-
Parameters
|
|
167
|
-
----------
|
|
168
|
-
step_id : str
|
|
169
|
-
|
|
170
|
-
request_options : typing.Optional[RequestOptions]
|
|
171
|
-
Request-specific configuration.
|
|
172
|
-
|
|
173
|
-
Returns
|
|
174
|
-
-------
|
|
175
|
-
StepMetrics
|
|
176
|
-
Successful Response
|
|
177
|
-
|
|
178
|
-
Examples
|
|
179
|
-
--------
|
|
180
|
-
from letta_client import Letta
|
|
181
|
-
|
|
182
|
-
client = Letta(
|
|
183
|
-
project="YOUR_PROJECT",
|
|
184
|
-
token="YOUR_TOKEN",
|
|
185
|
-
)
|
|
186
|
-
client.steps.retrieve_step_metrics(
|
|
187
|
-
step_id="step_id",
|
|
188
|
-
)
|
|
189
|
-
"""
|
|
190
|
-
_response = self._raw_client.retrieve_step_metrics(step_id, request_options=request_options)
|
|
191
|
-
return _response.data
|
|
192
|
-
|
|
193
173
|
|
|
194
174
|
class AsyncStepsClient:
|
|
195
175
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
196
176
|
self._raw_client = AsyncRawStepsClient(client_wrapper=client_wrapper)
|
|
177
|
+
self.metrics = AsyncMetricsClient(client_wrapper=client_wrapper)
|
|
178
|
+
|
|
179
|
+
self.trace = AsyncTraceClient(client_wrapper=client_wrapper)
|
|
180
|
+
|
|
197
181
|
self.feedback = AsyncFeedbackClient(client_wrapper=client_wrapper)
|
|
198
182
|
|
|
183
|
+
self.messages = AsyncMessagesClient(client_wrapper=client_wrapper)
|
|
184
|
+
|
|
199
185
|
@property
|
|
200
186
|
def with_raw_response(self) -> AsyncRawStepsClient:
|
|
201
187
|
"""
|
|
@@ -213,7 +199,8 @@ class AsyncStepsClient:
|
|
|
213
199
|
before: typing.Optional[str] = None,
|
|
214
200
|
after: typing.Optional[str] = None,
|
|
215
201
|
limit: typing.Optional[int] = None,
|
|
216
|
-
order: typing.Optional[
|
|
202
|
+
order: typing.Optional[StepsListRequestOrder] = None,
|
|
203
|
+
order_by: typing.Optional[typing.Literal["created_at"]] = None,
|
|
217
204
|
start_date: typing.Optional[str] = None,
|
|
218
205
|
end_date: typing.Optional[str] = None,
|
|
219
206
|
model: typing.Optional[str] = None,
|
|
@@ -227,7 +214,6 @@ class AsyncStepsClient:
|
|
|
227
214
|
) -> typing.List[Step]:
|
|
228
215
|
"""
|
|
229
216
|
List steps with optional pagination and date filters.
|
|
230
|
-
Dates should be provided in ISO 8601 format (e.g. 2025-01-29T15:01:19-08:00)
|
|
231
217
|
|
|
232
218
|
Parameters
|
|
233
219
|
----------
|
|
@@ -240,8 +226,11 @@ class AsyncStepsClient:
|
|
|
240
226
|
limit : typing.Optional[int]
|
|
241
227
|
Maximum number of steps to return
|
|
242
228
|
|
|
243
|
-
order : typing.Optional[
|
|
244
|
-
Sort order
|
|
229
|
+
order : typing.Optional[StepsListRequestOrder]
|
|
230
|
+
Sort order for steps by creation time. 'asc' for oldest first, 'desc' for newest first
|
|
231
|
+
|
|
232
|
+
order_by : typing.Optional[typing.Literal["created_at"]]
|
|
233
|
+
Field to sort by
|
|
245
234
|
|
|
246
235
|
start_date : typing.Optional[str]
|
|
247
236
|
Return steps after this ISO datetime (e.g. "2025-01-29T15:01:19-08:00")
|
|
@@ -301,6 +290,7 @@ class AsyncStepsClient:
|
|
|
301
290
|
after=after,
|
|
302
291
|
limit=limit,
|
|
303
292
|
order=order,
|
|
293
|
+
order_by=order_by,
|
|
304
294
|
start_date=start_date,
|
|
305
295
|
end_date=end_date,
|
|
306
296
|
model=model,
|
|
@@ -352,44 +342,3 @@ class AsyncStepsClient:
|
|
|
352
342
|
"""
|
|
353
343
|
_response = await self._raw_client.retrieve(step_id, request_options=request_options)
|
|
354
344
|
return _response.data
|
|
355
|
-
|
|
356
|
-
async def retrieve_step_metrics(
|
|
357
|
-
self, step_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
358
|
-
) -> StepMetrics:
|
|
359
|
-
"""
|
|
360
|
-
Get step metrics by step ID.
|
|
361
|
-
|
|
362
|
-
Parameters
|
|
363
|
-
----------
|
|
364
|
-
step_id : str
|
|
365
|
-
|
|
366
|
-
request_options : typing.Optional[RequestOptions]
|
|
367
|
-
Request-specific configuration.
|
|
368
|
-
|
|
369
|
-
Returns
|
|
370
|
-
-------
|
|
371
|
-
StepMetrics
|
|
372
|
-
Successful Response
|
|
373
|
-
|
|
374
|
-
Examples
|
|
375
|
-
--------
|
|
376
|
-
import asyncio
|
|
377
|
-
|
|
378
|
-
from letta_client import AsyncLetta
|
|
379
|
-
|
|
380
|
-
client = AsyncLetta(
|
|
381
|
-
project="YOUR_PROJECT",
|
|
382
|
-
token="YOUR_TOKEN",
|
|
383
|
-
)
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
async def main() -> None:
|
|
387
|
-
await client.steps.retrieve_step_metrics(
|
|
388
|
-
step_id="step_id",
|
|
389
|
-
)
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
asyncio.run(main())
|
|
393
|
-
"""
|
|
394
|
-
_response = await self._raw_client.retrieve_step_metrics(step_id, request_options=request_options)
|
|
395
|
-
return _response.data
|