asteroid-odyssey 1.1.0__py3-none-any.whl → 1.2.1__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 (76) hide show
  1. asteroid_odyssey/__init__.py +10 -2
  2. asteroid_odyssey/agents_v1_gen/__init__.py +87 -0
  3. asteroid_odyssey/agents_v1_gen/api/__init__.py +7 -0
  4. asteroid_odyssey/agents_v1_gen/api/agent_profile_api.py +1696 -0
  5. asteroid_odyssey/{openapi_client → agents_v1_gen}/api/api_api.py +4 -4
  6. asteroid_odyssey/{openapi_client → agents_v1_gen}/api/execution_api.py +10 -10
  7. asteroid_odyssey/{openapi_client → agents_v1_gen}/api_client.py +6 -6
  8. asteroid_odyssey/{openapi_client → agents_v1_gen}/configuration.py +2 -2
  9. asteroid_odyssey/agents_v1_gen/models/__init__.py +34 -0
  10. asteroid_odyssey/agents_v1_gen/models/agent_profile.py +118 -0
  11. asteroid_odyssey/agents_v1_gen/models/country_code.py +44 -0
  12. asteroid_odyssey/agents_v1_gen/models/create_agent_profile_request.py +112 -0
  13. asteroid_odyssey/agents_v1_gen/models/credential.py +95 -0
  14. asteroid_odyssey/agents_v1_gen/models/delete_agent_profile200_response.py +87 -0
  15. asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_result_response.py +2 -2
  16. asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_status_response.py +1 -1
  17. asteroid_odyssey/agents_v1_gen/models/proxy_type.py +37 -0
  18. asteroid_odyssey/agents_v1_gen/models/update_agent_profile_request.py +112 -0
  19. asteroid_odyssey/{openapi_client → agents_v1_gen}/rest.py +1 -1
  20. asteroid_odyssey/agents_v2_gen/__init__.py +99 -0
  21. asteroid_odyssey/agents_v2_gen/api/__init__.py +5 -0
  22. asteroid_odyssey/agents_v2_gen/api/execution_api.py +625 -0
  23. asteroid_odyssey/agents_v2_gen/api_client.py +801 -0
  24. asteroid_odyssey/agents_v2_gen/api_response.py +21 -0
  25. asteroid_odyssey/agents_v2_gen/configuration.py +612 -0
  26. asteroid_odyssey/agents_v2_gen/exceptions.py +216 -0
  27. asteroid_odyssey/agents_v2_gen/models/__init__.py +42 -0
  28. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_completed.py +100 -0
  29. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_failed.py +100 -0
  30. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_action_started.py +100 -0
  31. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_generic.py +100 -0
  32. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_status_changed.py +100 -0
  33. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_completed.py +100 -0
  34. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_step_started.py +100 -0
  35. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_terminal.py +100 -0
  36. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_transitioned_node.py +100 -0
  37. asteroid_odyssey/agents_v2_gen/models/activity_payload_union_user_message_received.py +100 -0
  38. asteroid_odyssey/agents_v2_gen/models/error.py +89 -0
  39. asteroid_odyssey/agents_v2_gen/models/execution_activity.py +98 -0
  40. asteroid_odyssey/agents_v2_gen/models/execution_activity_action_completed_payload.py +87 -0
  41. asteroid_odyssey/agents_v2_gen/models/execution_activity_action_failed_payload.py +87 -0
  42. asteroid_odyssey/agents_v2_gen/models/execution_activity_action_started_payload.py +87 -0
  43. asteroid_odyssey/agents_v2_gen/models/execution_activity_generic_payload.py +87 -0
  44. asteroid_odyssey/agents_v2_gen/models/execution_activity_payload_union.py +252 -0
  45. asteroid_odyssey/agents_v2_gen/models/execution_activity_status_changed_payload.py +88 -0
  46. asteroid_odyssey/agents_v2_gen/models/execution_activity_step_completed_payload.py +87 -0
  47. asteroid_odyssey/agents_v2_gen/models/execution_activity_step_started_payload.py +87 -0
  48. asteroid_odyssey/agents_v2_gen/models/execution_activity_transitioned_node_payload.py +89 -0
  49. asteroid_odyssey/agents_v2_gen/models/execution_activity_user_message_received_payload.py +89 -0
  50. asteroid_odyssey/agents_v2_gen/models/execution_status.py +43 -0
  51. asteroid_odyssey/agents_v2_gen/models/execution_terminal_payload.py +96 -0
  52. asteroid_odyssey/agents_v2_gen/models/execution_user_messages_add_text_body.py +87 -0
  53. asteroid_odyssey/agents_v2_gen/models/versions.py +37 -0
  54. asteroid_odyssey/agents_v2_gen/py.typed +0 -0
  55. asteroid_odyssey/agents_v2_gen/rest.py +258 -0
  56. asteroid_odyssey/client.py +635 -123
  57. {asteroid_odyssey-1.1.0.dist-info → asteroid_odyssey-1.2.1.dist-info}/METADATA +2 -1
  58. asteroid_odyssey-1.2.1.dist-info/RECORD +72 -0
  59. asteroid_odyssey/openapi_client/__init__.py +0 -71
  60. asteroid_odyssey/openapi_client/api/__init__.py +0 -6
  61. asteroid_odyssey/openapi_client/models/__init__.py +0 -27
  62. asteroid_odyssey-1.1.0.dist-info/RECORD +0 -28
  63. /asteroid_odyssey/{openapi_client → agents_v1_gen}/api_response.py +0 -0
  64. /asteroid_odyssey/{openapi_client → agents_v1_gen}/exceptions.py +0 -0
  65. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/browser_session_recording_response.py +0 -0
  66. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/error_response.py +0 -0
  67. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_response.py +0 -0
  68. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/execution_result.py +0 -0
  69. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/health_check200_response.py +0 -0
  70. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/health_check500_response.py +0 -0
  71. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/status.py +0 -0
  72. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/structured_agent_execution_request.py +0 -0
  73. /asteroid_odyssey/{openapi_client → agents_v1_gen}/models/upload_execution_files200_response.py +0 -0
  74. /asteroid_odyssey/{openapi_client → agents_v1_gen}/py.typed +0 -0
  75. {asteroid_odyssey-1.1.0.dist-info → asteroid_odyssey-1.2.1.dist-info}/WHEEL +0 -0
  76. {asteroid_odyssey-1.1.0.dist-info → asteroid_odyssey-1.2.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,625 @@
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: v2
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, StrictInt, StrictStr, field_validator
20
+ from typing import List, Optional
21
+ from typing_extensions import Annotated
22
+ from asteroid_odyssey.agents_v2_gen.models.execution_activity import ExecutionActivity
23
+ from asteroid_odyssey.agents_v2_gen.models.execution_user_messages_add_text_body import ExecutionUserMessagesAddTextBody
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 ExecutionApi:
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 activities_get(
45
+ self,
46
+ execution_id: Annotated[StrictStr, Field(description="The unique identifier of the execution")],
47
+ order: Annotated[Optional[StrictStr], Field(description="Sort order for activities by timestamp")] = None,
48
+ limit: Annotated[Optional[StrictInt], Field(description="Maximum number of activities to return")] = None,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)],
54
+ Annotated[StrictFloat, Field(gt=0)]
55
+ ]
56
+ ] = None,
57
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
58
+ _content_type: Optional[StrictStr] = None,
59
+ _headers: Optional[Dict[StrictStr, Any]] = None,
60
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
61
+ ) -> List[ExecutionActivity]:
62
+ """Retrieve execution activities
63
+
64
+ Get activities for an execution
65
+
66
+ :param execution_id: The unique identifier of the execution (required)
67
+ :type execution_id: str
68
+ :param order: Sort order for activities by timestamp
69
+ :type order: str
70
+ :param limit: Maximum number of activities to return
71
+ :type limit: int
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._activities_get_serialize(
95
+ execution_id=execution_id,
96
+ order=order,
97
+ limit=limit,
98
+ _request_auth=_request_auth,
99
+ _content_type=_content_type,
100
+ _headers=_headers,
101
+ _host_index=_host_index
102
+ )
103
+
104
+ _response_types_map: Dict[str, Optional[str]] = {
105
+ '200': "List[ExecutionActivity]",
106
+ }
107
+ response_data = self.api_client.call_api(
108
+ *_param,
109
+ _request_timeout=_request_timeout
110
+ )
111
+ response_data.read()
112
+ return self.api_client.response_deserialize(
113
+ response_data=response_data,
114
+ response_types_map=_response_types_map,
115
+ ).data
116
+
117
+
118
+ @validate_call
119
+ def activities_get_with_http_info(
120
+ self,
121
+ execution_id: Annotated[StrictStr, Field(description="The unique identifier of the execution")],
122
+ order: Annotated[Optional[StrictStr], Field(description="Sort order for activities by timestamp")] = None,
123
+ limit: Annotated[Optional[StrictInt], Field(description="Maximum number of activities to return")] = None,
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Annotated[StrictFloat, Field(gt=0)]
130
+ ]
131
+ ] = None,
132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
+ _content_type: Optional[StrictStr] = None,
134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
+ ) -> ApiResponse[List[ExecutionActivity]]:
137
+ """Retrieve execution activities
138
+
139
+ Get activities for an execution
140
+
141
+ :param execution_id: The unique identifier of the execution (required)
142
+ :type execution_id: str
143
+ :param order: Sort order for activities by timestamp
144
+ :type order: str
145
+ :param limit: Maximum number of activities to return
146
+ :type limit: int
147
+ :param _request_timeout: timeout setting for this request. If one
148
+ number provided, it will be total request
149
+ timeout. It can also be a pair (tuple) of
150
+ (connection, read) timeouts.
151
+ :type _request_timeout: int, tuple(int, int), optional
152
+ :param _request_auth: set to override the auth_settings for an a single
153
+ request; this effectively ignores the
154
+ authentication in the spec for a single request.
155
+ :type _request_auth: dict, optional
156
+ :param _content_type: force content-type for the request.
157
+ :type _content_type: str, Optional
158
+ :param _headers: set to override the headers for a single
159
+ request; this effectively ignores the headers
160
+ in the spec for a single request.
161
+ :type _headers: dict, optional
162
+ :param _host_index: set to override the host_index for a single
163
+ request; this effectively ignores the host_index
164
+ in the spec for a single request.
165
+ :type _host_index: int, optional
166
+ :return: Returns the result object.
167
+ """ # noqa: E501
168
+
169
+ _param = self._activities_get_serialize(
170
+ execution_id=execution_id,
171
+ order=order,
172
+ limit=limit,
173
+ _request_auth=_request_auth,
174
+ _content_type=_content_type,
175
+ _headers=_headers,
176
+ _host_index=_host_index
177
+ )
178
+
179
+ _response_types_map: Dict[str, Optional[str]] = {
180
+ '200': "List[ExecutionActivity]",
181
+ }
182
+ response_data = self.api_client.call_api(
183
+ *_param,
184
+ _request_timeout=_request_timeout
185
+ )
186
+ response_data.read()
187
+ return self.api_client.response_deserialize(
188
+ response_data=response_data,
189
+ response_types_map=_response_types_map,
190
+ )
191
+
192
+
193
+ @validate_call
194
+ def activities_get_without_preload_content(
195
+ self,
196
+ execution_id: Annotated[StrictStr, Field(description="The unique identifier of the execution")],
197
+ order: Annotated[Optional[StrictStr], Field(description="Sort order for activities by timestamp")] = None,
198
+ limit: Annotated[Optional[StrictInt], Field(description="Maximum number of activities to return")] = None,
199
+ _request_timeout: Union[
200
+ None,
201
+ Annotated[StrictFloat, Field(gt=0)],
202
+ Tuple[
203
+ Annotated[StrictFloat, Field(gt=0)],
204
+ Annotated[StrictFloat, Field(gt=0)]
205
+ ]
206
+ ] = None,
207
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
208
+ _content_type: Optional[StrictStr] = None,
209
+ _headers: Optional[Dict[StrictStr, Any]] = None,
210
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
211
+ ) -> RESTResponseType:
212
+ """Retrieve execution activities
213
+
214
+ Get activities for an execution
215
+
216
+ :param execution_id: The unique identifier of the execution (required)
217
+ :type execution_id: str
218
+ :param order: Sort order for activities by timestamp
219
+ :type order: str
220
+ :param limit: Maximum number of activities to return
221
+ :type limit: int
222
+ :param _request_timeout: timeout setting for this request. If one
223
+ number provided, it will be total request
224
+ timeout. It can also be a pair (tuple) of
225
+ (connection, read) timeouts.
226
+ :type _request_timeout: int, tuple(int, int), optional
227
+ :param _request_auth: set to override the auth_settings for an a single
228
+ request; this effectively ignores the
229
+ authentication in the spec for a single request.
230
+ :type _request_auth: dict, optional
231
+ :param _content_type: force content-type for the request.
232
+ :type _content_type: str, Optional
233
+ :param _headers: set to override the headers for a single
234
+ request; this effectively ignores the headers
235
+ in the spec for a single request.
236
+ :type _headers: dict, optional
237
+ :param _host_index: set to override the host_index for a single
238
+ request; this effectively ignores the host_index
239
+ in the spec for a single request.
240
+ :type _host_index: int, optional
241
+ :return: Returns the result object.
242
+ """ # noqa: E501
243
+
244
+ _param = self._activities_get_serialize(
245
+ execution_id=execution_id,
246
+ order=order,
247
+ limit=limit,
248
+ _request_auth=_request_auth,
249
+ _content_type=_content_type,
250
+ _headers=_headers,
251
+ _host_index=_host_index
252
+ )
253
+
254
+ _response_types_map: Dict[str, Optional[str]] = {
255
+ '200': "List[ExecutionActivity]",
256
+ }
257
+ response_data = self.api_client.call_api(
258
+ *_param,
259
+ _request_timeout=_request_timeout
260
+ )
261
+ return response_data.response
262
+
263
+
264
+ def _activities_get_serialize(
265
+ self,
266
+ execution_id,
267
+ order,
268
+ limit,
269
+ _request_auth,
270
+ _content_type,
271
+ _headers,
272
+ _host_index,
273
+ ) -> RequestSerialized:
274
+
275
+ _host = None
276
+
277
+ _collection_formats: Dict[str, str] = {
278
+ }
279
+
280
+ _path_params: Dict[str, str] = {}
281
+ _query_params: List[Tuple[str, str]] = []
282
+ _header_params: Dict[str, Optional[str]] = _headers or {}
283
+ _form_params: List[Tuple[str, str]] = []
284
+ _files: Dict[
285
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
286
+ ] = {}
287
+ _body_params: Optional[bytes] = None
288
+
289
+ # process the path parameters
290
+ if execution_id is not None:
291
+ _path_params['executionId'] = execution_id
292
+ # process the query parameters
293
+ if order is not None:
294
+
295
+ _query_params.append(('order', order))
296
+
297
+ if limit is not None:
298
+
299
+ _query_params.append(('limit', limit))
300
+
301
+ # process the header parameters
302
+ # process the form parameters
303
+ # process the body parameter
304
+
305
+
306
+ # set the HTTP header `Accept`
307
+ if 'Accept' not in _header_params:
308
+ _header_params['Accept'] = self.api_client.select_header_accept(
309
+ [
310
+ 'application/json'
311
+ ]
312
+ )
313
+
314
+
315
+ # authentication setting
316
+ _auth_settings: List[str] = [
317
+ 'ApiKeyAuth'
318
+ ]
319
+
320
+ return self.api_client.param_serialize(
321
+ method='GET',
322
+ resource_path='/executions/{executionId}/activities',
323
+ path_params=_path_params,
324
+ query_params=_query_params,
325
+ header_params=_header_params,
326
+ body=_body_params,
327
+ post_params=_form_params,
328
+ files=_files,
329
+ auth_settings=_auth_settings,
330
+ collection_formats=_collection_formats,
331
+ _host=_host,
332
+ _request_auth=_request_auth
333
+ )
334
+
335
+
336
+
337
+
338
+ @validate_call
339
+ def user_messages_add(
340
+ self,
341
+ execution_id: Annotated[StrictStr, Field(description="The unique identifier of the execution")],
342
+ execution_user_messages_add_text_body: Annotated[ExecutionUserMessagesAddTextBody, Field(description="The message content to send")],
343
+ _request_timeout: Union[
344
+ None,
345
+ Annotated[StrictFloat, Field(gt=0)],
346
+ Tuple[
347
+ Annotated[StrictFloat, Field(gt=0)],
348
+ Annotated[StrictFloat, Field(gt=0)]
349
+ ]
350
+ ] = None,
351
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
352
+ _content_type: Optional[StrictStr] = None,
353
+ _headers: Optional[Dict[StrictStr, Any]] = None,
354
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
355
+ ) -> str:
356
+ """Send user message to execution
357
+
358
+ Add a user message to an execution
359
+
360
+ :param execution_id: The unique identifier of the execution (required)
361
+ :type execution_id: str
362
+ :param execution_user_messages_add_text_body: The message content to send (required)
363
+ :type execution_user_messages_add_text_body: ExecutionUserMessagesAddTextBody
364
+ :param _request_timeout: timeout setting for this request. If one
365
+ number provided, it will be total request
366
+ timeout. It can also be a pair (tuple) of
367
+ (connection, read) timeouts.
368
+ :type _request_timeout: int, tuple(int, int), optional
369
+ :param _request_auth: set to override the auth_settings for an a single
370
+ request; this effectively ignores the
371
+ authentication in the spec for a single request.
372
+ :type _request_auth: dict, optional
373
+ :param _content_type: force content-type for the request.
374
+ :type _content_type: str, Optional
375
+ :param _headers: set to override the headers for a single
376
+ request; this effectively ignores the headers
377
+ in the spec for a single request.
378
+ :type _headers: dict, optional
379
+ :param _host_index: set to override the host_index for a single
380
+ request; this effectively ignores the host_index
381
+ in the spec for a single request.
382
+ :type _host_index: int, optional
383
+ :return: Returns the result object.
384
+ """ # noqa: E501
385
+
386
+ _param = self._user_messages_add_serialize(
387
+ execution_id=execution_id,
388
+ execution_user_messages_add_text_body=execution_user_messages_add_text_body,
389
+ _request_auth=_request_auth,
390
+ _content_type=_content_type,
391
+ _headers=_headers,
392
+ _host_index=_host_index
393
+ )
394
+
395
+ _response_types_map: Dict[str, Optional[str]] = {
396
+ '201': "str",
397
+ }
398
+ response_data = self.api_client.call_api(
399
+ *_param,
400
+ _request_timeout=_request_timeout
401
+ )
402
+ response_data.read()
403
+ return self.api_client.response_deserialize(
404
+ response_data=response_data,
405
+ response_types_map=_response_types_map,
406
+ ).data
407
+
408
+
409
+ @validate_call
410
+ def user_messages_add_with_http_info(
411
+ self,
412
+ execution_id: Annotated[StrictStr, Field(description="The unique identifier of the execution")],
413
+ execution_user_messages_add_text_body: Annotated[ExecutionUserMessagesAddTextBody, Field(description="The message content to send")],
414
+ _request_timeout: Union[
415
+ None,
416
+ Annotated[StrictFloat, Field(gt=0)],
417
+ Tuple[
418
+ Annotated[StrictFloat, Field(gt=0)],
419
+ Annotated[StrictFloat, Field(gt=0)]
420
+ ]
421
+ ] = None,
422
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
423
+ _content_type: Optional[StrictStr] = None,
424
+ _headers: Optional[Dict[StrictStr, Any]] = None,
425
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
426
+ ) -> ApiResponse[str]:
427
+ """Send user message to execution
428
+
429
+ Add a user message to an execution
430
+
431
+ :param execution_id: The unique identifier of the execution (required)
432
+ :type execution_id: str
433
+ :param execution_user_messages_add_text_body: The message content to send (required)
434
+ :type execution_user_messages_add_text_body: ExecutionUserMessagesAddTextBody
435
+ :param _request_timeout: timeout setting for this request. If one
436
+ number provided, it will be total request
437
+ timeout. It can also be a pair (tuple) of
438
+ (connection, read) timeouts.
439
+ :type _request_timeout: int, tuple(int, int), optional
440
+ :param _request_auth: set to override the auth_settings for an a single
441
+ request; this effectively ignores the
442
+ authentication in the spec for a single request.
443
+ :type _request_auth: dict, optional
444
+ :param _content_type: force content-type for the request.
445
+ :type _content_type: str, Optional
446
+ :param _headers: set to override the headers for a single
447
+ request; this effectively ignores the headers
448
+ in the spec for a single request.
449
+ :type _headers: dict, optional
450
+ :param _host_index: set to override the host_index for a single
451
+ request; this effectively ignores the host_index
452
+ in the spec for a single request.
453
+ :type _host_index: int, optional
454
+ :return: Returns the result object.
455
+ """ # noqa: E501
456
+
457
+ _param = self._user_messages_add_serialize(
458
+ execution_id=execution_id,
459
+ execution_user_messages_add_text_body=execution_user_messages_add_text_body,
460
+ _request_auth=_request_auth,
461
+ _content_type=_content_type,
462
+ _headers=_headers,
463
+ _host_index=_host_index
464
+ )
465
+
466
+ _response_types_map: Dict[str, Optional[str]] = {
467
+ '201': "str",
468
+ }
469
+ response_data = self.api_client.call_api(
470
+ *_param,
471
+ _request_timeout=_request_timeout
472
+ )
473
+ response_data.read()
474
+ return self.api_client.response_deserialize(
475
+ response_data=response_data,
476
+ response_types_map=_response_types_map,
477
+ )
478
+
479
+
480
+ @validate_call
481
+ def user_messages_add_without_preload_content(
482
+ self,
483
+ execution_id: Annotated[StrictStr, Field(description="The unique identifier of the execution")],
484
+ execution_user_messages_add_text_body: Annotated[ExecutionUserMessagesAddTextBody, Field(description="The message content to send")],
485
+ _request_timeout: Union[
486
+ None,
487
+ Annotated[StrictFloat, Field(gt=0)],
488
+ Tuple[
489
+ Annotated[StrictFloat, Field(gt=0)],
490
+ Annotated[StrictFloat, Field(gt=0)]
491
+ ]
492
+ ] = None,
493
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
494
+ _content_type: Optional[StrictStr] = None,
495
+ _headers: Optional[Dict[StrictStr, Any]] = None,
496
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
497
+ ) -> RESTResponseType:
498
+ """Send user message to execution
499
+
500
+ Add a user message to an execution
501
+
502
+ :param execution_id: The unique identifier of the execution (required)
503
+ :type execution_id: str
504
+ :param execution_user_messages_add_text_body: The message content to send (required)
505
+ :type execution_user_messages_add_text_body: ExecutionUserMessagesAddTextBody
506
+ :param _request_timeout: timeout setting for this request. If one
507
+ number provided, it will be total request
508
+ timeout. It can also be a pair (tuple) of
509
+ (connection, read) timeouts.
510
+ :type _request_timeout: int, tuple(int, int), optional
511
+ :param _request_auth: set to override the auth_settings for an a single
512
+ request; this effectively ignores the
513
+ authentication in the spec for a single request.
514
+ :type _request_auth: dict, optional
515
+ :param _content_type: force content-type for the request.
516
+ :type _content_type: str, Optional
517
+ :param _headers: set to override the headers for a single
518
+ request; this effectively ignores the headers
519
+ in the spec for a single request.
520
+ :type _headers: dict, optional
521
+ :param _host_index: set to override the host_index for a single
522
+ request; this effectively ignores the host_index
523
+ in the spec for a single request.
524
+ :type _host_index: int, optional
525
+ :return: Returns the result object.
526
+ """ # noqa: E501
527
+
528
+ _param = self._user_messages_add_serialize(
529
+ execution_id=execution_id,
530
+ execution_user_messages_add_text_body=execution_user_messages_add_text_body,
531
+ _request_auth=_request_auth,
532
+ _content_type=_content_type,
533
+ _headers=_headers,
534
+ _host_index=_host_index
535
+ )
536
+
537
+ _response_types_map: Dict[str, Optional[str]] = {
538
+ '201': "str",
539
+ }
540
+ response_data = self.api_client.call_api(
541
+ *_param,
542
+ _request_timeout=_request_timeout
543
+ )
544
+ return response_data.response
545
+
546
+
547
+ def _user_messages_add_serialize(
548
+ self,
549
+ execution_id,
550
+ execution_user_messages_add_text_body,
551
+ _request_auth,
552
+ _content_type,
553
+ _headers,
554
+ _host_index,
555
+ ) -> RequestSerialized:
556
+
557
+ _host = None
558
+
559
+ _collection_formats: Dict[str, str] = {
560
+ }
561
+
562
+ _path_params: Dict[str, str] = {}
563
+ _query_params: List[Tuple[str, str]] = []
564
+ _header_params: Dict[str, Optional[str]] = _headers or {}
565
+ _form_params: List[Tuple[str, str]] = []
566
+ _files: Dict[
567
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
568
+ ] = {}
569
+ _body_params: Optional[bytes] = None
570
+
571
+ # process the path parameters
572
+ if execution_id is not None:
573
+ _path_params['executionId'] = execution_id
574
+ # process the query parameters
575
+ # process the header parameters
576
+ # process the form parameters
577
+ # process the body parameter
578
+ if execution_user_messages_add_text_body is not None:
579
+ _body_params = execution_user_messages_add_text_body
580
+
581
+
582
+ # set the HTTP header `Accept`
583
+ if 'Accept' not in _header_params:
584
+ _header_params['Accept'] = self.api_client.select_header_accept(
585
+ [
586
+ 'text/plain',
587
+ 'application/json'
588
+ ]
589
+ )
590
+
591
+ # set the HTTP header `Content-Type`
592
+ if _content_type:
593
+ _header_params['Content-Type'] = _content_type
594
+ else:
595
+ _default_content_type = (
596
+ self.api_client.select_header_content_type(
597
+ [
598
+ 'application/json'
599
+ ]
600
+ )
601
+ )
602
+ if _default_content_type is not None:
603
+ _header_params['Content-Type'] = _default_content_type
604
+
605
+ # authentication setting
606
+ _auth_settings: List[str] = [
607
+ 'ApiKeyAuth'
608
+ ]
609
+
610
+ return self.api_client.param_serialize(
611
+ method='POST',
612
+ resource_path='/executions/{executionId}/user-messages',
613
+ path_params=_path_params,
614
+ query_params=_query_params,
615
+ header_params=_header_params,
616
+ body=_body_params,
617
+ post_params=_form_params,
618
+ files=_files,
619
+ auth_settings=_auth_settings,
620
+ collection_formats=_collection_formats,
621
+ _host=_host,
622
+ _request_auth=_request_auth
623
+ )
624
+
625
+