asteroid-odyssey 1.0.3__py3-none-any.whl → 1.1.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/client.py +8 -11
- asteroid_odyssey/openapi_client/__init__.py +0 -2
- asteroid_odyssey/openapi_client/api/__init__.py +0 -1
- asteroid_odyssey/openapi_client/api/execution_api.py +1400 -1
- {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.1.0.dist-info}/METADATA +1 -1
- {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.1.0.dist-info}/RECORD +8 -9
- asteroid_odyssey/openapi_client/api/sdk_api.py +0 -1434
- {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.1.0.dist-info}/WHEEL +0 -0
- {asteroid_odyssey-1.0.3.dist-info → asteroid_odyssey-1.1.0.dist-info}/top_level.txt +0 -0
asteroid_odyssey/client.py
CHANGED
|
@@ -15,7 +15,7 @@ from typing import Dict, Any, Optional, List, Union, Tuple
|
|
|
15
15
|
from .openapi_client import (
|
|
16
16
|
Configuration,
|
|
17
17
|
ApiClient,
|
|
18
|
-
|
|
18
|
+
APIApi,
|
|
19
19
|
ExecutionApi,
|
|
20
20
|
ExecutionStatusResponse,
|
|
21
21
|
ExecutionResultResponse,
|
|
@@ -56,7 +56,7 @@ class AsteroidClient:
|
|
|
56
56
|
)
|
|
57
57
|
|
|
58
58
|
self.api_client = ApiClient(config)
|
|
59
|
-
self.
|
|
59
|
+
self.api_api = APIApi(self.api_client)
|
|
60
60
|
self.execution_api = ExecutionApi(self.api_client)
|
|
61
61
|
|
|
62
62
|
def execute_agent(self, agent_id: str, execution_data: Dict[str, Any], agent_profile_id: Optional[str] = None) -> str:
|
|
@@ -77,12 +77,9 @@ class AsteroidClient:
|
|
|
77
77
|
Example:
|
|
78
78
|
execution_id = client.execute_agent('my-agent-id', {'input': 'some dynamic value'}, 'agent-profile-id')
|
|
79
79
|
"""
|
|
80
|
-
req = StructuredAgentExecutionRequest(
|
|
81
|
-
dynamic_data=execution_data,
|
|
82
|
-
agent_profile_id=agent_profile_id
|
|
83
|
-
)
|
|
80
|
+
req = StructuredAgentExecutionRequest(dynamic_data=execution_data, agent_profile_id=agent_profile_id)
|
|
84
81
|
try:
|
|
85
|
-
response = self.
|
|
82
|
+
response = self.execution_api.execute_agent_structured(agent_id, req)
|
|
86
83
|
return response.execution_id
|
|
87
84
|
except ApiException as e:
|
|
88
85
|
raise Exception(f"Failed to execute agent: {e}")
|
|
@@ -105,7 +102,7 @@ class AsteroidClient:
|
|
|
105
102
|
print(status.status)
|
|
106
103
|
"""
|
|
107
104
|
try:
|
|
108
|
-
return self.
|
|
105
|
+
return self.execution_api.get_execution_status(execution_id)
|
|
109
106
|
except ApiException as e:
|
|
110
107
|
raise Exception(f"Failed to get execution status: {e}")
|
|
111
108
|
|
|
@@ -127,12 +124,12 @@ class AsteroidClient:
|
|
|
127
124
|
print(result)
|
|
128
125
|
"""
|
|
129
126
|
try:
|
|
130
|
-
response = self.
|
|
127
|
+
response = self.execution_api.get_execution_result(execution_id)
|
|
131
128
|
|
|
132
129
|
if response.error:
|
|
133
130
|
raise Exception(response.error)
|
|
134
131
|
|
|
135
|
-
return response.
|
|
132
|
+
return response.execution_result or {}
|
|
136
133
|
except ApiException as e:
|
|
137
134
|
raise Exception(f"Failed to get execution result: {e}")
|
|
138
135
|
|
|
@@ -273,7 +270,7 @@ class AsteroidClient:
|
|
|
273
270
|
print(f"Recording available at: {recording_url}")
|
|
274
271
|
"""
|
|
275
272
|
try:
|
|
276
|
-
response = self.
|
|
273
|
+
response = self.execution_api.get_browser_session_recording(execution_id)
|
|
277
274
|
return response.recording_url
|
|
278
275
|
except ApiException as e:
|
|
279
276
|
raise Exception(f"Failed to get browser session recording: {e}")
|
|
@@ -20,7 +20,6 @@ __version__ = "1.0.0"
|
|
|
20
20
|
__all__ = [
|
|
21
21
|
"APIApi",
|
|
22
22
|
"ExecutionApi",
|
|
23
|
-
"SDKApi",
|
|
24
23
|
"ApiResponse",
|
|
25
24
|
"ApiClient",
|
|
26
25
|
"Configuration",
|
|
@@ -46,7 +45,6 @@ __all__ = [
|
|
|
46
45
|
# import apis into sdk package
|
|
47
46
|
from asteroid_odyssey.openapi_client.api.api_api import APIApi as APIApi
|
|
48
47
|
from asteroid_odyssey.openapi_client.api.execution_api import ExecutionApi as ExecutionApi
|
|
49
|
-
from asteroid_odyssey.openapi_client.api.sdk_api import SDKApi as SDKApi
|
|
50
48
|
|
|
51
49
|
# import ApiClient
|
|
52
50
|
from asteroid_odyssey.openapi_client.api_response import ApiResponse as ApiResponse
|