asteroid-odyssey 1.3.7__py3-none-any.whl → 1.3.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. asteroid_odyssey/__init__.py +4 -2
  2. asteroid_odyssey/agents_v1_gen/__init__.py +0 -1
  3. asteroid_odyssey/agents_v1_gen/api/execution_api.py +26 -311
  4. asteroid_odyssey/agents_v1_gen/models/__init__.py +0 -1
  5. asteroid_odyssey/agents_v1_gen/models/agent_profile.py +1 -3
  6. asteroid_odyssey/agents_v1_gen/models/create_agent_profile_request.py +1 -3
  7. asteroid_odyssey/agents_v1_gen/models/proxy_type.py +1 -0
  8. asteroid_odyssey/agents_v1_gen/models/update_agent_profile_request.py +1 -3
  9. asteroid_odyssey/agents_v2_gen/__init__.py +53 -15
  10. asteroid_odyssey/agents_v2_gen/api/__init__.py +3 -1
  11. asteroid_odyssey/agents_v2_gen/api/agents_api.py +684 -0
  12. asteroid_odyssey/agents_v2_gen/api/{default_api.py → execution_api.py} +381 -479
  13. asteroid_odyssey/agents_v2_gen/api/files_api.py +895 -0
  14. asteroid_odyssey/agents_v2_gen/models/__init__.py +50 -14
  15. asteroid_odyssey/agents_v2_gen/models/agents_agent_execute_agent_request.py +103 -0
  16. asteroid_odyssey/{agents_v1_gen/models/upload_execution_files200_response.py → agents_v2_gen/models/agents_agent_execute_agent_response.py} +11 -13
  17. asteroid_odyssey/agents_v2_gen/models/agents_execution_action_name.py +93 -0
  18. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_completed_info.py +350 -0
  19. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_completed_payload.py +25 -3
  20. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_failed_payload.py +19 -3
  21. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_started_info.py +252 -0
  22. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_action_started_payload.py +23 -3
  23. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_file_added_payload.py +10 -1
  24. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_generic_payload.py +11 -2
  25. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_payload_union.py +132 -104
  26. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_playwright_script_generated_payload.py +114 -0
  27. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_terminal.py → agents_execution_activity_reasoning_payload.py} +9 -13
  28. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_status_changed_payload.py +11 -2
  29. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_step_completed_payload.py +11 -2
  30. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_step_started_payload.py +11 -2
  31. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_transitioned_node_payload.py +20 -4
  32. asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_user_message_received_payload.py +11 -2
  33. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_action_started.py → agents_execution_activity_workflow_updated_payload.py} +17 -13
  34. asteroid_odyssey/agents_v2_gen/models/agents_execution_comment.py +100 -0
  35. asteroid_odyssey/agents_v2_gen/models/agents_execution_completed_payload.py +4 -11
  36. asteroid_odyssey/agents_v2_gen/models/agents_execution_element_file_upload_completed_details.py +96 -0
  37. asteroid_odyssey/agents_v2_gen/models/agents_execution_execution_result.py +103 -0
  38. asteroid_odyssey/agents_v2_gen/models/agents_execution_ext_api_call_completed_details.py +102 -0
  39. asteroid_odyssey/agents_v2_gen/models/agents_execution_ext_get_mail_completed_details.py +98 -0
  40. asteroid_odyssey/agents_v2_gen/models/agents_execution_failed_payload.py +8 -2
  41. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_file_added.py → agents_execution_file_list_completed_details.py} +13 -17
  42. asteroid_odyssey/agents_v2_gen/models/agents_execution_file_read_completed_details.py +100 -0
  43. asteroid_odyssey/agents_v2_gen/models/agents_execution_file_stage_completed_details.py +96 -0
  44. asteroid_odyssey/agents_v2_gen/models/agents_execution_human_label.py +96 -0
  45. asteroid_odyssey/agents_v2_gen/models/agents_execution_list_item.py +141 -0
  46. asteroid_odyssey/agents_v2_gen/models/agents_execution_llm_call_purpose.py +40 -0
  47. asteroid_odyssey/agents_v2_gen/models/agents_execution_llm_call_started_details.py +97 -0
  48. asteroid_odyssey/agents_v2_gen/models/agents_execution_nav_to_completed_details.py +96 -0
  49. asteroid_odyssey/agents_v2_gen/models/agents_execution_nav_to_started_details.py +96 -0
  50. asteroid_odyssey/agents_v2_gen/models/agents_execution_obs_snapshot_with_selectors_completed_details.py +98 -0
  51. asteroid_odyssey/agents_v2_gen/models/agents_execution_rules_details.py +87 -0
  52. asteroid_odyssey/agents_v2_gen/models/agents_execution_scratchpad_read_completed_details.py +98 -0
  53. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_generic.py → agents_execution_scratchpad_read_started_details.py} +20 -17
  54. asteroid_odyssey/agents_v2_gen/models/agents_execution_scratchpad_write_completed_details.py +104 -0
  55. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_step_started.py → agents_execution_scratchpad_write_started_details.py} +20 -17
  56. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_hybrid_playwright_completed_details.py +102 -0
  57. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_hybrid_playwright_started_details.py +96 -0
  58. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_pad_run_function_completed_details.py +102 -0
  59. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_playwright_completed_details.py +102 -0
  60. asteroid_odyssey/agents_v2_gen/models/agents_execution_script_playwright_started_details.py +96 -0
  61. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_read_completed_details.py +96 -0
  62. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_read_started_details.py +98 -0
  63. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_action_completed.py → agents_execution_scriptpad_run_function_started_details.py} +21 -18
  64. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_search_replace_completed_details.py +106 -0
  65. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_search_replace_started_details.py +100 -0
  66. asteroid_odyssey/agents_v2_gen/models/agents_execution_scriptpad_write_completed_details.py +102 -0
  67. asteroid_odyssey/agents_v2_gen/models/agents_execution_sort_field.py +37 -0
  68. asteroid_odyssey/agents_v2_gen/models/agents_execution_terminal_payload.py +11 -2
  69. asteroid_odyssey/agents_v2_gen/models/{activity_payload_union_action_failed.py → agents_execution_util_get_datetime_completed_details.py} +20 -19
  70. asteroid_odyssey/agents_v2_gen/models/agents_execution_util_get_datetime_started_details.py +96 -0
  71. asteroid_odyssey/agents_v2_gen/models/{agents_execution_graph_update.py → agents_execution_workflow_update.py} +11 -5
  72. asteroid_odyssey/agents_v2_gen/models/agents_files_temp_file.py +89 -0
  73. asteroid_odyssey/agents_v2_gen/models/{agents_execution_activity_graph_updated_payload.py → agents_files_temp_files_response.py} +14 -14
  74. asteroid_odyssey/agents_v2_gen/models/agents_graph_models_nodes_properties_playwright_script_llm_var.py +92 -0
  75. asteroid_odyssey/agents_v2_gen/models/agents_graph_models_nodes_properties_playwright_script_llm_var_type.py +38 -0
  76. asteroid_odyssey/agents_v2_gen/models/agents_graph_models_transitions_transition_type.py +38 -0
  77. asteroid_odyssey/agents_v2_gen/models/common_os_error.py +87 -0
  78. asteroid_odyssey/agents_v2_gen/models/executions_list200_response.py +101 -0
  79. asteroid_odyssey/client.py +204 -33
  80. {asteroid_odyssey-1.3.7.dist-info → asteroid_odyssey-1.3.9.dist-info}/METADATA +1 -1
  81. asteroid_odyssey-1.3.9.dist-info/RECORD +132 -0
  82. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_graph_updated.py +0 -100
  83. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_status_changed.py +0 -100
  84. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_completed.py +0 -100
  85. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_transitioned_node.py +0 -100
  86. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_user_message_received.py +0 -100
  87. asteroid_odyssey-1.3.7.dist-info/RECORD +0 -95
  88. {asteroid_odyssey-1.3.7.dist-info → asteroid_odyssey-1.3.9.dist-info}/WHEEL +0 -0
  89. {asteroid_odyssey-1.3.7.dist-info → asteroid_odyssey-1.3.9.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,895 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Agent Service
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBytes, StrictStr, field_validator
20
+ from typing import List, Tuple, Union
21
+ from typing_extensions import Annotated
22
+ from asteroid_odyssey.agents_v2_gen.models.agents_files_file import AgentsFilesFile
23
+ from asteroid_odyssey.agents_v2_gen.models.agents_files_temp_files_response import AgentsFilesTempFilesResponse
24
+
25
+ from asteroid_odyssey.agents_v2_gen.api_client import ApiClient, RequestSerialized
26
+ from asteroid_odyssey.agents_v2_gen.api_response import ApiResponse
27
+ from asteroid_odyssey.agents_v2_gen.rest import RESTResponseType
28
+
29
+
30
+ class FilesApi:
31
+ """NOTE: This class is auto generated by OpenAPI Generator
32
+ Ref: https://openapi-generator.tech
33
+
34
+ Do not edit the class manually.
35
+ """
36
+
37
+ def __init__(self, api_client=None) -> None:
38
+ if api_client is None:
39
+ api_client = ApiClient.get_default()
40
+ self.api_client = api_client
41
+
42
+
43
+ @validate_call
44
+ def execution_context_files_get(
45
+ self,
46
+ execution_id: StrictStr,
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Annotated[StrictFloat, Field(gt=0)]
53
+ ]
54
+ ] = None,
55
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
+ _content_type: Optional[StrictStr] = None,
57
+ _headers: Optional[Dict[StrictStr, Any]] = None,
58
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
+ ) -> List[AgentsFilesFile]:
60
+ """execution_context_files_get
61
+
62
+
63
+ :param execution_id: (required)
64
+ :type execution_id: str
65
+ :param _request_timeout: timeout setting for this request. If one
66
+ number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :type _request_timeout: int, tuple(int, int), optional
70
+ :param _request_auth: set to override the auth_settings for an a single
71
+ request; this effectively ignores the
72
+ authentication in the spec for a single request.
73
+ :type _request_auth: dict, optional
74
+ :param _content_type: force content-type for the request.
75
+ :type _content_type: str, Optional
76
+ :param _headers: set to override the headers for a single
77
+ request; this effectively ignores the headers
78
+ in the spec for a single request.
79
+ :type _headers: dict, optional
80
+ :param _host_index: set to override the host_index for a single
81
+ request; this effectively ignores the host_index
82
+ in the spec for a single request.
83
+ :type _host_index: int, optional
84
+ :return: Returns the result object.
85
+ """ # noqa: E501
86
+
87
+ _param = self._execution_context_files_get_serialize(
88
+ execution_id=execution_id,
89
+ _request_auth=_request_auth,
90
+ _content_type=_content_type,
91
+ _headers=_headers,
92
+ _host_index=_host_index
93
+ )
94
+
95
+ _response_types_map: Dict[str, Optional[str]] = {
96
+ '200': "List[AgentsFilesFile]",
97
+ '404': "str",
98
+ }
99
+ response_data = self.api_client.call_api(
100
+ *_param,
101
+ _request_timeout=_request_timeout
102
+ )
103
+ response_data.read()
104
+ return self.api_client.response_deserialize(
105
+ response_data=response_data,
106
+ response_types_map=_response_types_map,
107
+ ).data
108
+
109
+
110
+ @validate_call
111
+ def execution_context_files_get_with_http_info(
112
+ self,
113
+ execution_id: StrictStr,
114
+ _request_timeout: Union[
115
+ None,
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Tuple[
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Annotated[StrictFloat, Field(gt=0)]
120
+ ]
121
+ ] = None,
122
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
123
+ _content_type: Optional[StrictStr] = None,
124
+ _headers: Optional[Dict[StrictStr, Any]] = None,
125
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
+ ) -> ApiResponse[List[AgentsFilesFile]]:
127
+ """execution_context_files_get
128
+
129
+
130
+ :param execution_id: (required)
131
+ :type execution_id: str
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ :type _request_timeout: int, tuple(int, int), optional
137
+ :param _request_auth: set to override the auth_settings for an a single
138
+ request; this effectively ignores the
139
+ authentication in the spec for a single request.
140
+ :type _request_auth: dict, optional
141
+ :param _content_type: force content-type for the request.
142
+ :type _content_type: str, Optional
143
+ :param _headers: set to override the headers for a single
144
+ request; this effectively ignores the headers
145
+ in the spec for a single request.
146
+ :type _headers: dict, optional
147
+ :param _host_index: set to override the host_index for a single
148
+ request; this effectively ignores the host_index
149
+ in the spec for a single request.
150
+ :type _host_index: int, optional
151
+ :return: Returns the result object.
152
+ """ # noqa: E501
153
+
154
+ _param = self._execution_context_files_get_serialize(
155
+ execution_id=execution_id,
156
+ _request_auth=_request_auth,
157
+ _content_type=_content_type,
158
+ _headers=_headers,
159
+ _host_index=_host_index
160
+ )
161
+
162
+ _response_types_map: Dict[str, Optional[str]] = {
163
+ '200': "List[AgentsFilesFile]",
164
+ '404': "str",
165
+ }
166
+ response_data = self.api_client.call_api(
167
+ *_param,
168
+ _request_timeout=_request_timeout
169
+ )
170
+ response_data.read()
171
+ return self.api_client.response_deserialize(
172
+ response_data=response_data,
173
+ response_types_map=_response_types_map,
174
+ )
175
+
176
+
177
+ @validate_call
178
+ def execution_context_files_get_without_preload_content(
179
+ self,
180
+ execution_id: StrictStr,
181
+ _request_timeout: Union[
182
+ None,
183
+ Annotated[StrictFloat, Field(gt=0)],
184
+ Tuple[
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Annotated[StrictFloat, Field(gt=0)]
187
+ ]
188
+ ] = None,
189
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
190
+ _content_type: Optional[StrictStr] = None,
191
+ _headers: Optional[Dict[StrictStr, Any]] = None,
192
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
193
+ ) -> RESTResponseType:
194
+ """execution_context_files_get
195
+
196
+
197
+ :param execution_id: (required)
198
+ :type execution_id: str
199
+ :param _request_timeout: timeout setting for this request. If one
200
+ number provided, it will be total request
201
+ timeout. It can also be a pair (tuple) of
202
+ (connection, read) timeouts.
203
+ :type _request_timeout: int, tuple(int, int), optional
204
+ :param _request_auth: set to override the auth_settings for an a single
205
+ request; this effectively ignores the
206
+ authentication in the spec for a single request.
207
+ :type _request_auth: dict, optional
208
+ :param _content_type: force content-type for the request.
209
+ :type _content_type: str, Optional
210
+ :param _headers: set to override the headers for a single
211
+ request; this effectively ignores the headers
212
+ in the spec for a single request.
213
+ :type _headers: dict, optional
214
+ :param _host_index: set to override the host_index for a single
215
+ request; this effectively ignores the host_index
216
+ in the spec for a single request.
217
+ :type _host_index: int, optional
218
+ :return: Returns the result object.
219
+ """ # noqa: E501
220
+
221
+ _param = self._execution_context_files_get_serialize(
222
+ execution_id=execution_id,
223
+ _request_auth=_request_auth,
224
+ _content_type=_content_type,
225
+ _headers=_headers,
226
+ _host_index=_host_index
227
+ )
228
+
229
+ _response_types_map: Dict[str, Optional[str]] = {
230
+ '200': "List[AgentsFilesFile]",
231
+ '404': "str",
232
+ }
233
+ response_data = self.api_client.call_api(
234
+ *_param,
235
+ _request_timeout=_request_timeout
236
+ )
237
+ return response_data.response
238
+
239
+
240
+ def _execution_context_files_get_serialize(
241
+ self,
242
+ execution_id,
243
+ _request_auth,
244
+ _content_type,
245
+ _headers,
246
+ _host_index,
247
+ ) -> RequestSerialized:
248
+
249
+ _host = None
250
+
251
+ _collection_formats: Dict[str, str] = {
252
+ }
253
+
254
+ _path_params: Dict[str, str] = {}
255
+ _query_params: List[Tuple[str, str]] = []
256
+ _header_params: Dict[str, Optional[str]] = _headers or {}
257
+ _form_params: List[Tuple[str, str]] = []
258
+ _files: Dict[
259
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
260
+ ] = {}
261
+ _body_params: Optional[bytes] = None
262
+
263
+ # process the path parameters
264
+ if execution_id is not None:
265
+ _path_params['executionId'] = execution_id
266
+ # process the query parameters
267
+ # process the header parameters
268
+ # process the form parameters
269
+ # process the body parameter
270
+
271
+
272
+ # set the HTTP header `Accept`
273
+ if 'Accept' not in _header_params:
274
+ _header_params['Accept'] = self.api_client.select_header_accept(
275
+ [
276
+ 'application/json',
277
+ 'text/plain'
278
+ ]
279
+ )
280
+
281
+
282
+ # authentication setting
283
+ _auth_settings: List[str] = [
284
+ 'ApiKeyAuth'
285
+ ]
286
+
287
+ return self.api_client.param_serialize(
288
+ method='GET',
289
+ resource_path='/executions/{executionId}/context-files',
290
+ path_params=_path_params,
291
+ query_params=_query_params,
292
+ header_params=_header_params,
293
+ body=_body_params,
294
+ post_params=_form_params,
295
+ files=_files,
296
+ auth_settings=_auth_settings,
297
+ collection_formats=_collection_formats,
298
+ _host=_host,
299
+ _request_auth=_request_auth
300
+ )
301
+
302
+
303
+
304
+
305
+ @validate_call
306
+ def execution_context_files_upload(
307
+ self,
308
+ execution_id: Annotated[StrictStr, Field(description="Upload files to a running execution that is already in progress. If you want to attach files to an execution that is not yet running, see the /temp-files endpoint.")],
309
+ files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
310
+ _request_timeout: Union[
311
+ None,
312
+ Annotated[StrictFloat, Field(gt=0)],
313
+ Tuple[
314
+ Annotated[StrictFloat, Field(gt=0)],
315
+ Annotated[StrictFloat, Field(gt=0)]
316
+ ]
317
+ ] = None,
318
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
319
+ _content_type: Optional[StrictStr] = None,
320
+ _headers: Optional[Dict[StrictStr, Any]] = None,
321
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
322
+ ) -> str:
323
+ """execution_context_files_upload
324
+
325
+
326
+ :param execution_id: Upload files to a running execution that is already in progress. If you want to attach files to an execution that is not yet running, see the /temp-files endpoint. (required)
327
+ :type execution_id: str
328
+ :param files: (required)
329
+ :type files: List[bytearray]
330
+ :param _request_timeout: timeout setting for this request. If one
331
+ number provided, it will be total request
332
+ timeout. It can also be a pair (tuple) of
333
+ (connection, read) timeouts.
334
+ :type _request_timeout: int, tuple(int, int), optional
335
+ :param _request_auth: set to override the auth_settings for an a single
336
+ request; this effectively ignores the
337
+ authentication in the spec for a single request.
338
+ :type _request_auth: dict, optional
339
+ :param _content_type: force content-type for the request.
340
+ :type _content_type: str, Optional
341
+ :param _headers: set to override the headers for a single
342
+ request; this effectively ignores the headers
343
+ in the spec for a single request.
344
+ :type _headers: dict, optional
345
+ :param _host_index: set to override the host_index for a single
346
+ request; this effectively ignores the host_index
347
+ in the spec for a single request.
348
+ :type _host_index: int, optional
349
+ :return: Returns the result object.
350
+ """ # noqa: E501
351
+
352
+ _param = self._execution_context_files_upload_serialize(
353
+ execution_id=execution_id,
354
+ files=files,
355
+ _request_auth=_request_auth,
356
+ _content_type=_content_type,
357
+ _headers=_headers,
358
+ _host_index=_host_index
359
+ )
360
+
361
+ _response_types_map: Dict[str, Optional[str]] = {
362
+ '200': "str",
363
+ '400': "str",
364
+ '404': "str",
365
+ }
366
+ response_data = self.api_client.call_api(
367
+ *_param,
368
+ _request_timeout=_request_timeout
369
+ )
370
+ response_data.read()
371
+ return self.api_client.response_deserialize(
372
+ response_data=response_data,
373
+ response_types_map=_response_types_map,
374
+ ).data
375
+
376
+
377
+ @validate_call
378
+ def execution_context_files_upload_with_http_info(
379
+ self,
380
+ execution_id: Annotated[StrictStr, Field(description="Upload files to a running execution that is already in progress. If you want to attach files to an execution that is not yet running, see the /temp-files endpoint.")],
381
+ files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
382
+ _request_timeout: Union[
383
+ None,
384
+ Annotated[StrictFloat, Field(gt=0)],
385
+ Tuple[
386
+ Annotated[StrictFloat, Field(gt=0)],
387
+ Annotated[StrictFloat, Field(gt=0)]
388
+ ]
389
+ ] = None,
390
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
391
+ _content_type: Optional[StrictStr] = None,
392
+ _headers: Optional[Dict[StrictStr, Any]] = None,
393
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
394
+ ) -> ApiResponse[str]:
395
+ """execution_context_files_upload
396
+
397
+
398
+ :param execution_id: Upload files to a running execution that is already in progress. If you want to attach files to an execution that is not yet running, see the /temp-files endpoint. (required)
399
+ :type execution_id: str
400
+ :param files: (required)
401
+ :type files: List[bytearray]
402
+ :param _request_timeout: timeout setting for this request. If one
403
+ number provided, it will be total request
404
+ timeout. It can also be a pair (tuple) of
405
+ (connection, read) timeouts.
406
+ :type _request_timeout: int, tuple(int, int), optional
407
+ :param _request_auth: set to override the auth_settings for an a single
408
+ request; this effectively ignores the
409
+ authentication in the spec for a single request.
410
+ :type _request_auth: dict, optional
411
+ :param _content_type: force content-type for the request.
412
+ :type _content_type: str, Optional
413
+ :param _headers: set to override the headers for a single
414
+ request; this effectively ignores the headers
415
+ in the spec for a single request.
416
+ :type _headers: dict, optional
417
+ :param _host_index: set to override the host_index for a single
418
+ request; this effectively ignores the host_index
419
+ in the spec for a single request.
420
+ :type _host_index: int, optional
421
+ :return: Returns the result object.
422
+ """ # noqa: E501
423
+
424
+ _param = self._execution_context_files_upload_serialize(
425
+ execution_id=execution_id,
426
+ files=files,
427
+ _request_auth=_request_auth,
428
+ _content_type=_content_type,
429
+ _headers=_headers,
430
+ _host_index=_host_index
431
+ )
432
+
433
+ _response_types_map: Dict[str, Optional[str]] = {
434
+ '200': "str",
435
+ '400': "str",
436
+ '404': "str",
437
+ }
438
+ response_data = self.api_client.call_api(
439
+ *_param,
440
+ _request_timeout=_request_timeout
441
+ )
442
+ response_data.read()
443
+ return self.api_client.response_deserialize(
444
+ response_data=response_data,
445
+ response_types_map=_response_types_map,
446
+ )
447
+
448
+
449
+ @validate_call
450
+ def execution_context_files_upload_without_preload_content(
451
+ self,
452
+ execution_id: Annotated[StrictStr, Field(description="Upload files to a running execution that is already in progress. If you want to attach files to an execution that is not yet running, see the /temp-files endpoint.")],
453
+ files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
454
+ _request_timeout: Union[
455
+ None,
456
+ Annotated[StrictFloat, Field(gt=0)],
457
+ Tuple[
458
+ Annotated[StrictFloat, Field(gt=0)],
459
+ Annotated[StrictFloat, Field(gt=0)]
460
+ ]
461
+ ] = None,
462
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
463
+ _content_type: Optional[StrictStr] = None,
464
+ _headers: Optional[Dict[StrictStr, Any]] = None,
465
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
466
+ ) -> RESTResponseType:
467
+ """execution_context_files_upload
468
+
469
+
470
+ :param execution_id: Upload files to a running execution that is already in progress. If you want to attach files to an execution that is not yet running, see the /temp-files endpoint. (required)
471
+ :type execution_id: str
472
+ :param files: (required)
473
+ :type files: List[bytearray]
474
+ :param _request_timeout: timeout setting for this request. If one
475
+ number provided, it will be total request
476
+ timeout. It can also be a pair (tuple) of
477
+ (connection, read) timeouts.
478
+ :type _request_timeout: int, tuple(int, int), optional
479
+ :param _request_auth: set to override the auth_settings for an a single
480
+ request; this effectively ignores the
481
+ authentication in the spec for a single request.
482
+ :type _request_auth: dict, optional
483
+ :param _content_type: force content-type for the request.
484
+ :type _content_type: str, Optional
485
+ :param _headers: set to override the headers for a single
486
+ request; this effectively ignores the headers
487
+ in the spec for a single request.
488
+ :type _headers: dict, optional
489
+ :param _host_index: set to override the host_index for a single
490
+ request; this effectively ignores the host_index
491
+ in the spec for a single request.
492
+ :type _host_index: int, optional
493
+ :return: Returns the result object.
494
+ """ # noqa: E501
495
+
496
+ _param = self._execution_context_files_upload_serialize(
497
+ execution_id=execution_id,
498
+ files=files,
499
+ _request_auth=_request_auth,
500
+ _content_type=_content_type,
501
+ _headers=_headers,
502
+ _host_index=_host_index
503
+ )
504
+
505
+ _response_types_map: Dict[str, Optional[str]] = {
506
+ '200': "str",
507
+ '400': "str",
508
+ '404': "str",
509
+ }
510
+ response_data = self.api_client.call_api(
511
+ *_param,
512
+ _request_timeout=_request_timeout
513
+ )
514
+ return response_data.response
515
+
516
+
517
+ def _execution_context_files_upload_serialize(
518
+ self,
519
+ execution_id,
520
+ files,
521
+ _request_auth,
522
+ _content_type,
523
+ _headers,
524
+ _host_index,
525
+ ) -> RequestSerialized:
526
+
527
+ _host = None
528
+
529
+ _collection_formats: Dict[str, str] = {
530
+ 'files': 'multi',
531
+ }
532
+
533
+ _path_params: Dict[str, str] = {}
534
+ _query_params: List[Tuple[str, str]] = []
535
+ _header_params: Dict[str, Optional[str]] = _headers or {}
536
+ _form_params: List[Tuple[str, str]] = []
537
+ _files: Dict[
538
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
539
+ ] = {}
540
+ _body_params: Optional[bytes] = None
541
+
542
+ # process the path parameters
543
+ if execution_id is not None:
544
+ _path_params['executionId'] = execution_id
545
+ # process the query parameters
546
+ # process the header parameters
547
+ # process the form parameters
548
+ if files is not None:
549
+ _files['files'] = files
550
+ # process the body parameter
551
+
552
+
553
+ # set the HTTP header `Accept`
554
+ if 'Accept' not in _header_params:
555
+ _header_params['Accept'] = self.api_client.select_header_accept(
556
+ [
557
+ 'text/plain'
558
+ ]
559
+ )
560
+
561
+ # set the HTTP header `Content-Type`
562
+ if _content_type:
563
+ _header_params['Content-Type'] = _content_type
564
+ else:
565
+ _default_content_type = (
566
+ self.api_client.select_header_content_type(
567
+ [
568
+ 'multipart/form-data'
569
+ ]
570
+ )
571
+ )
572
+ if _default_content_type is not None:
573
+ _header_params['Content-Type'] = _default_content_type
574
+
575
+ # authentication setting
576
+ _auth_settings: List[str] = [
577
+ 'ApiKeyAuth'
578
+ ]
579
+
580
+ return self.api_client.param_serialize(
581
+ method='POST',
582
+ resource_path='/executions/{executionId}/context-files',
583
+ path_params=_path_params,
584
+ query_params=_query_params,
585
+ header_params=_header_params,
586
+ body=_body_params,
587
+ post_params=_form_params,
588
+ files=_files,
589
+ auth_settings=_auth_settings,
590
+ collection_formats=_collection_formats,
591
+ _host=_host,
592
+ _request_auth=_request_auth
593
+ )
594
+
595
+
596
+
597
+
598
+ @validate_call
599
+ def temp_files_stage(
600
+ self,
601
+ organization_id: StrictStr,
602
+ files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
603
+ _request_timeout: Union[
604
+ None,
605
+ Annotated[StrictFloat, Field(gt=0)],
606
+ Tuple[
607
+ Annotated[StrictFloat, Field(gt=0)],
608
+ Annotated[StrictFloat, Field(gt=0)]
609
+ ]
610
+ ] = None,
611
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
612
+ _content_type: Optional[StrictStr] = None,
613
+ _headers: Optional[Dict[StrictStr, Any]] = None,
614
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
615
+ ) -> AgentsFilesTempFilesResponse:
616
+ """Stage a file for an execution
617
+
618
+ Stage a file prior to starting an execution, so that it can be used when the execution is started. See the /agents/{agentId}/execute to understand how to pass the returned file information to the execution endpoint.
619
+
620
+ :param organization_id: (required)
621
+ :type organization_id: str
622
+ :param files: (required)
623
+ :type files: List[bytearray]
624
+ :param _request_timeout: timeout setting for this request. If one
625
+ number provided, it will be total request
626
+ timeout. It can also be a pair (tuple) of
627
+ (connection, read) timeouts.
628
+ :type _request_timeout: int, tuple(int, int), optional
629
+ :param _request_auth: set to override the auth_settings for an a single
630
+ request; this effectively ignores the
631
+ authentication in the spec for a single request.
632
+ :type _request_auth: dict, optional
633
+ :param _content_type: force content-type for the request.
634
+ :type _content_type: str, Optional
635
+ :param _headers: set to override the headers for a single
636
+ request; this effectively ignores the headers
637
+ in the spec for a single request.
638
+ :type _headers: dict, optional
639
+ :param _host_index: set to override the host_index for a single
640
+ request; this effectively ignores the host_index
641
+ in the spec for a single request.
642
+ :type _host_index: int, optional
643
+ :return: Returns the result object.
644
+ """ # noqa: E501
645
+
646
+ _param = self._temp_files_stage_serialize(
647
+ organization_id=organization_id,
648
+ files=files,
649
+ _request_auth=_request_auth,
650
+ _content_type=_content_type,
651
+ _headers=_headers,
652
+ _host_index=_host_index
653
+ )
654
+
655
+ _response_types_map: Dict[str, Optional[str]] = {
656
+ '200': "AgentsFilesTempFilesResponse",
657
+ '400': "str",
658
+ '403': "str",
659
+ '500': "str",
660
+ }
661
+ response_data = self.api_client.call_api(
662
+ *_param,
663
+ _request_timeout=_request_timeout
664
+ )
665
+ response_data.read()
666
+ return self.api_client.response_deserialize(
667
+ response_data=response_data,
668
+ response_types_map=_response_types_map,
669
+ ).data
670
+
671
+
672
+ @validate_call
673
+ def temp_files_stage_with_http_info(
674
+ self,
675
+ organization_id: StrictStr,
676
+ files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
677
+ _request_timeout: Union[
678
+ None,
679
+ Annotated[StrictFloat, Field(gt=0)],
680
+ Tuple[
681
+ Annotated[StrictFloat, Field(gt=0)],
682
+ Annotated[StrictFloat, Field(gt=0)]
683
+ ]
684
+ ] = None,
685
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
686
+ _content_type: Optional[StrictStr] = None,
687
+ _headers: Optional[Dict[StrictStr, Any]] = None,
688
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
689
+ ) -> ApiResponse[AgentsFilesTempFilesResponse]:
690
+ """Stage a file for an execution
691
+
692
+ Stage a file prior to starting an execution, so that it can be used when the execution is started. See the /agents/{agentId}/execute to understand how to pass the returned file information to the execution endpoint.
693
+
694
+ :param organization_id: (required)
695
+ :type organization_id: str
696
+ :param files: (required)
697
+ :type files: List[bytearray]
698
+ :param _request_timeout: timeout setting for this request. If one
699
+ number provided, it will be total request
700
+ timeout. It can also be a pair (tuple) of
701
+ (connection, read) timeouts.
702
+ :type _request_timeout: int, tuple(int, int), optional
703
+ :param _request_auth: set to override the auth_settings for an a single
704
+ request; this effectively ignores the
705
+ authentication in the spec for a single request.
706
+ :type _request_auth: dict, optional
707
+ :param _content_type: force content-type for the request.
708
+ :type _content_type: str, Optional
709
+ :param _headers: set to override the headers for a single
710
+ request; this effectively ignores the headers
711
+ in the spec for a single request.
712
+ :type _headers: dict, optional
713
+ :param _host_index: set to override the host_index for a single
714
+ request; this effectively ignores the host_index
715
+ in the spec for a single request.
716
+ :type _host_index: int, optional
717
+ :return: Returns the result object.
718
+ """ # noqa: E501
719
+
720
+ _param = self._temp_files_stage_serialize(
721
+ organization_id=organization_id,
722
+ files=files,
723
+ _request_auth=_request_auth,
724
+ _content_type=_content_type,
725
+ _headers=_headers,
726
+ _host_index=_host_index
727
+ )
728
+
729
+ _response_types_map: Dict[str, Optional[str]] = {
730
+ '200': "AgentsFilesTempFilesResponse",
731
+ '400': "str",
732
+ '403': "str",
733
+ '500': "str",
734
+ }
735
+ response_data = self.api_client.call_api(
736
+ *_param,
737
+ _request_timeout=_request_timeout
738
+ )
739
+ response_data.read()
740
+ return self.api_client.response_deserialize(
741
+ response_data=response_data,
742
+ response_types_map=_response_types_map,
743
+ )
744
+
745
+
746
+ @validate_call
747
+ def temp_files_stage_without_preload_content(
748
+ self,
749
+ organization_id: StrictStr,
750
+ files: List[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]],
751
+ _request_timeout: Union[
752
+ None,
753
+ Annotated[StrictFloat, Field(gt=0)],
754
+ Tuple[
755
+ Annotated[StrictFloat, Field(gt=0)],
756
+ Annotated[StrictFloat, Field(gt=0)]
757
+ ]
758
+ ] = None,
759
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
760
+ _content_type: Optional[StrictStr] = None,
761
+ _headers: Optional[Dict[StrictStr, Any]] = None,
762
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
763
+ ) -> RESTResponseType:
764
+ """Stage a file for an execution
765
+
766
+ Stage a file prior to starting an execution, so that it can be used when the execution is started. See the /agents/{agentId}/execute to understand how to pass the returned file information to the execution endpoint.
767
+
768
+ :param organization_id: (required)
769
+ :type organization_id: str
770
+ :param files: (required)
771
+ :type files: List[bytearray]
772
+ :param _request_timeout: timeout setting for this request. If one
773
+ number provided, it will be total request
774
+ timeout. It can also be a pair (tuple) of
775
+ (connection, read) timeouts.
776
+ :type _request_timeout: int, tuple(int, int), optional
777
+ :param _request_auth: set to override the auth_settings for an a single
778
+ request; this effectively ignores the
779
+ authentication in the spec for a single request.
780
+ :type _request_auth: dict, optional
781
+ :param _content_type: force content-type for the request.
782
+ :type _content_type: str, Optional
783
+ :param _headers: set to override the headers for a single
784
+ request; this effectively ignores the headers
785
+ in the spec for a single request.
786
+ :type _headers: dict, optional
787
+ :param _host_index: set to override the host_index for a single
788
+ request; this effectively ignores the host_index
789
+ in the spec for a single request.
790
+ :type _host_index: int, optional
791
+ :return: Returns the result object.
792
+ """ # noqa: E501
793
+
794
+ _param = self._temp_files_stage_serialize(
795
+ organization_id=organization_id,
796
+ files=files,
797
+ _request_auth=_request_auth,
798
+ _content_type=_content_type,
799
+ _headers=_headers,
800
+ _host_index=_host_index
801
+ )
802
+
803
+ _response_types_map: Dict[str, Optional[str]] = {
804
+ '200': "AgentsFilesTempFilesResponse",
805
+ '400': "str",
806
+ '403': "str",
807
+ '500': "str",
808
+ }
809
+ response_data = self.api_client.call_api(
810
+ *_param,
811
+ _request_timeout=_request_timeout
812
+ )
813
+ return response_data.response
814
+
815
+
816
+ def _temp_files_stage_serialize(
817
+ self,
818
+ organization_id,
819
+ files,
820
+ _request_auth,
821
+ _content_type,
822
+ _headers,
823
+ _host_index,
824
+ ) -> RequestSerialized:
825
+
826
+ _host = None
827
+
828
+ _collection_formats: Dict[str, str] = {
829
+ 'files': 'multi',
830
+ }
831
+
832
+ _path_params: Dict[str, str] = {}
833
+ _query_params: List[Tuple[str, str]] = []
834
+ _header_params: Dict[str, Optional[str]] = _headers or {}
835
+ _form_params: List[Tuple[str, str]] = []
836
+ _files: Dict[
837
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
838
+ ] = {}
839
+ _body_params: Optional[bytes] = None
840
+
841
+ # process the path parameters
842
+ if organization_id is not None:
843
+ _path_params['organizationId'] = organization_id
844
+ # process the query parameters
845
+ # process the header parameters
846
+ # process the form parameters
847
+ if files is not None:
848
+ _files['files'] = files
849
+ # process the body parameter
850
+
851
+
852
+ # set the HTTP header `Accept`
853
+ if 'Accept' not in _header_params:
854
+ _header_params['Accept'] = self.api_client.select_header_accept(
855
+ [
856
+ 'application/json',
857
+ 'text/plain'
858
+ ]
859
+ )
860
+
861
+ # set the HTTP header `Content-Type`
862
+ if _content_type:
863
+ _header_params['Content-Type'] = _content_type
864
+ else:
865
+ _default_content_type = (
866
+ self.api_client.select_header_content_type(
867
+ [
868
+ 'multipart/form-data'
869
+ ]
870
+ )
871
+ )
872
+ if _default_content_type is not None:
873
+ _header_params['Content-Type'] = _default_content_type
874
+
875
+ # authentication setting
876
+ _auth_settings: List[str] = [
877
+ 'ApiKeyAuth'
878
+ ]
879
+
880
+ return self.api_client.param_serialize(
881
+ method='POST',
882
+ resource_path='/temp-files/{organizationId}',
883
+ path_params=_path_params,
884
+ query_params=_query_params,
885
+ header_params=_header_params,
886
+ body=_body_params,
887
+ post_params=_form_params,
888
+ files=_files,
889
+ auth_settings=_auth_settings,
890
+ collection_formats=_collection_formats,
891
+ _host=_host,
892
+ _request_auth=_request_auth
893
+ )
894
+
895
+