asteroid-odyssey 0.1.21__py3-none-any.whl → 1.0.0__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.
- asteroid_odyssey/__init__.py +20 -34
- asteroid_odyssey/client.py +387 -337
- asteroid_odyssey/openapi_client/__init__.py +73 -0
- asteroid_odyssey/openapi_client/api/__init__.py +7 -0
- asteroid_odyssey/openapi_client/api/api_api.py +516 -0
- asteroid_odyssey/openapi_client/api/execution_api.py +335 -0
- asteroid_odyssey/openapi_client/api/sdk_api.py +1434 -0
- asteroid_odyssey/openapi_client/api_client.py +801 -0
- asteroid_odyssey/openapi_client/api_response.py +21 -0
- asteroid_odyssey/openapi_client/configuration.py +606 -0
- asteroid_odyssey/openapi_client/exceptions.py +216 -0
- asteroid_odyssey/openapi_client/models/__init__.py +27 -0
- asteroid_odyssey/openapi_client/models/browser_session_recording_response.py +87 -0
- asteroid_odyssey/openapi_client/models/error_response.py +87 -0
- asteroid_odyssey/openapi_client/models/execution_response.py +87 -0
- asteroid_odyssey/openapi_client/models/execution_result.py +101 -0
- asteroid_odyssey/openapi_client/models/execution_result_response.py +100 -0
- asteroid_odyssey/openapi_client/models/execution_status_response.py +95 -0
- asteroid_odyssey/openapi_client/models/health_check200_response.py +87 -0
- asteroid_odyssey/openapi_client/models/health_check500_response.py +87 -0
- asteroid_odyssey/openapi_client/models/status.py +43 -0
- asteroid_odyssey/openapi_client/models/structured_agent_execution_request.py +89 -0
- asteroid_odyssey/openapi_client/models/upload_execution_files200_response.py +89 -0
- asteroid_odyssey/openapi_client/rest.py +258 -0
- asteroid_odyssey-1.0.0.dist-info/METADATA +208 -0
- asteroid_odyssey-1.0.0.dist-info/RECORD +29 -0
- {asteroid_odyssey-0.1.21.dist-info → asteroid_odyssey-1.0.0.dist-info}/WHEEL +1 -1
- asteroid_odyssey/api/generated/asteroid_agents_api_client/__init__.py +0 -8
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/__init__.py +0 -1
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/agent/get_agents.py +0 -127
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/api/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/api/get_open_api.py +0 -79
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/api/health_check.py +0 -131
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/credentials/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/credentials/get_credentials_public_key.py +0 -127
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/delete_execution.py +0 -156
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_browser_session.py +0 -154
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_execution.py +0 -154
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_execution_files.py +0 -159
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_execution_progress.py +0 -159
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/get_executions_for_workflow.py +0 -156
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/execution/update_execution_status.py +0 -115
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/notifications/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/notifications/set_slack_channel.py +0 -107
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/optimiser/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/optimiser/queue_optimisation_job.py +0 -103
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/__init__.py +0 -0
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/add_workflow_credential.py +0 -111
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/create_workflow.py +0 -174
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/delete_workflow.py +0 -156
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/delete_workflow_credentials.py +0 -96
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/execute_workflow.py +0 -179
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_agent_workflow_executions.py +0 -155
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_workflow.py +0 -154
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_workflow_credentials.py +0 -154
- asteroid_odyssey/api/generated/asteroid_agents_api_client/api/workflow/get_workflow_versions.py +0 -159
- asteroid_odyssey/api/generated/asteroid_agents_api_client/client.py +0 -268
- asteroid_odyssey/api/generated/asteroid_agents_api_client/errors.py +0 -16
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/__init__.py +0 -61
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/agent.py +0 -90
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/browser_session.py +0 -136
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/create_workflow_request.py +0 -126
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/create_workflow_request_fields.py +0 -48
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/create_workflow_request_provider.py +0 -9
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/credential.py +0 -66
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/credentials_request.py +0 -72
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/credentials_response.py +0 -80
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_execution_response_200.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_execution_response_404.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_workflow_response_200.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/delete_workflow_response_404.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution.py +0 -147
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution_dynamic_data.py +0 -48
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution_result.py +0 -43
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/execution_status.py +0 -89
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/file.py +0 -127
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/health_check_response_200.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/health_check_response_500.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/optimisation_request.py +0 -59
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/progress_update.py +0 -77
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/result_schema.py +0 -51
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/slack_channel_request.py +0 -58
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/status.py +0 -13
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow.py +0 -152
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_execution.py +0 -82
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_execution_request.py +0 -48
- asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_fields.py +0 -48
- asteroid_odyssey/api/generated/asteroid_agents_api_client/py.typed +0 -1
- asteroid_odyssey/api/generated/asteroid_agents_api_client/types.py +0 -45
- asteroid_odyssey/exceptions.py +0 -15
- asteroid_odyssey-0.1.21.dist-info/METADATA +0 -31
- asteroid_odyssey-0.1.21.dist-info/RECORD +0 -72
- asteroid_odyssey-0.1.21.dist-info/entry_points.txt +0 -2
- /asteroid_odyssey/{api/generated/asteroid_agents_api_client/api/agent/__init__.py → openapi_client/py.typed} +0 -0
- {asteroid_odyssey-0.1.21.dist-info → asteroid_odyssey-1.0.0.dist-info}/top_level.txt +0 -0
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, Optional, Union
|
|
3
|
-
from uuid import UUID
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from ... import errors
|
|
8
|
-
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...models.delete_workflow_response_200 import DeleteWorkflowResponse200
|
|
10
|
-
from ...models.delete_workflow_response_404 import DeleteWorkflowResponse404
|
|
11
|
-
from ...types import Response
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def _get_kwargs(
|
|
15
|
-
workflow_id: UUID,
|
|
16
|
-
) -> Dict[str, Any]:
|
|
17
|
-
_kwargs: Dict[str, Any] = {
|
|
18
|
-
"method": "delete",
|
|
19
|
-
"url": f"/workflow/{workflow_id}",
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return _kwargs
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def _parse_response(
|
|
26
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
27
|
-
) -> Optional[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
28
|
-
if response.status_code == 200:
|
|
29
|
-
response_200 = DeleteWorkflowResponse200.from_dict(response.json())
|
|
30
|
-
|
|
31
|
-
return response_200
|
|
32
|
-
if response.status_code == 404:
|
|
33
|
-
response_404 = DeleteWorkflowResponse404.from_dict(response.json())
|
|
34
|
-
|
|
35
|
-
return response_404
|
|
36
|
-
if client.raise_on_unexpected_status:
|
|
37
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
38
|
-
else:
|
|
39
|
-
return None
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
def _build_response(
|
|
43
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
44
|
-
) -> Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
45
|
-
return Response(
|
|
46
|
-
status_code=HTTPStatus(response.status_code),
|
|
47
|
-
content=response.content,
|
|
48
|
-
headers=response.headers,
|
|
49
|
-
parsed=_parse_response(client=client, response=response),
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
def sync_detailed(
|
|
54
|
-
workflow_id: UUID,
|
|
55
|
-
*,
|
|
56
|
-
client: Union[AuthenticatedClient, Client],
|
|
57
|
-
) -> Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
58
|
-
"""Delete a workflow
|
|
59
|
-
|
|
60
|
-
Args:
|
|
61
|
-
workflow_id (UUID):
|
|
62
|
-
|
|
63
|
-
Raises:
|
|
64
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
65
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
66
|
-
|
|
67
|
-
Returns:
|
|
68
|
-
Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]
|
|
69
|
-
"""
|
|
70
|
-
|
|
71
|
-
kwargs = _get_kwargs(
|
|
72
|
-
workflow_id=workflow_id,
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
response = client.get_httpx_client().request(
|
|
76
|
-
**kwargs,
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
return _build_response(client=client, response=response)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
def sync(
|
|
83
|
-
workflow_id: UUID,
|
|
84
|
-
*,
|
|
85
|
-
client: Union[AuthenticatedClient, Client],
|
|
86
|
-
) -> Optional[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
87
|
-
"""Delete a workflow
|
|
88
|
-
|
|
89
|
-
Args:
|
|
90
|
-
workflow_id (UUID):
|
|
91
|
-
|
|
92
|
-
Raises:
|
|
93
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
94
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
95
|
-
|
|
96
|
-
Returns:
|
|
97
|
-
Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]
|
|
98
|
-
"""
|
|
99
|
-
|
|
100
|
-
return sync_detailed(
|
|
101
|
-
workflow_id=workflow_id,
|
|
102
|
-
client=client,
|
|
103
|
-
).parsed
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
async def asyncio_detailed(
|
|
107
|
-
workflow_id: UUID,
|
|
108
|
-
*,
|
|
109
|
-
client: Union[AuthenticatedClient, Client],
|
|
110
|
-
) -> Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
111
|
-
"""Delete a workflow
|
|
112
|
-
|
|
113
|
-
Args:
|
|
114
|
-
workflow_id (UUID):
|
|
115
|
-
|
|
116
|
-
Raises:
|
|
117
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
118
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
119
|
-
|
|
120
|
-
Returns:
|
|
121
|
-
Response[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]
|
|
122
|
-
"""
|
|
123
|
-
|
|
124
|
-
kwargs = _get_kwargs(
|
|
125
|
-
workflow_id=workflow_id,
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
129
|
-
|
|
130
|
-
return _build_response(client=client, response=response)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
async def asyncio(
|
|
134
|
-
workflow_id: UUID,
|
|
135
|
-
*,
|
|
136
|
-
client: Union[AuthenticatedClient, Client],
|
|
137
|
-
) -> Optional[Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]]:
|
|
138
|
-
"""Delete a workflow
|
|
139
|
-
|
|
140
|
-
Args:
|
|
141
|
-
workflow_id (UUID):
|
|
142
|
-
|
|
143
|
-
Raises:
|
|
144
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
145
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
146
|
-
|
|
147
|
-
Returns:
|
|
148
|
-
Union[DeleteWorkflowResponse200, DeleteWorkflowResponse404]
|
|
149
|
-
"""
|
|
150
|
-
|
|
151
|
-
return (
|
|
152
|
-
await asyncio_detailed(
|
|
153
|
-
workflow_id=workflow_id,
|
|
154
|
-
client=client,
|
|
155
|
-
)
|
|
156
|
-
).parsed
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, Optional, Union
|
|
3
|
-
from uuid import UUID
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from ... import errors
|
|
8
|
-
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...types import Response
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _get_kwargs(
|
|
13
|
-
workflow_id: UUID,
|
|
14
|
-
) -> Dict[str, Any]:
|
|
15
|
-
_kwargs: Dict[str, Any] = {
|
|
16
|
-
"method": "delete",
|
|
17
|
-
"url": f"/workflow/{workflow_id}/credentials",
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return _kwargs
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]:
|
|
24
|
-
if response.status_code == 200:
|
|
25
|
-
return None
|
|
26
|
-
if response.status_code == 404:
|
|
27
|
-
return None
|
|
28
|
-
if client.raise_on_unexpected_status:
|
|
29
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
30
|
-
else:
|
|
31
|
-
return None
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
35
|
-
return Response(
|
|
36
|
-
status_code=HTTPStatus(response.status_code),
|
|
37
|
-
content=response.content,
|
|
38
|
-
headers=response.headers,
|
|
39
|
-
parsed=_parse_response(client=client, response=response),
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def sync_detailed(
|
|
44
|
-
workflow_id: UUID,
|
|
45
|
-
*,
|
|
46
|
-
client: Union[AuthenticatedClient, Client],
|
|
47
|
-
) -> Response[Any]:
|
|
48
|
-
"""Delete credentials for a workflow
|
|
49
|
-
|
|
50
|
-
Args:
|
|
51
|
-
workflow_id (UUID):
|
|
52
|
-
|
|
53
|
-
Raises:
|
|
54
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
55
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
56
|
-
|
|
57
|
-
Returns:
|
|
58
|
-
Response[Any]
|
|
59
|
-
"""
|
|
60
|
-
|
|
61
|
-
kwargs = _get_kwargs(
|
|
62
|
-
workflow_id=workflow_id,
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
response = client.get_httpx_client().request(
|
|
66
|
-
**kwargs,
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
return _build_response(client=client, response=response)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
async def asyncio_detailed(
|
|
73
|
-
workflow_id: UUID,
|
|
74
|
-
*,
|
|
75
|
-
client: Union[AuthenticatedClient, Client],
|
|
76
|
-
) -> Response[Any]:
|
|
77
|
-
"""Delete credentials for a workflow
|
|
78
|
-
|
|
79
|
-
Args:
|
|
80
|
-
workflow_id (UUID):
|
|
81
|
-
|
|
82
|
-
Raises:
|
|
83
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
84
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
85
|
-
|
|
86
|
-
Returns:
|
|
87
|
-
Response[Any]
|
|
88
|
-
"""
|
|
89
|
-
|
|
90
|
-
kwargs = _get_kwargs(
|
|
91
|
-
workflow_id=workflow_id,
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
95
|
-
|
|
96
|
-
return _build_response(client=client, response=response)
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, Optional, Union, cast
|
|
3
|
-
from uuid import UUID
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
|
|
7
|
-
from ... import errors
|
|
8
|
-
from ...client import AuthenticatedClient, Client
|
|
9
|
-
from ...models.workflow_execution_request import WorkflowExecutionRequest
|
|
10
|
-
from ...types import Response
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _get_kwargs(
|
|
14
|
-
workflow_id: UUID,
|
|
15
|
-
*,
|
|
16
|
-
body: WorkflowExecutionRequest,
|
|
17
|
-
) -> Dict[str, Any]:
|
|
18
|
-
headers: Dict[str, Any] = {}
|
|
19
|
-
|
|
20
|
-
_kwargs: Dict[str, Any] = {
|
|
21
|
-
"method": "post",
|
|
22
|
-
"url": f"/workflow/{workflow_id}",
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
_body = body.to_dict()
|
|
26
|
-
|
|
27
|
-
_kwargs["json"] = _body
|
|
28
|
-
headers["Content-Type"] = "application/json"
|
|
29
|
-
|
|
30
|
-
_kwargs["headers"] = headers
|
|
31
|
-
return _kwargs
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def _parse_response(
|
|
35
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
36
|
-
) -> Optional[Union[Any, str]]:
|
|
37
|
-
if response.status_code == 202:
|
|
38
|
-
response_202 = cast(str, response.json())
|
|
39
|
-
return response_202
|
|
40
|
-
if response.status_code == 400:
|
|
41
|
-
response_400 = cast(Any, None)
|
|
42
|
-
return response_400
|
|
43
|
-
if client.raise_on_unexpected_status:
|
|
44
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
45
|
-
else:
|
|
46
|
-
return None
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
def _build_response(
|
|
50
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
51
|
-
) -> Response[Union[Any, str]]:
|
|
52
|
-
return Response(
|
|
53
|
-
status_code=HTTPStatus(response.status_code),
|
|
54
|
-
content=response.content,
|
|
55
|
-
headers=response.headers,
|
|
56
|
-
parsed=_parse_response(client=client, response=response),
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def sync_detailed(
|
|
61
|
-
workflow_id: UUID,
|
|
62
|
-
*,
|
|
63
|
-
client: Union[AuthenticatedClient, Client],
|
|
64
|
-
body: WorkflowExecutionRequest,
|
|
65
|
-
) -> Response[Union[Any, str]]:
|
|
66
|
-
"""Execute a saved workflow for an agent
|
|
67
|
-
|
|
68
|
-
Args:
|
|
69
|
-
workflow_id (UUID):
|
|
70
|
-
body (WorkflowExecutionRequest): Dynamic values to be merged into the saved workflow
|
|
71
|
-
configuration. Example: {'name': 'Alice', 'model': 'gpt-4o'}.
|
|
72
|
-
|
|
73
|
-
Raises:
|
|
74
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
75
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
76
|
-
|
|
77
|
-
Returns:
|
|
78
|
-
Response[Union[Any, str]]
|
|
79
|
-
"""
|
|
80
|
-
|
|
81
|
-
kwargs = _get_kwargs(
|
|
82
|
-
workflow_id=workflow_id,
|
|
83
|
-
body=body,
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
response = client.get_httpx_client().request(
|
|
87
|
-
**kwargs,
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
return _build_response(client=client, response=response)
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
def sync(
|
|
94
|
-
workflow_id: UUID,
|
|
95
|
-
*,
|
|
96
|
-
client: Union[AuthenticatedClient, Client],
|
|
97
|
-
body: WorkflowExecutionRequest,
|
|
98
|
-
) -> Optional[Union[Any, str]]:
|
|
99
|
-
"""Execute a saved workflow for an agent
|
|
100
|
-
|
|
101
|
-
Args:
|
|
102
|
-
workflow_id (UUID):
|
|
103
|
-
body (WorkflowExecutionRequest): Dynamic values to be merged into the saved workflow
|
|
104
|
-
configuration. Example: {'name': 'Alice', 'model': 'gpt-4o'}.
|
|
105
|
-
|
|
106
|
-
Raises:
|
|
107
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
108
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
109
|
-
|
|
110
|
-
Returns:
|
|
111
|
-
Union[Any, str]
|
|
112
|
-
"""
|
|
113
|
-
|
|
114
|
-
return sync_detailed(
|
|
115
|
-
workflow_id=workflow_id,
|
|
116
|
-
client=client,
|
|
117
|
-
body=body,
|
|
118
|
-
).parsed
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
async def asyncio_detailed(
|
|
122
|
-
workflow_id: UUID,
|
|
123
|
-
*,
|
|
124
|
-
client: Union[AuthenticatedClient, Client],
|
|
125
|
-
body: WorkflowExecutionRequest,
|
|
126
|
-
) -> Response[Union[Any, str]]:
|
|
127
|
-
"""Execute a saved workflow for an agent
|
|
128
|
-
|
|
129
|
-
Args:
|
|
130
|
-
workflow_id (UUID):
|
|
131
|
-
body (WorkflowExecutionRequest): Dynamic values to be merged into the saved workflow
|
|
132
|
-
configuration. Example: {'name': 'Alice', 'model': 'gpt-4o'}.
|
|
133
|
-
|
|
134
|
-
Raises:
|
|
135
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
136
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
137
|
-
|
|
138
|
-
Returns:
|
|
139
|
-
Response[Union[Any, str]]
|
|
140
|
-
"""
|
|
141
|
-
|
|
142
|
-
kwargs = _get_kwargs(
|
|
143
|
-
workflow_id=workflow_id,
|
|
144
|
-
body=body,
|
|
145
|
-
)
|
|
146
|
-
|
|
147
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
148
|
-
|
|
149
|
-
return _build_response(client=client, response=response)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
async def asyncio(
|
|
153
|
-
workflow_id: UUID,
|
|
154
|
-
*,
|
|
155
|
-
client: Union[AuthenticatedClient, Client],
|
|
156
|
-
body: WorkflowExecutionRequest,
|
|
157
|
-
) -> Optional[Union[Any, str]]:
|
|
158
|
-
"""Execute a saved workflow for an agent
|
|
159
|
-
|
|
160
|
-
Args:
|
|
161
|
-
workflow_id (UUID):
|
|
162
|
-
body (WorkflowExecutionRequest): Dynamic values to be merged into the saved workflow
|
|
163
|
-
configuration. Example: {'name': 'Alice', 'model': 'gpt-4o'}.
|
|
164
|
-
|
|
165
|
-
Raises:
|
|
166
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
167
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
168
|
-
|
|
169
|
-
Returns:
|
|
170
|
-
Union[Any, str]
|
|
171
|
-
"""
|
|
172
|
-
|
|
173
|
-
return (
|
|
174
|
-
await asyncio_detailed(
|
|
175
|
-
workflow_id=workflow_id,
|
|
176
|
-
client=client,
|
|
177
|
-
body=body,
|
|
178
|
-
)
|
|
179
|
-
).parsed
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
from http import HTTPStatus
|
|
2
|
-
from typing import Any, Dict, List, Optional, Union
|
|
3
|
-
|
|
4
|
-
import httpx
|
|
5
|
-
|
|
6
|
-
from ... import errors
|
|
7
|
-
from ...client import AuthenticatedClient, Client
|
|
8
|
-
from ...models.workflow_execution import WorkflowExecution
|
|
9
|
-
from ...types import Response
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _get_kwargs(
|
|
13
|
-
agent_name: str,
|
|
14
|
-
) -> Dict[str, Any]:
|
|
15
|
-
_kwargs: Dict[str, Any] = {
|
|
16
|
-
"method": "get",
|
|
17
|
-
"url": f"/agent/{agent_name}/workflows",
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return _kwargs
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def _parse_response(
|
|
24
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
25
|
-
) -> Optional[List["WorkflowExecution"]]:
|
|
26
|
-
if response.status_code == 200:
|
|
27
|
-
response_200 = []
|
|
28
|
-
_response_200 = response.json()
|
|
29
|
-
for response_200_item_data in _response_200:
|
|
30
|
-
response_200_item = WorkflowExecution.from_dict(response_200_item_data)
|
|
31
|
-
|
|
32
|
-
response_200.append(response_200_item)
|
|
33
|
-
|
|
34
|
-
return response_200
|
|
35
|
-
if client.raise_on_unexpected_status:
|
|
36
|
-
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
37
|
-
else:
|
|
38
|
-
return None
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def _build_response(
|
|
42
|
-
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
43
|
-
) -> Response[List["WorkflowExecution"]]:
|
|
44
|
-
return Response(
|
|
45
|
-
status_code=HTTPStatus(response.status_code),
|
|
46
|
-
content=response.content,
|
|
47
|
-
headers=response.headers,
|
|
48
|
-
parsed=_parse_response(client=client, response=response),
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def sync_detailed(
|
|
53
|
-
agent_name: str,
|
|
54
|
-
*,
|
|
55
|
-
client: Union[AuthenticatedClient, Client],
|
|
56
|
-
) -> Response[List["WorkflowExecution"]]:
|
|
57
|
-
"""Get all workflows and their executions
|
|
58
|
-
|
|
59
|
-
Args:
|
|
60
|
-
agent_name (str):
|
|
61
|
-
|
|
62
|
-
Raises:
|
|
63
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
64
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
65
|
-
|
|
66
|
-
Returns:
|
|
67
|
-
Response[List['WorkflowExecution']]
|
|
68
|
-
"""
|
|
69
|
-
|
|
70
|
-
kwargs = _get_kwargs(
|
|
71
|
-
agent_name=agent_name,
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
response = client.get_httpx_client().request(
|
|
75
|
-
**kwargs,
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
return _build_response(client=client, response=response)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
def sync(
|
|
82
|
-
agent_name: str,
|
|
83
|
-
*,
|
|
84
|
-
client: Union[AuthenticatedClient, Client],
|
|
85
|
-
) -> Optional[List["WorkflowExecution"]]:
|
|
86
|
-
"""Get all workflows and their executions
|
|
87
|
-
|
|
88
|
-
Args:
|
|
89
|
-
agent_name (str):
|
|
90
|
-
|
|
91
|
-
Raises:
|
|
92
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
93
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
94
|
-
|
|
95
|
-
Returns:
|
|
96
|
-
List['WorkflowExecution']
|
|
97
|
-
"""
|
|
98
|
-
|
|
99
|
-
return sync_detailed(
|
|
100
|
-
agent_name=agent_name,
|
|
101
|
-
client=client,
|
|
102
|
-
).parsed
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
async def asyncio_detailed(
|
|
106
|
-
agent_name: str,
|
|
107
|
-
*,
|
|
108
|
-
client: Union[AuthenticatedClient, Client],
|
|
109
|
-
) -> Response[List["WorkflowExecution"]]:
|
|
110
|
-
"""Get all workflows and their executions
|
|
111
|
-
|
|
112
|
-
Args:
|
|
113
|
-
agent_name (str):
|
|
114
|
-
|
|
115
|
-
Raises:
|
|
116
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
117
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
118
|
-
|
|
119
|
-
Returns:
|
|
120
|
-
Response[List['WorkflowExecution']]
|
|
121
|
-
"""
|
|
122
|
-
|
|
123
|
-
kwargs = _get_kwargs(
|
|
124
|
-
agent_name=agent_name,
|
|
125
|
-
)
|
|
126
|
-
|
|
127
|
-
response = await client.get_async_httpx_client().request(**kwargs)
|
|
128
|
-
|
|
129
|
-
return _build_response(client=client, response=response)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
async def asyncio(
|
|
133
|
-
agent_name: str,
|
|
134
|
-
*,
|
|
135
|
-
client: Union[AuthenticatedClient, Client],
|
|
136
|
-
) -> Optional[List["WorkflowExecution"]]:
|
|
137
|
-
"""Get all workflows and their executions
|
|
138
|
-
|
|
139
|
-
Args:
|
|
140
|
-
agent_name (str):
|
|
141
|
-
|
|
142
|
-
Raises:
|
|
143
|
-
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
144
|
-
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
145
|
-
|
|
146
|
-
Returns:
|
|
147
|
-
List['WorkflowExecution']
|
|
148
|
-
"""
|
|
149
|
-
|
|
150
|
-
return (
|
|
151
|
-
await asyncio_detailed(
|
|
152
|
-
agent_name=agent_name,
|
|
153
|
-
client=client,
|
|
154
|
-
)
|
|
155
|
-
).parsed
|