asteroid-odyssey 1.3.5__py3-none-any.whl → 1.3.6__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/agents_v2_gen/__init__.py +11 -0
- asteroid_odyssey/agents_v2_gen/api/default_api.py +348 -0
- asteroid_odyssey/agents_v2_gen/models/__init__.py +11 -0
- asteroid_odyssey/agents_v2_gen/models/activity_payload_union_graph_updated.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/agent_list200_response.py +101 -0
- asteroid_odyssey/agents_v2_gen/models/agents_agent_base.py +96 -0
- asteroid_odyssey/agents_v2_gen/models/agents_agent_sort_field.py +37 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_graph_updated_payload.py +95 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_activity_payload_union.py +22 -8
- asteroid_odyssey/agents_v2_gen/models/agents_execution_graph_update.py +100 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_node_details.py +91 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_transition_details.py +89 -0
- asteroid_odyssey/agents_v2_gen/models/agents_execution_update_type.py +38 -0
- asteroid_odyssey/agents_v2_gen/models/common_error.py +89 -0
- asteroid_odyssey/agents_v2_gen/models/common_sort_direction.py +37 -0
- asteroid_odyssey/client.py +41 -0
- {asteroid_odyssey-1.3.5.dist-info → asteroid_odyssey-1.3.6.dist-info}/METADATA +1 -1
- {asteroid_odyssey-1.3.5.dist-info → asteroid_odyssey-1.3.6.dist-info}/RECORD +20 -9
- {asteroid_odyssey-1.3.5.dist-info → asteroid_odyssey-1.3.6.dist-info}/WHEEL +0 -0
- {asteroid_odyssey-1.3.5.dist-info → asteroid_odyssey-1.3.6.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class AgentsAgentBase(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
AgentsAgentBase
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
created_at: datetime = Field(alias="createdAt")
|
|
31
|
+
id: StrictStr
|
|
32
|
+
name: StrictStr
|
|
33
|
+
organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId")
|
|
34
|
+
user_id: StrictStr = Field(alias="userId")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["createdAt", "id", "name", "organizationId", "userId"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of AgentsAgentBase from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of AgentsAgentBase from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"createdAt": obj.get("createdAt"),
|
|
89
|
+
"id": obj.get("id"),
|
|
90
|
+
"name": obj.get("name"),
|
|
91
|
+
"organizationId": obj.get("organizationId"),
|
|
92
|
+
"userId": obj.get("userId")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class AgentsAgentSortField(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
AgentsAgentSortField
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
NAME = 'name'
|
|
30
|
+
CREATED_AT = 'created_at'
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of AgentsAgentSortField from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from asteroid_odyssey.agents_v2_gen.models.agents_execution_graph_update import AgentsExecutionGraphUpdate
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class AgentsExecutionActivityGraphUpdatedPayload(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
AgentsExecutionActivityGraphUpdatedPayload
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
graph_update: List[AgentsExecutionGraphUpdate] = Field(alias="graphUpdate")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["graphUpdate"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of AgentsExecutionActivityGraphUpdatedPayload from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in graph_update (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.graph_update:
|
|
75
|
+
for _item_graph_update in self.graph_update:
|
|
76
|
+
if _item_graph_update:
|
|
77
|
+
_items.append(_item_graph_update.to_dict())
|
|
78
|
+
_dict['graphUpdate'] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of AgentsExecutionActivityGraphUpdatedPayload from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"graphUpdate": [AgentsExecutionGraphUpdate.from_dict(_item) for _item in obj["graphUpdate"]] if obj.get("graphUpdate") is not None else None
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -22,6 +22,7 @@ from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_action_failed
|
|
|
22
22
|
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_action_started import ActivityPayloadUnionActionStarted
|
|
23
23
|
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_file_added import ActivityPayloadUnionFileAdded
|
|
24
24
|
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_generic import ActivityPayloadUnionGeneric
|
|
25
|
+
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_graph_updated import ActivityPayloadUnionGraphUpdated
|
|
25
26
|
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_status_changed import ActivityPayloadUnionStatusChanged
|
|
26
27
|
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_step_completed import ActivityPayloadUnionStepCompleted
|
|
27
28
|
from asteroid_odyssey.agents_v2_gen.models.activity_payload_union_step_started import ActivityPayloadUnionStepStarted
|
|
@@ -32,7 +33,7 @@ from pydantic import StrictStr, Field
|
|
|
32
33
|
from typing import Union, List, Set, Optional, Dict
|
|
33
34
|
from typing_extensions import Literal, Self
|
|
34
35
|
|
|
35
|
-
AGENTSEXECUTIONACTIVITYPAYLOADUNION_ONE_OF_SCHEMAS = ["ActivityPayloadUnionActionCompleted", "ActivityPayloadUnionActionFailed", "ActivityPayloadUnionActionStarted", "ActivityPayloadUnionFileAdded", "ActivityPayloadUnionGeneric", "ActivityPayloadUnionStatusChanged", "ActivityPayloadUnionStepCompleted", "ActivityPayloadUnionStepStarted", "ActivityPayloadUnionTerminal", "ActivityPayloadUnionTransitionedNode", "ActivityPayloadUnionUserMessageReceived"]
|
|
36
|
+
AGENTSEXECUTIONACTIVITYPAYLOADUNION_ONE_OF_SCHEMAS = ["ActivityPayloadUnionActionCompleted", "ActivityPayloadUnionActionFailed", "ActivityPayloadUnionActionStarted", "ActivityPayloadUnionFileAdded", "ActivityPayloadUnionGeneric", "ActivityPayloadUnionGraphUpdated", "ActivityPayloadUnionStatusChanged", "ActivityPayloadUnionStepCompleted", "ActivityPayloadUnionStepStarted", "ActivityPayloadUnionTerminal", "ActivityPayloadUnionTransitionedNode", "ActivityPayloadUnionUserMessageReceived"]
|
|
36
37
|
|
|
37
38
|
class AgentsExecutionActivityPayloadUnion(BaseModel):
|
|
38
39
|
"""
|
|
@@ -60,8 +61,10 @@ class AgentsExecutionActivityPayloadUnion(BaseModel):
|
|
|
60
61
|
oneof_schema_10_validator: Optional[ActivityPayloadUnionUserMessageReceived] = None
|
|
61
62
|
# data type: ActivityPayloadUnionFileAdded
|
|
62
63
|
oneof_schema_11_validator: Optional[ActivityPayloadUnionFileAdded] = None
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
# data type: ActivityPayloadUnionGraphUpdated
|
|
65
|
+
oneof_schema_12_validator: Optional[ActivityPayloadUnionGraphUpdated] = None
|
|
66
|
+
actual_instance: Optional[Union[ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionGraphUpdated, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived]] = None
|
|
67
|
+
one_of_schemas: Set[str] = { "ActivityPayloadUnionActionCompleted", "ActivityPayloadUnionActionFailed", "ActivityPayloadUnionActionStarted", "ActivityPayloadUnionFileAdded", "ActivityPayloadUnionGeneric", "ActivityPayloadUnionGraphUpdated", "ActivityPayloadUnionStatusChanged", "ActivityPayloadUnionStepCompleted", "ActivityPayloadUnionStepStarted", "ActivityPayloadUnionTerminal", "ActivityPayloadUnionTransitionedNode", "ActivityPayloadUnionUserMessageReceived" }
|
|
65
68
|
|
|
66
69
|
model_config = ConfigDict(
|
|
67
70
|
validate_assignment=True,
|
|
@@ -142,12 +145,17 @@ class AgentsExecutionActivityPayloadUnion(BaseModel):
|
|
|
142
145
|
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionFileAdded`")
|
|
143
146
|
else:
|
|
144
147
|
match += 1
|
|
148
|
+
# validate data type: ActivityPayloadUnionGraphUpdated
|
|
149
|
+
if not isinstance(v, ActivityPayloadUnionGraphUpdated):
|
|
150
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ActivityPayloadUnionGraphUpdated`")
|
|
151
|
+
else:
|
|
152
|
+
match += 1
|
|
145
153
|
if match > 1:
|
|
146
154
|
# more than 1 match
|
|
147
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in AgentsExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
155
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in AgentsExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionGraphUpdated, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
148
156
|
elif match == 0:
|
|
149
157
|
# no match
|
|
150
|
-
raise ValueError("No match found when setting `actual_instance` in AgentsExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
158
|
+
raise ValueError("No match found when setting `actual_instance` in AgentsExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionGraphUpdated, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
151
159
|
else:
|
|
152
160
|
return v
|
|
153
161
|
|
|
@@ -228,13 +236,19 @@ class AgentsExecutionActivityPayloadUnion(BaseModel):
|
|
|
228
236
|
match += 1
|
|
229
237
|
except (ValidationError, ValueError) as e:
|
|
230
238
|
error_messages.append(str(e))
|
|
239
|
+
# deserialize data into ActivityPayloadUnionGraphUpdated
|
|
240
|
+
try:
|
|
241
|
+
instance.actual_instance = ActivityPayloadUnionGraphUpdated.from_json(json_str)
|
|
242
|
+
match += 1
|
|
243
|
+
except (ValidationError, ValueError) as e:
|
|
244
|
+
error_messages.append(str(e))
|
|
231
245
|
|
|
232
246
|
if match > 1:
|
|
233
247
|
# more than 1 match
|
|
234
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into AgentsExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
248
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into AgentsExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionGraphUpdated, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
235
249
|
elif match == 0:
|
|
236
250
|
# no match
|
|
237
|
-
raise ValueError("No match found when deserializing the JSON string into AgentsExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
251
|
+
raise ValueError("No match found when deserializing the JSON string into AgentsExecutionActivityPayloadUnion with oneOf schemas: ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionGraphUpdated, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived. Details: " + ", ".join(error_messages))
|
|
238
252
|
else:
|
|
239
253
|
return instance
|
|
240
254
|
|
|
@@ -248,7 +262,7 @@ class AgentsExecutionActivityPayloadUnion(BaseModel):
|
|
|
248
262
|
else:
|
|
249
263
|
return json.dumps(self.actual_instance)
|
|
250
264
|
|
|
251
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived]]:
|
|
265
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], ActivityPayloadUnionActionCompleted, ActivityPayloadUnionActionFailed, ActivityPayloadUnionActionStarted, ActivityPayloadUnionFileAdded, ActivityPayloadUnionGeneric, ActivityPayloadUnionGraphUpdated, ActivityPayloadUnionStatusChanged, ActivityPayloadUnionStepCompleted, ActivityPayloadUnionStepStarted, ActivityPayloadUnionTerminal, ActivityPayloadUnionTransitionedNode, ActivityPayloadUnionUserMessageReceived]]:
|
|
252
266
|
"""Returns the dict representation of the actual instance"""
|
|
253
267
|
if self.actual_instance is None:
|
|
254
268
|
return None
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from asteroid_odyssey.agents_v2_gen.models.agents_execution_node_details import AgentsExecutionNodeDetails
|
|
23
|
+
from asteroid_odyssey.agents_v2_gen.models.agents_execution_transition_details import AgentsExecutionTransitionDetails
|
|
24
|
+
from asteroid_odyssey.agents_v2_gen.models.agents_execution_update_type import AgentsExecutionUpdateType
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class AgentsExecutionGraphUpdate(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
AgentsExecutionGraphUpdate
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
node_details: Optional[AgentsExecutionNodeDetails] = Field(default=None, alias="nodeDetails")
|
|
33
|
+
transition_details: Optional[AgentsExecutionTransitionDetails] = Field(default=None, alias="transitionDetails")
|
|
34
|
+
update_type: AgentsExecutionUpdateType = Field(alias="updateType")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["nodeDetails", "transitionDetails", "updateType"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of AgentsExecutionGraphUpdate from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# override the default output from pydantic by calling `to_dict()` of node_details
|
|
77
|
+
if self.node_details:
|
|
78
|
+
_dict['nodeDetails'] = self.node_details.to_dict()
|
|
79
|
+
# override the default output from pydantic by calling `to_dict()` of transition_details
|
|
80
|
+
if self.transition_details:
|
|
81
|
+
_dict['transitionDetails'] = self.transition_details.to_dict()
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of AgentsExecutionGraphUpdate from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({
|
|
94
|
+
"nodeDetails": AgentsExecutionNodeDetails.from_dict(obj["nodeDetails"]) if obj.get("nodeDetails") is not None else None,
|
|
95
|
+
"transitionDetails": AgentsExecutionTransitionDetails.from_dict(obj["transitionDetails"]) if obj.get("transitionDetails") is not None else None,
|
|
96
|
+
"updateType": obj.get("updateType")
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AgentsExecutionNodeDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AgentsExecutionNodeDetails
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
node_id: StrictStr = Field(alias="nodeID")
|
|
30
|
+
node_name: StrictStr = Field(alias="nodeName")
|
|
31
|
+
node_type: StrictStr = Field(alias="nodeType")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["nodeID", "nodeName", "nodeType"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of AgentsExecutionNodeDetails from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
77
|
+
"""Create an instance of AgentsExecutionNodeDetails from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return cls.model_validate(obj)
|
|
83
|
+
|
|
84
|
+
_obj = cls.model_validate({
|
|
85
|
+
"nodeID": obj.get("nodeID"),
|
|
86
|
+
"nodeName": obj.get("nodeName"),
|
|
87
|
+
"nodeType": obj.get("nodeType")
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class AgentsExecutionTransitionDetails(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AgentsExecutionTransitionDetails
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
transition_id: StrictStr = Field(alias="transitionID")
|
|
30
|
+
transition_type: StrictStr = Field(alias="transitionType")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["transitionID", "transitionType"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of AgentsExecutionTransitionDetails from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of AgentsExecutionTransitionDetails from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"transitionID": obj.get("transitionID"),
|
|
85
|
+
"transitionType": obj.get("transitionType")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class AgentsExecutionUpdateType(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
AgentsExecutionUpdateType
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
ADD = 'add'
|
|
30
|
+
EDIT = 'edit'
|
|
31
|
+
DELETE = 'delete'
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_json(cls, json_str: str) -> Self:
|
|
35
|
+
"""Create an instance of AgentsExecutionUpdateType from a JSON string"""
|
|
36
|
+
return cls(json.loads(json_str))
|
|
37
|
+
|
|
38
|
+
|