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,77 +0,0 @@
|
|
|
1
|
-
import datetime
|
|
2
|
-
from typing import Any, Dict, List, Type, TypeVar
|
|
3
|
-
from uuid import UUID
|
|
4
|
-
|
|
5
|
-
from attrs import define as _attrs_define
|
|
6
|
-
from attrs import field as _attrs_field
|
|
7
|
-
from dateutil.parser import isoparse
|
|
8
|
-
|
|
9
|
-
T = TypeVar("T", bound="ProgressUpdate")
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@_attrs_define
|
|
13
|
-
class ProgressUpdate:
|
|
14
|
-
"""
|
|
15
|
-
Attributes:
|
|
16
|
-
execution_id (UUID): The execution ID
|
|
17
|
-
progress (str): The progress of the execution Example: Step 1 of 3.
|
|
18
|
-
created_at (datetime.datetime): The date and time the progress was created
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
execution_id: UUID
|
|
22
|
-
progress: str
|
|
23
|
-
created_at: datetime.datetime
|
|
24
|
-
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
-
|
|
26
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
27
|
-
execution_id = str(self.execution_id)
|
|
28
|
-
|
|
29
|
-
progress = self.progress
|
|
30
|
-
|
|
31
|
-
created_at = self.created_at.isoformat()
|
|
32
|
-
|
|
33
|
-
field_dict: Dict[str, Any] = {}
|
|
34
|
-
field_dict.update(self.additional_properties)
|
|
35
|
-
field_dict.update(
|
|
36
|
-
{
|
|
37
|
-
"execution_id": execution_id,
|
|
38
|
-
"progress": progress,
|
|
39
|
-
"created_at": created_at,
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
return field_dict
|
|
44
|
-
|
|
45
|
-
@classmethod
|
|
46
|
-
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
47
|
-
d = src_dict.copy()
|
|
48
|
-
execution_id = UUID(d.pop("execution_id"))
|
|
49
|
-
|
|
50
|
-
progress = d.pop("progress")
|
|
51
|
-
|
|
52
|
-
created_at = isoparse(d.pop("created_at"))
|
|
53
|
-
|
|
54
|
-
progress_update = cls(
|
|
55
|
-
execution_id=execution_id,
|
|
56
|
-
progress=progress,
|
|
57
|
-
created_at=created_at,
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
progress_update.additional_properties = d
|
|
61
|
-
return progress_update
|
|
62
|
-
|
|
63
|
-
@property
|
|
64
|
-
def additional_keys(self) -> List[str]:
|
|
65
|
-
return list(self.additional_properties.keys())
|
|
66
|
-
|
|
67
|
-
def __getitem__(self, key: str) -> Any:
|
|
68
|
-
return self.additional_properties[key]
|
|
69
|
-
|
|
70
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
71
|
-
self.additional_properties[key] = value
|
|
72
|
-
|
|
73
|
-
def __delitem__(self, key: str) -> None:
|
|
74
|
-
del self.additional_properties[key]
|
|
75
|
-
|
|
76
|
-
def __contains__(self, key: str) -> bool:
|
|
77
|
-
return key in self.additional_properties
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
T = TypeVar("T", bound="ResultSchema")
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@_attrs_define
|
|
10
|
-
class ResultSchema:
|
|
11
|
-
"""A JSON Schema that defines the expected structure and validation rules for workflow results.
|
|
12
|
-
|
|
13
|
-
Example:
|
|
14
|
-
{'$schema': 'https://json-schema.org/draft/2020-12/schema#', 'type': 'object', 'required': ['name', 'age',
|
|
15
|
-
'skills'], 'properties': {'name': {'type': 'string', 'minLength': 2}, 'age': {'type': 'integer', 'minimum': 18,
|
|
16
|
-
'maximum': 120}, 'email': {'type': 'string', 'format': 'email'}, 'skills': {'type': 'array', 'items': {'type':
|
|
17
|
-
'string'}, 'minItems': 1}}}
|
|
18
|
-
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
22
|
-
|
|
23
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
24
|
-
field_dict: Dict[str, Any] = {}
|
|
25
|
-
field_dict.update(self.additional_properties)
|
|
26
|
-
|
|
27
|
-
return field_dict
|
|
28
|
-
|
|
29
|
-
@classmethod
|
|
30
|
-
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
31
|
-
d = src_dict.copy()
|
|
32
|
-
result_schema = cls()
|
|
33
|
-
|
|
34
|
-
result_schema.additional_properties = d
|
|
35
|
-
return result_schema
|
|
36
|
-
|
|
37
|
-
@property
|
|
38
|
-
def additional_keys(self) -> List[str]:
|
|
39
|
-
return list(self.additional_properties.keys())
|
|
40
|
-
|
|
41
|
-
def __getitem__(self, key: str) -> Any:
|
|
42
|
-
return self.additional_properties[key]
|
|
43
|
-
|
|
44
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
45
|
-
self.additional_properties[key] = value
|
|
46
|
-
|
|
47
|
-
def __delitem__(self, key: str) -> None:
|
|
48
|
-
del self.additional_properties[key]
|
|
49
|
-
|
|
50
|
-
def __contains__(self, key: str) -> bool:
|
|
51
|
-
return key in self.additional_properties
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
T = TypeVar("T", bound="SlackChannelRequest")
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@_attrs_define
|
|
10
|
-
class SlackChannelRequest:
|
|
11
|
-
"""
|
|
12
|
-
Attributes:
|
|
13
|
-
slack_channel_id (str): Slack channel ID.
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
slack_channel_id: str
|
|
17
|
-
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
18
|
-
|
|
19
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
20
|
-
slack_channel_id = self.slack_channel_id
|
|
21
|
-
|
|
22
|
-
field_dict: Dict[str, Any] = {}
|
|
23
|
-
field_dict.update(self.additional_properties)
|
|
24
|
-
field_dict.update(
|
|
25
|
-
{
|
|
26
|
-
"slack_channel_id": slack_channel_id,
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
return field_dict
|
|
31
|
-
|
|
32
|
-
@classmethod
|
|
33
|
-
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
34
|
-
d = src_dict.copy()
|
|
35
|
-
slack_channel_id = d.pop("slack_channel_id")
|
|
36
|
-
|
|
37
|
-
slack_channel_request = cls(
|
|
38
|
-
slack_channel_id=slack_channel_id,
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
slack_channel_request.additional_properties = d
|
|
42
|
-
return slack_channel_request
|
|
43
|
-
|
|
44
|
-
@property
|
|
45
|
-
def additional_keys(self) -> List[str]:
|
|
46
|
-
return list(self.additional_properties.keys())
|
|
47
|
-
|
|
48
|
-
def __getitem__(self, key: str) -> Any:
|
|
49
|
-
return self.additional_properties[key]
|
|
50
|
-
|
|
51
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
52
|
-
self.additional_properties[key] = value
|
|
53
|
-
|
|
54
|
-
def __delitem__(self, key: str) -> None:
|
|
55
|
-
del self.additional_properties[key]
|
|
56
|
-
|
|
57
|
-
def __contains__(self, key: str) -> bool:
|
|
58
|
-
return key in self.additional_properties
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import datetime
|
|
2
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
|
3
|
-
from uuid import UUID
|
|
4
|
-
|
|
5
|
-
from attrs import define as _attrs_define
|
|
6
|
-
from attrs import field as _attrs_field
|
|
7
|
-
from dateutil.parser import isoparse
|
|
8
|
-
|
|
9
|
-
from ..types import UNSET, Unset
|
|
10
|
-
|
|
11
|
-
if TYPE_CHECKING:
|
|
12
|
-
from ..models.result_schema import ResultSchema
|
|
13
|
-
from ..models.workflow_fields import WorkflowFields
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
T = TypeVar("T", bound="Workflow")
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@_attrs_define
|
|
20
|
-
class Workflow:
|
|
21
|
-
"""
|
|
22
|
-
Attributes:
|
|
23
|
-
id (UUID): Workflow identifier.
|
|
24
|
-
user_id (UUID): The ID of the user who created the workflow. Example: 123e4567-e89b-12d3-a456-426614174000.
|
|
25
|
-
result_schema (ResultSchema): A JSON Schema that defines the expected structure and validation rules for
|
|
26
|
-
workflow results. Example: {'$schema': 'https://json-schema.org/draft/2020-12/schema#', 'type': 'object',
|
|
27
|
-
'required': ['name', 'age', 'skills'], 'properties': {'name': {'type': 'string', 'minLength': 2}, 'age':
|
|
28
|
-
{'type': 'integer', 'minimum': 18, 'maximum': 120}, 'email': {'type': 'string', 'format': 'email'}, 'skills':
|
|
29
|
-
{'type': 'array', 'items': {'type': 'string'}, 'minItems': 1}}}.
|
|
30
|
-
agent_id (UUID): Identifier of the associated agent.
|
|
31
|
-
name (str): Workflow name.
|
|
32
|
-
fields (WorkflowFields): Workflow configuration. Example: {'model': 'gpt-4o', 'version': '2024-02-01'}.
|
|
33
|
-
prompts (List[str]): The prompts for the workflow. They can have variables in them. They will be merged with the
|
|
34
|
-
dynamic data passed when the workflow is executed. Example: ['Your name is {{.name}}, you speak {{.language}}',
|
|
35
|
-
'Your task is {{.task}}'].
|
|
36
|
-
created_at (Union[Unset, datetime.datetime]): The date and time the workflow was created.
|
|
37
|
-
prompt_variables (Union[Unset, List[str]]): The variables in the prompts. Example: ['name', 'language', 'task'].
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
id: UUID
|
|
41
|
-
user_id: UUID
|
|
42
|
-
result_schema: "ResultSchema"
|
|
43
|
-
agent_id: UUID
|
|
44
|
-
name: str
|
|
45
|
-
fields: "WorkflowFields"
|
|
46
|
-
prompts: List[str]
|
|
47
|
-
created_at: Union[Unset, datetime.datetime] = UNSET
|
|
48
|
-
prompt_variables: Union[Unset, List[str]] = UNSET
|
|
49
|
-
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
50
|
-
|
|
51
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
52
|
-
id = str(self.id)
|
|
53
|
-
|
|
54
|
-
user_id = str(self.user_id)
|
|
55
|
-
|
|
56
|
-
result_schema = self.result_schema.to_dict()
|
|
57
|
-
|
|
58
|
-
agent_id = str(self.agent_id)
|
|
59
|
-
|
|
60
|
-
name = self.name
|
|
61
|
-
|
|
62
|
-
fields = self.fields.to_dict()
|
|
63
|
-
|
|
64
|
-
prompts = self.prompts
|
|
65
|
-
|
|
66
|
-
created_at: Union[Unset, str] = UNSET
|
|
67
|
-
if not isinstance(self.created_at, Unset):
|
|
68
|
-
created_at = self.created_at.isoformat()
|
|
69
|
-
|
|
70
|
-
prompt_variables: Union[Unset, List[str]] = UNSET
|
|
71
|
-
if not isinstance(self.prompt_variables, Unset):
|
|
72
|
-
prompt_variables = self.prompt_variables
|
|
73
|
-
|
|
74
|
-
field_dict: Dict[str, Any] = {}
|
|
75
|
-
field_dict.update(self.additional_properties)
|
|
76
|
-
field_dict.update(
|
|
77
|
-
{
|
|
78
|
-
"id": id,
|
|
79
|
-
"user_id": user_id,
|
|
80
|
-
"result_schema": result_schema,
|
|
81
|
-
"agent_id": agent_id,
|
|
82
|
-
"name": name,
|
|
83
|
-
"fields": fields,
|
|
84
|
-
"prompts": prompts,
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
if created_at is not UNSET:
|
|
88
|
-
field_dict["created_at"] = created_at
|
|
89
|
-
if prompt_variables is not UNSET:
|
|
90
|
-
field_dict["prompt_variables"] = prompt_variables
|
|
91
|
-
|
|
92
|
-
return field_dict
|
|
93
|
-
|
|
94
|
-
@classmethod
|
|
95
|
-
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
96
|
-
from ..models.result_schema import ResultSchema
|
|
97
|
-
from ..models.workflow_fields import WorkflowFields
|
|
98
|
-
|
|
99
|
-
d = src_dict.copy()
|
|
100
|
-
id = UUID(d.pop("id"))
|
|
101
|
-
|
|
102
|
-
user_id = UUID(d.pop("user_id"))
|
|
103
|
-
|
|
104
|
-
result_schema = ResultSchema.from_dict(d.pop("result_schema"))
|
|
105
|
-
|
|
106
|
-
agent_id = UUID(d.pop("agent_id"))
|
|
107
|
-
|
|
108
|
-
name = d.pop("name")
|
|
109
|
-
|
|
110
|
-
fields = WorkflowFields.from_dict(d.pop("fields"))
|
|
111
|
-
|
|
112
|
-
prompts = cast(List[str], d.pop("prompts"))
|
|
113
|
-
|
|
114
|
-
_created_at = d.pop("created_at", UNSET)
|
|
115
|
-
created_at: Union[Unset, datetime.datetime]
|
|
116
|
-
if isinstance(_created_at, Unset):
|
|
117
|
-
created_at = UNSET
|
|
118
|
-
else:
|
|
119
|
-
created_at = isoparse(_created_at)
|
|
120
|
-
|
|
121
|
-
prompt_variables = cast(List[str], d.pop("prompt_variables", UNSET))
|
|
122
|
-
|
|
123
|
-
workflow = cls(
|
|
124
|
-
id=id,
|
|
125
|
-
user_id=user_id,
|
|
126
|
-
result_schema=result_schema,
|
|
127
|
-
agent_id=agent_id,
|
|
128
|
-
name=name,
|
|
129
|
-
fields=fields,
|
|
130
|
-
prompts=prompts,
|
|
131
|
-
created_at=created_at,
|
|
132
|
-
prompt_variables=prompt_variables,
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
workflow.additional_properties = d
|
|
136
|
-
return workflow
|
|
137
|
-
|
|
138
|
-
@property
|
|
139
|
-
def additional_keys(self) -> List[str]:
|
|
140
|
-
return list(self.additional_properties.keys())
|
|
141
|
-
|
|
142
|
-
def __getitem__(self, key: str) -> Any:
|
|
143
|
-
return self.additional_properties[key]
|
|
144
|
-
|
|
145
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
146
|
-
self.additional_properties[key] = value
|
|
147
|
-
|
|
148
|
-
def __delitem__(self, key: str) -> None:
|
|
149
|
-
del self.additional_properties[key]
|
|
150
|
-
|
|
151
|
-
def __contains__(self, key: str) -> bool:
|
|
152
|
-
return key in self.additional_properties
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
if TYPE_CHECKING:
|
|
7
|
-
from ..models.execution import Execution
|
|
8
|
-
from ..models.workflow import Workflow
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
T = TypeVar("T", bound="WorkflowExecution")
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@_attrs_define
|
|
15
|
-
class WorkflowExecution:
|
|
16
|
-
"""
|
|
17
|
-
Attributes:
|
|
18
|
-
workflow (Workflow):
|
|
19
|
-
executions (List['Execution']):
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
workflow: "Workflow"
|
|
23
|
-
executions: List["Execution"]
|
|
24
|
-
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
-
|
|
26
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
27
|
-
workflow = self.workflow.to_dict()
|
|
28
|
-
|
|
29
|
-
executions = []
|
|
30
|
-
for executions_item_data in self.executions:
|
|
31
|
-
executions_item = executions_item_data.to_dict()
|
|
32
|
-
executions.append(executions_item)
|
|
33
|
-
|
|
34
|
-
field_dict: Dict[str, Any] = {}
|
|
35
|
-
field_dict.update(self.additional_properties)
|
|
36
|
-
field_dict.update(
|
|
37
|
-
{
|
|
38
|
-
"workflow": workflow,
|
|
39
|
-
"executions": executions,
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
return field_dict
|
|
44
|
-
|
|
45
|
-
@classmethod
|
|
46
|
-
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
47
|
-
from ..models.execution import Execution
|
|
48
|
-
from ..models.workflow import Workflow
|
|
49
|
-
|
|
50
|
-
d = src_dict.copy()
|
|
51
|
-
workflow = Workflow.from_dict(d.pop("workflow"))
|
|
52
|
-
|
|
53
|
-
executions = []
|
|
54
|
-
_executions = d.pop("executions")
|
|
55
|
-
for executions_item_data in _executions:
|
|
56
|
-
executions_item = Execution.from_dict(executions_item_data)
|
|
57
|
-
|
|
58
|
-
executions.append(executions_item)
|
|
59
|
-
|
|
60
|
-
workflow_execution = cls(
|
|
61
|
-
workflow=workflow,
|
|
62
|
-
executions=executions,
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
workflow_execution.additional_properties = d
|
|
66
|
-
return workflow_execution
|
|
67
|
-
|
|
68
|
-
@property
|
|
69
|
-
def additional_keys(self) -> List[str]:
|
|
70
|
-
return list(self.additional_properties.keys())
|
|
71
|
-
|
|
72
|
-
def __getitem__(self, key: str) -> Any:
|
|
73
|
-
return self.additional_properties[key]
|
|
74
|
-
|
|
75
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
76
|
-
self.additional_properties[key] = value
|
|
77
|
-
|
|
78
|
-
def __delitem__(self, key: str) -> None:
|
|
79
|
-
del self.additional_properties[key]
|
|
80
|
-
|
|
81
|
-
def __contains__(self, key: str) -> bool:
|
|
82
|
-
return key in self.additional_properties
|
asteroid_odyssey/api/generated/asteroid_agents_api_client/models/workflow_execution_request.py
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
T = TypeVar("T", bound="WorkflowExecutionRequest")
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@_attrs_define
|
|
10
|
-
class WorkflowExecutionRequest:
|
|
11
|
-
"""Dynamic values to be merged into the saved workflow configuration.
|
|
12
|
-
|
|
13
|
-
Example:
|
|
14
|
-
{'name': 'Alice', 'model': 'gpt-4o'}
|
|
15
|
-
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
19
|
-
|
|
20
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
21
|
-
field_dict: Dict[str, Any] = {}
|
|
22
|
-
field_dict.update(self.additional_properties)
|
|
23
|
-
|
|
24
|
-
return field_dict
|
|
25
|
-
|
|
26
|
-
@classmethod
|
|
27
|
-
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
28
|
-
d = src_dict.copy()
|
|
29
|
-
workflow_execution_request = cls()
|
|
30
|
-
|
|
31
|
-
workflow_execution_request.additional_properties = d
|
|
32
|
-
return workflow_execution_request
|
|
33
|
-
|
|
34
|
-
@property
|
|
35
|
-
def additional_keys(self) -> List[str]:
|
|
36
|
-
return list(self.additional_properties.keys())
|
|
37
|
-
|
|
38
|
-
def __getitem__(self, key: str) -> Any:
|
|
39
|
-
return self.additional_properties[key]
|
|
40
|
-
|
|
41
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
42
|
-
self.additional_properties[key] = value
|
|
43
|
-
|
|
44
|
-
def __delitem__(self, key: str) -> None:
|
|
45
|
-
del self.additional_properties[key]
|
|
46
|
-
|
|
47
|
-
def __contains__(self, key: str) -> bool:
|
|
48
|
-
return key in self.additional_properties
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
-
|
|
3
|
-
from attrs import define as _attrs_define
|
|
4
|
-
from attrs import field as _attrs_field
|
|
5
|
-
|
|
6
|
-
T = TypeVar("T", bound="WorkflowFields")
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@_attrs_define
|
|
10
|
-
class WorkflowFields:
|
|
11
|
-
"""Workflow configuration.
|
|
12
|
-
|
|
13
|
-
Example:
|
|
14
|
-
{'model': 'gpt-4o', 'version': '2024-02-01'}
|
|
15
|
-
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
19
|
-
|
|
20
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
21
|
-
field_dict: Dict[str, Any] = {}
|
|
22
|
-
field_dict.update(self.additional_properties)
|
|
23
|
-
|
|
24
|
-
return field_dict
|
|
25
|
-
|
|
26
|
-
@classmethod
|
|
27
|
-
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
28
|
-
d = src_dict.copy()
|
|
29
|
-
workflow_fields = cls()
|
|
30
|
-
|
|
31
|
-
workflow_fields.additional_properties = d
|
|
32
|
-
return workflow_fields
|
|
33
|
-
|
|
34
|
-
@property
|
|
35
|
-
def additional_keys(self) -> List[str]:
|
|
36
|
-
return list(self.additional_properties.keys())
|
|
37
|
-
|
|
38
|
-
def __getitem__(self, key: str) -> Any:
|
|
39
|
-
return self.additional_properties[key]
|
|
40
|
-
|
|
41
|
-
def __setitem__(self, key: str, value: Any) -> None:
|
|
42
|
-
self.additional_properties[key] = value
|
|
43
|
-
|
|
44
|
-
def __delitem__(self, key: str) -> None:
|
|
45
|
-
del self.additional_properties[key]
|
|
46
|
-
|
|
47
|
-
def __contains__(self, key: str) -> bool:
|
|
48
|
-
return key in self.additional_properties
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Marker file for PEP 561
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"""Contains some shared types for properties"""
|
|
2
|
-
|
|
3
|
-
from http import HTTPStatus
|
|
4
|
-
from typing import BinaryIO, Generic, Literal, MutableMapping, Optional, Tuple, TypeVar
|
|
5
|
-
|
|
6
|
-
from attrs import define
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Unset:
|
|
10
|
-
def __bool__(self) -> Literal[False]:
|
|
11
|
-
return False
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
UNSET: Unset = Unset()
|
|
15
|
-
|
|
16
|
-
FileJsonType = Tuple[Optional[str], BinaryIO, Optional[str]]
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
@define
|
|
20
|
-
class File:
|
|
21
|
-
"""Contains information for file uploads"""
|
|
22
|
-
|
|
23
|
-
payload: BinaryIO
|
|
24
|
-
file_name: Optional[str] = None
|
|
25
|
-
mime_type: Optional[str] = None
|
|
26
|
-
|
|
27
|
-
def to_tuple(self) -> FileJsonType:
|
|
28
|
-
"""Return a tuple representation that httpx will accept for multipart/form-data"""
|
|
29
|
-
return self.file_name, self.payload, self.mime_type
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
T = TypeVar("T")
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
@define
|
|
36
|
-
class Response(Generic[T]):
|
|
37
|
-
"""A response from an endpoint"""
|
|
38
|
-
|
|
39
|
-
status_code: HTTPStatus
|
|
40
|
-
content: bytes
|
|
41
|
-
headers: MutableMapping[str, str]
|
|
42
|
-
parsed: Optional[T]
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
__all__ = ["File", "Response", "FileJsonType", "Unset", "UNSET"]
|
asteroid_odyssey/exceptions.py
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"""Custom exceptions for the Asteroid Odyssey SDK."""
|
|
2
|
-
|
|
3
|
-
from typing import Optional
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class AsteroidOdysseyError(Exception):
|
|
7
|
-
"""Base exception for all Asteroid Odyssey errors."""
|
|
8
|
-
pass
|
|
9
|
-
|
|
10
|
-
class ApiError(AsteroidOdysseyError):
|
|
11
|
-
"""Raised when an API error occurs."""
|
|
12
|
-
def __init__(self, message: str, status_code: Optional[int] = None, response: Optional[dict] = None):
|
|
13
|
-
super().__init__(message)
|
|
14
|
-
self.status_code = status_code
|
|
15
|
-
self.response = response
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: asteroid_odyssey
|
|
3
|
-
Version: 0.1.21
|
|
4
|
-
Summary: A Python SDK for interacting with the Asteroid Agents API
|
|
5
|
-
Author-email: Asteroid <founders@asteroid.ai>
|
|
6
|
-
Classifier: Programming Language :: Python :: 3
|
|
7
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
-
Classifier: Operating System :: OS Independent
|
|
9
|
-
Requires-Python: >=3.8
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
Requires-Dist: requests>=2.28.0
|
|
12
|
-
Requires-Dist: urllib3>=1.26.0
|
|
13
|
-
Requires-Dist: asteroid-sdk>=0.1.19
|
|
14
|
-
|
|
15
|
-
# Asteroid Odyssey
|
|
16
|
-
|
|
17
|
-
The official Python SDK for interacting with the Asteroid Agents API.
|
|
18
|
-
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pip install asteroid-odyssey
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Usage
|
|
26
|
-
|
|
27
|
-
Please head to our documentation at https://docs.asteroid.ai/sdk/python
|
|
28
|
-
|
|
29
|
-
## License
|
|
30
|
-
|
|
31
|
-
The Asteroid Odyssey SDK is available under the MIT License.
|