athena-intelligence 0.1.203__py3-none-any.whl → 0.1.205__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.
Potentially problematic release.
This version of athena-intelligence might be problematic. Click here for more details.
- athena/__init__.py +8 -3
- athena/aop/__init__.py +4 -0
- athena/aop/client.py +201 -0
- athena/aop/raw_client.py +433 -0
- athena/base_client.py +3 -0
- athena/core/client_wrapper.py +2 -2
- athena/errors/bad_request_error.py +1 -2
- athena/tools/raw_client.py +8 -9
- athena/types/__init__.py +6 -2
- athena/types/aop_async_execute_response_out.py +76 -0
- athena/types/{parent_folder_error.py → aop_execute_request_in.py} +14 -2
- athena/types/aop_execute_response_out.py +76 -0
- {athena_intelligence-0.1.203.dist-info → athena_intelligence-0.1.205.dist-info}/METADATA +1 -1
- {athena_intelligence-0.1.203.dist-info → athena_intelligence-0.1.205.dist-info}/RECORD +15 -10
- {athena_intelligence-0.1.203.dist-info → athena_intelligence-0.1.205.dist-info}/WHEEL +0 -0
athena/__init__.py
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
5
|
from .types import (
|
|
6
|
+
AopAsyncExecuteResponseOut,
|
|
7
|
+
AopExecuteRequestIn,
|
|
8
|
+
AopExecuteResponseOut,
|
|
6
9
|
AssetContentRequestOut,
|
|
7
10
|
AssetNode,
|
|
8
11
|
AssetNotFoundError,
|
|
@@ -40,7 +43,6 @@ from .types import (
|
|
|
40
43
|
InputMessageContentItem_ImageUrl,
|
|
41
44
|
InputMessageContentItem_Text,
|
|
42
45
|
PaginatedAssetsOut,
|
|
43
|
-
ParentFolderError,
|
|
44
46
|
PromptMessage,
|
|
45
47
|
PublicAssetOut,
|
|
46
48
|
ResearchAgentResponse,
|
|
@@ -60,7 +62,7 @@ from .errors import (
|
|
|
60
62
|
UnprocessableEntityError,
|
|
61
63
|
UnsupportedMediaTypeError,
|
|
62
64
|
)
|
|
63
|
-
from . import agents, assets, query, tools
|
|
65
|
+
from . import agents, aop, assets, query, tools
|
|
64
66
|
from .client import AsyncAthena, Athena
|
|
65
67
|
from .environment import AthenaEnvironment
|
|
66
68
|
from .query import QueryExecuteRequestDatabaseAssetIds
|
|
@@ -68,6 +70,9 @@ from .tools import ToolsDataFrameRequestColumnsItem
|
|
|
68
70
|
from .version import __version__
|
|
69
71
|
|
|
70
72
|
__all__ = [
|
|
73
|
+
"AopAsyncExecuteResponseOut",
|
|
74
|
+
"AopExecuteRequestIn",
|
|
75
|
+
"AopExecuteResponseOut",
|
|
71
76
|
"AssetContentRequestOut",
|
|
72
77
|
"AssetNode",
|
|
73
78
|
"AssetNotFoundError",
|
|
@@ -112,7 +117,6 @@ __all__ = [
|
|
|
112
117
|
"InternalServerError",
|
|
113
118
|
"NotFoundError",
|
|
114
119
|
"PaginatedAssetsOut",
|
|
115
|
-
"ParentFolderError",
|
|
116
120
|
"PromptMessage",
|
|
117
121
|
"PublicAssetOut",
|
|
118
122
|
"QueryExecuteRequestDatabaseAssetIds",
|
|
@@ -129,6 +133,7 @@ __all__ = [
|
|
|
129
133
|
"UnsupportedMediaTypeError",
|
|
130
134
|
"__version__",
|
|
131
135
|
"agents",
|
|
136
|
+
"aop",
|
|
132
137
|
"assets",
|
|
133
138
|
"query",
|
|
134
139
|
"tools",
|
athena/aop/__init__.py
ADDED
athena/aop/client.py
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.aop_async_execute_response_out import AopAsyncExecuteResponseOut
|
|
8
|
+
from ..types.aop_execute_request_in import AopExecuteRequestIn
|
|
9
|
+
from ..types.aop_execute_response_out import AopExecuteResponseOut
|
|
10
|
+
from .raw_client import AsyncRawAopClient, RawAopClient
|
|
11
|
+
|
|
12
|
+
# this is used as the default value for optional parameters
|
|
13
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class AopClient:
|
|
17
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
18
|
+
self._raw_client = RawAopClient(client_wrapper=client_wrapper)
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def with_raw_response(self) -> RawAopClient:
|
|
22
|
+
"""
|
|
23
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
24
|
+
|
|
25
|
+
Returns
|
|
26
|
+
-------
|
|
27
|
+
RawAopClient
|
|
28
|
+
"""
|
|
29
|
+
return self._raw_client
|
|
30
|
+
|
|
31
|
+
def execute(
|
|
32
|
+
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
33
|
+
) -> AopExecuteResponseOut:
|
|
34
|
+
"""
|
|
35
|
+
Execute an existing Agent Operating Procedure (AOP) asset with optional user inputs. AOPs are pre-configured AI workflows that can perform complex tasks like research, analysis, and content generation.
|
|
36
|
+
|
|
37
|
+
Parameters
|
|
38
|
+
----------
|
|
39
|
+
request : AopExecuteRequestIn
|
|
40
|
+
|
|
41
|
+
request_options : typing.Optional[RequestOptions]
|
|
42
|
+
Request-specific configuration.
|
|
43
|
+
|
|
44
|
+
Returns
|
|
45
|
+
-------
|
|
46
|
+
AopExecuteResponseOut
|
|
47
|
+
AOP execution started successfully
|
|
48
|
+
|
|
49
|
+
Examples
|
|
50
|
+
--------
|
|
51
|
+
from athena import AopExecuteRequestIn, Athena
|
|
52
|
+
|
|
53
|
+
client = Athena(
|
|
54
|
+
api_key="YOUR_API_KEY",
|
|
55
|
+
)
|
|
56
|
+
client.aop.execute(
|
|
57
|
+
request=AopExecuteRequestIn(
|
|
58
|
+
asset_id="asset_9249292-d118-42d3-95b4-00eccfe0754f",
|
|
59
|
+
user_inputs={"company": "Acme Corp", "quarter": "Q1 2024"},
|
|
60
|
+
),
|
|
61
|
+
)
|
|
62
|
+
"""
|
|
63
|
+
_response = self._raw_client.execute(request=request, request_options=request_options)
|
|
64
|
+
return _response.data
|
|
65
|
+
|
|
66
|
+
def execute_async(
|
|
67
|
+
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
68
|
+
) -> AopAsyncExecuteResponseOut:
|
|
69
|
+
"""
|
|
70
|
+
Start execution of an Agent Operating Procedure (AOP) asset asynchronously. Returns immediately with a thread_id for tracking execution progress without waiting for completion.
|
|
71
|
+
|
|
72
|
+
Parameters
|
|
73
|
+
----------
|
|
74
|
+
request : AopExecuteRequestIn
|
|
75
|
+
|
|
76
|
+
request_options : typing.Optional[RequestOptions]
|
|
77
|
+
Request-specific configuration.
|
|
78
|
+
|
|
79
|
+
Returns
|
|
80
|
+
-------
|
|
81
|
+
AopAsyncExecuteResponseOut
|
|
82
|
+
AOP execution started successfully
|
|
83
|
+
|
|
84
|
+
Examples
|
|
85
|
+
--------
|
|
86
|
+
from athena import AopExecuteRequestIn, Athena
|
|
87
|
+
|
|
88
|
+
client = Athena(
|
|
89
|
+
api_key="YOUR_API_KEY",
|
|
90
|
+
)
|
|
91
|
+
client.aop.execute_async(
|
|
92
|
+
request=AopExecuteRequestIn(
|
|
93
|
+
asset_id="asset_9249292-d118-42d3-95b4-00eccfe0754f",
|
|
94
|
+
user_inputs={"company": "Acme Corp", "quarter": "Q1 2024"},
|
|
95
|
+
),
|
|
96
|
+
)
|
|
97
|
+
"""
|
|
98
|
+
_response = self._raw_client.execute_async(request=request, request_options=request_options)
|
|
99
|
+
return _response.data
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class AsyncAopClient:
|
|
103
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
104
|
+
self._raw_client = AsyncRawAopClient(client_wrapper=client_wrapper)
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def with_raw_response(self) -> AsyncRawAopClient:
|
|
108
|
+
"""
|
|
109
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
110
|
+
|
|
111
|
+
Returns
|
|
112
|
+
-------
|
|
113
|
+
AsyncRawAopClient
|
|
114
|
+
"""
|
|
115
|
+
return self._raw_client
|
|
116
|
+
|
|
117
|
+
async def execute(
|
|
118
|
+
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
119
|
+
) -> AopExecuteResponseOut:
|
|
120
|
+
"""
|
|
121
|
+
Execute an existing Agent Operating Procedure (AOP) asset with optional user inputs. AOPs are pre-configured AI workflows that can perform complex tasks like research, analysis, and content generation.
|
|
122
|
+
|
|
123
|
+
Parameters
|
|
124
|
+
----------
|
|
125
|
+
request : AopExecuteRequestIn
|
|
126
|
+
|
|
127
|
+
request_options : typing.Optional[RequestOptions]
|
|
128
|
+
Request-specific configuration.
|
|
129
|
+
|
|
130
|
+
Returns
|
|
131
|
+
-------
|
|
132
|
+
AopExecuteResponseOut
|
|
133
|
+
AOP execution started successfully
|
|
134
|
+
|
|
135
|
+
Examples
|
|
136
|
+
--------
|
|
137
|
+
import asyncio
|
|
138
|
+
|
|
139
|
+
from athena import AopExecuteRequestIn, AsyncAthena
|
|
140
|
+
|
|
141
|
+
client = AsyncAthena(
|
|
142
|
+
api_key="YOUR_API_KEY",
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
async def main() -> None:
|
|
147
|
+
await client.aop.execute(
|
|
148
|
+
request=AopExecuteRequestIn(
|
|
149
|
+
asset_id="asset_9249292-d118-42d3-95b4-00eccfe0754f",
|
|
150
|
+
user_inputs={"company": "Acme Corp", "quarter": "Q1 2024"},
|
|
151
|
+
),
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
asyncio.run(main())
|
|
156
|
+
"""
|
|
157
|
+
_response = await self._raw_client.execute(request=request, request_options=request_options)
|
|
158
|
+
return _response.data
|
|
159
|
+
|
|
160
|
+
async def execute_async(
|
|
161
|
+
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
162
|
+
) -> AopAsyncExecuteResponseOut:
|
|
163
|
+
"""
|
|
164
|
+
Start execution of an Agent Operating Procedure (AOP) asset asynchronously. Returns immediately with a thread_id for tracking execution progress without waiting for completion.
|
|
165
|
+
|
|
166
|
+
Parameters
|
|
167
|
+
----------
|
|
168
|
+
request : AopExecuteRequestIn
|
|
169
|
+
|
|
170
|
+
request_options : typing.Optional[RequestOptions]
|
|
171
|
+
Request-specific configuration.
|
|
172
|
+
|
|
173
|
+
Returns
|
|
174
|
+
-------
|
|
175
|
+
AopAsyncExecuteResponseOut
|
|
176
|
+
AOP execution started successfully
|
|
177
|
+
|
|
178
|
+
Examples
|
|
179
|
+
--------
|
|
180
|
+
import asyncio
|
|
181
|
+
|
|
182
|
+
from athena import AopExecuteRequestIn, AsyncAthena
|
|
183
|
+
|
|
184
|
+
client = AsyncAthena(
|
|
185
|
+
api_key="YOUR_API_KEY",
|
|
186
|
+
)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
async def main() -> None:
|
|
190
|
+
await client.aop.execute_async(
|
|
191
|
+
request=AopExecuteRequestIn(
|
|
192
|
+
asset_id="asset_9249292-d118-42d3-95b4-00eccfe0754f",
|
|
193
|
+
user_inputs={"company": "Acme Corp", "quarter": "Q1 2024"},
|
|
194
|
+
),
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
asyncio.run(main())
|
|
199
|
+
"""
|
|
200
|
+
_response = await self._raw_client.execute_async(request=request, request_options=request_options)
|
|
201
|
+
return _response.data
|
athena/aop/raw_client.py
ADDED
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from ..core.api_error import ApiError
|
|
7
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ..core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
+
from ..core.pydantic_utilities import parse_obj_as
|
|
10
|
+
from ..core.request_options import RequestOptions
|
|
11
|
+
from ..core.serialization import convert_and_respect_annotation_metadata
|
|
12
|
+
from ..errors.bad_request_error import BadRequestError
|
|
13
|
+
from ..errors.internal_server_error import InternalServerError
|
|
14
|
+
from ..errors.not_found_error import NotFoundError
|
|
15
|
+
from ..errors.unauthorized_error import UnauthorizedError
|
|
16
|
+
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
17
|
+
from ..types.aop_async_execute_response_out import AopAsyncExecuteResponseOut
|
|
18
|
+
from ..types.aop_execute_request_in import AopExecuteRequestIn
|
|
19
|
+
from ..types.aop_execute_response_out import AopExecuteResponseOut
|
|
20
|
+
from ..types.asset_not_found_error import AssetNotFoundError
|
|
21
|
+
|
|
22
|
+
# this is used as the default value for optional parameters
|
|
23
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class RawAopClient:
|
|
27
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
28
|
+
self._client_wrapper = client_wrapper
|
|
29
|
+
|
|
30
|
+
def execute(
|
|
31
|
+
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
32
|
+
) -> HttpResponse[AopExecuteResponseOut]:
|
|
33
|
+
"""
|
|
34
|
+
Execute an existing Agent Operating Procedure (AOP) asset with optional user inputs. AOPs are pre-configured AI workflows that can perform complex tasks like research, analysis, and content generation.
|
|
35
|
+
|
|
36
|
+
Parameters
|
|
37
|
+
----------
|
|
38
|
+
request : AopExecuteRequestIn
|
|
39
|
+
|
|
40
|
+
request_options : typing.Optional[RequestOptions]
|
|
41
|
+
Request-specific configuration.
|
|
42
|
+
|
|
43
|
+
Returns
|
|
44
|
+
-------
|
|
45
|
+
HttpResponse[AopExecuteResponseOut]
|
|
46
|
+
AOP execution started successfully
|
|
47
|
+
"""
|
|
48
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
49
|
+
"api/v0/aop/execute",
|
|
50
|
+
method="POST",
|
|
51
|
+
json=convert_and_respect_annotation_metadata(
|
|
52
|
+
object_=request, annotation=AopExecuteRequestIn, direction="write"
|
|
53
|
+
),
|
|
54
|
+
headers={
|
|
55
|
+
"content-type": "application/json",
|
|
56
|
+
},
|
|
57
|
+
request_options=request_options,
|
|
58
|
+
omit=OMIT,
|
|
59
|
+
)
|
|
60
|
+
try:
|
|
61
|
+
if 200 <= _response.status_code < 300:
|
|
62
|
+
_data = typing.cast(
|
|
63
|
+
AopExecuteResponseOut,
|
|
64
|
+
parse_obj_as(
|
|
65
|
+
type_=AopExecuteResponseOut, # type: ignore
|
|
66
|
+
object_=_response.json(),
|
|
67
|
+
),
|
|
68
|
+
)
|
|
69
|
+
return HttpResponse(response=_response, data=_data)
|
|
70
|
+
if _response.status_code == 400:
|
|
71
|
+
raise BadRequestError(
|
|
72
|
+
headers=dict(_response.headers),
|
|
73
|
+
body=typing.cast(
|
|
74
|
+
typing.Optional[typing.Any],
|
|
75
|
+
parse_obj_as(
|
|
76
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
77
|
+
object_=_response.json(),
|
|
78
|
+
),
|
|
79
|
+
),
|
|
80
|
+
)
|
|
81
|
+
if _response.status_code == 401:
|
|
82
|
+
raise UnauthorizedError(
|
|
83
|
+
headers=dict(_response.headers),
|
|
84
|
+
body=typing.cast(
|
|
85
|
+
typing.Optional[typing.Any],
|
|
86
|
+
parse_obj_as(
|
|
87
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
88
|
+
object_=_response.json(),
|
|
89
|
+
),
|
|
90
|
+
),
|
|
91
|
+
)
|
|
92
|
+
if _response.status_code == 404:
|
|
93
|
+
raise NotFoundError(
|
|
94
|
+
headers=dict(_response.headers),
|
|
95
|
+
body=typing.cast(
|
|
96
|
+
AssetNotFoundError,
|
|
97
|
+
parse_obj_as(
|
|
98
|
+
type_=AssetNotFoundError, # type: ignore
|
|
99
|
+
object_=_response.json(),
|
|
100
|
+
),
|
|
101
|
+
),
|
|
102
|
+
)
|
|
103
|
+
if _response.status_code == 422:
|
|
104
|
+
raise UnprocessableEntityError(
|
|
105
|
+
headers=dict(_response.headers),
|
|
106
|
+
body=typing.cast(
|
|
107
|
+
typing.Optional[typing.Any],
|
|
108
|
+
parse_obj_as(
|
|
109
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
110
|
+
object_=_response.json(),
|
|
111
|
+
),
|
|
112
|
+
),
|
|
113
|
+
)
|
|
114
|
+
if _response.status_code == 500:
|
|
115
|
+
raise InternalServerError(
|
|
116
|
+
headers=dict(_response.headers),
|
|
117
|
+
body=typing.cast(
|
|
118
|
+
typing.Optional[typing.Any],
|
|
119
|
+
parse_obj_as(
|
|
120
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
121
|
+
object_=_response.json(),
|
|
122
|
+
),
|
|
123
|
+
),
|
|
124
|
+
)
|
|
125
|
+
_response_json = _response.json()
|
|
126
|
+
except JSONDecodeError:
|
|
127
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
128
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
129
|
+
|
|
130
|
+
def execute_async(
|
|
131
|
+
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
132
|
+
) -> HttpResponse[AopAsyncExecuteResponseOut]:
|
|
133
|
+
"""
|
|
134
|
+
Start execution of an Agent Operating Procedure (AOP) asset asynchronously. Returns immediately with a thread_id for tracking execution progress without waiting for completion.
|
|
135
|
+
|
|
136
|
+
Parameters
|
|
137
|
+
----------
|
|
138
|
+
request : AopExecuteRequestIn
|
|
139
|
+
|
|
140
|
+
request_options : typing.Optional[RequestOptions]
|
|
141
|
+
Request-specific configuration.
|
|
142
|
+
|
|
143
|
+
Returns
|
|
144
|
+
-------
|
|
145
|
+
HttpResponse[AopAsyncExecuteResponseOut]
|
|
146
|
+
AOP execution started successfully
|
|
147
|
+
"""
|
|
148
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
149
|
+
"api/v0/aop/execute-async",
|
|
150
|
+
method="POST",
|
|
151
|
+
json=convert_and_respect_annotation_metadata(
|
|
152
|
+
object_=request, annotation=AopExecuteRequestIn, direction="write"
|
|
153
|
+
),
|
|
154
|
+
headers={
|
|
155
|
+
"content-type": "application/json",
|
|
156
|
+
},
|
|
157
|
+
request_options=request_options,
|
|
158
|
+
omit=OMIT,
|
|
159
|
+
)
|
|
160
|
+
try:
|
|
161
|
+
if 200 <= _response.status_code < 300:
|
|
162
|
+
_data = typing.cast(
|
|
163
|
+
AopAsyncExecuteResponseOut,
|
|
164
|
+
parse_obj_as(
|
|
165
|
+
type_=AopAsyncExecuteResponseOut, # type: ignore
|
|
166
|
+
object_=_response.json(),
|
|
167
|
+
),
|
|
168
|
+
)
|
|
169
|
+
return HttpResponse(response=_response, data=_data)
|
|
170
|
+
if _response.status_code == 400:
|
|
171
|
+
raise BadRequestError(
|
|
172
|
+
headers=dict(_response.headers),
|
|
173
|
+
body=typing.cast(
|
|
174
|
+
typing.Optional[typing.Any],
|
|
175
|
+
parse_obj_as(
|
|
176
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
177
|
+
object_=_response.json(),
|
|
178
|
+
),
|
|
179
|
+
),
|
|
180
|
+
)
|
|
181
|
+
if _response.status_code == 401:
|
|
182
|
+
raise UnauthorizedError(
|
|
183
|
+
headers=dict(_response.headers),
|
|
184
|
+
body=typing.cast(
|
|
185
|
+
typing.Optional[typing.Any],
|
|
186
|
+
parse_obj_as(
|
|
187
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
188
|
+
object_=_response.json(),
|
|
189
|
+
),
|
|
190
|
+
),
|
|
191
|
+
)
|
|
192
|
+
if _response.status_code == 404:
|
|
193
|
+
raise NotFoundError(
|
|
194
|
+
headers=dict(_response.headers),
|
|
195
|
+
body=typing.cast(
|
|
196
|
+
AssetNotFoundError,
|
|
197
|
+
parse_obj_as(
|
|
198
|
+
type_=AssetNotFoundError, # type: ignore
|
|
199
|
+
object_=_response.json(),
|
|
200
|
+
),
|
|
201
|
+
),
|
|
202
|
+
)
|
|
203
|
+
if _response.status_code == 422:
|
|
204
|
+
raise UnprocessableEntityError(
|
|
205
|
+
headers=dict(_response.headers),
|
|
206
|
+
body=typing.cast(
|
|
207
|
+
typing.Optional[typing.Any],
|
|
208
|
+
parse_obj_as(
|
|
209
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
210
|
+
object_=_response.json(),
|
|
211
|
+
),
|
|
212
|
+
),
|
|
213
|
+
)
|
|
214
|
+
if _response.status_code == 500:
|
|
215
|
+
raise InternalServerError(
|
|
216
|
+
headers=dict(_response.headers),
|
|
217
|
+
body=typing.cast(
|
|
218
|
+
typing.Optional[typing.Any],
|
|
219
|
+
parse_obj_as(
|
|
220
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
221
|
+
object_=_response.json(),
|
|
222
|
+
),
|
|
223
|
+
),
|
|
224
|
+
)
|
|
225
|
+
_response_json = _response.json()
|
|
226
|
+
except JSONDecodeError:
|
|
227
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
228
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
class AsyncRawAopClient:
|
|
232
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
233
|
+
self._client_wrapper = client_wrapper
|
|
234
|
+
|
|
235
|
+
async def execute(
|
|
236
|
+
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
237
|
+
) -> AsyncHttpResponse[AopExecuteResponseOut]:
|
|
238
|
+
"""
|
|
239
|
+
Execute an existing Agent Operating Procedure (AOP) asset with optional user inputs. AOPs are pre-configured AI workflows that can perform complex tasks like research, analysis, and content generation.
|
|
240
|
+
|
|
241
|
+
Parameters
|
|
242
|
+
----------
|
|
243
|
+
request : AopExecuteRequestIn
|
|
244
|
+
|
|
245
|
+
request_options : typing.Optional[RequestOptions]
|
|
246
|
+
Request-specific configuration.
|
|
247
|
+
|
|
248
|
+
Returns
|
|
249
|
+
-------
|
|
250
|
+
AsyncHttpResponse[AopExecuteResponseOut]
|
|
251
|
+
AOP execution started successfully
|
|
252
|
+
"""
|
|
253
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
254
|
+
"api/v0/aop/execute",
|
|
255
|
+
method="POST",
|
|
256
|
+
json=convert_and_respect_annotation_metadata(
|
|
257
|
+
object_=request, annotation=AopExecuteRequestIn, direction="write"
|
|
258
|
+
),
|
|
259
|
+
headers={
|
|
260
|
+
"content-type": "application/json",
|
|
261
|
+
},
|
|
262
|
+
request_options=request_options,
|
|
263
|
+
omit=OMIT,
|
|
264
|
+
)
|
|
265
|
+
try:
|
|
266
|
+
if 200 <= _response.status_code < 300:
|
|
267
|
+
_data = typing.cast(
|
|
268
|
+
AopExecuteResponseOut,
|
|
269
|
+
parse_obj_as(
|
|
270
|
+
type_=AopExecuteResponseOut, # type: ignore
|
|
271
|
+
object_=_response.json(),
|
|
272
|
+
),
|
|
273
|
+
)
|
|
274
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
275
|
+
if _response.status_code == 400:
|
|
276
|
+
raise BadRequestError(
|
|
277
|
+
headers=dict(_response.headers),
|
|
278
|
+
body=typing.cast(
|
|
279
|
+
typing.Optional[typing.Any],
|
|
280
|
+
parse_obj_as(
|
|
281
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
282
|
+
object_=_response.json(),
|
|
283
|
+
),
|
|
284
|
+
),
|
|
285
|
+
)
|
|
286
|
+
if _response.status_code == 401:
|
|
287
|
+
raise UnauthorizedError(
|
|
288
|
+
headers=dict(_response.headers),
|
|
289
|
+
body=typing.cast(
|
|
290
|
+
typing.Optional[typing.Any],
|
|
291
|
+
parse_obj_as(
|
|
292
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
293
|
+
object_=_response.json(),
|
|
294
|
+
),
|
|
295
|
+
),
|
|
296
|
+
)
|
|
297
|
+
if _response.status_code == 404:
|
|
298
|
+
raise NotFoundError(
|
|
299
|
+
headers=dict(_response.headers),
|
|
300
|
+
body=typing.cast(
|
|
301
|
+
AssetNotFoundError,
|
|
302
|
+
parse_obj_as(
|
|
303
|
+
type_=AssetNotFoundError, # type: ignore
|
|
304
|
+
object_=_response.json(),
|
|
305
|
+
),
|
|
306
|
+
),
|
|
307
|
+
)
|
|
308
|
+
if _response.status_code == 422:
|
|
309
|
+
raise UnprocessableEntityError(
|
|
310
|
+
headers=dict(_response.headers),
|
|
311
|
+
body=typing.cast(
|
|
312
|
+
typing.Optional[typing.Any],
|
|
313
|
+
parse_obj_as(
|
|
314
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
315
|
+
object_=_response.json(),
|
|
316
|
+
),
|
|
317
|
+
),
|
|
318
|
+
)
|
|
319
|
+
if _response.status_code == 500:
|
|
320
|
+
raise InternalServerError(
|
|
321
|
+
headers=dict(_response.headers),
|
|
322
|
+
body=typing.cast(
|
|
323
|
+
typing.Optional[typing.Any],
|
|
324
|
+
parse_obj_as(
|
|
325
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
326
|
+
object_=_response.json(),
|
|
327
|
+
),
|
|
328
|
+
),
|
|
329
|
+
)
|
|
330
|
+
_response_json = _response.json()
|
|
331
|
+
except JSONDecodeError:
|
|
332
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
333
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
334
|
+
|
|
335
|
+
async def execute_async(
|
|
336
|
+
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
337
|
+
) -> AsyncHttpResponse[AopAsyncExecuteResponseOut]:
|
|
338
|
+
"""
|
|
339
|
+
Start execution of an Agent Operating Procedure (AOP) asset asynchronously. Returns immediately with a thread_id for tracking execution progress without waiting for completion.
|
|
340
|
+
|
|
341
|
+
Parameters
|
|
342
|
+
----------
|
|
343
|
+
request : AopExecuteRequestIn
|
|
344
|
+
|
|
345
|
+
request_options : typing.Optional[RequestOptions]
|
|
346
|
+
Request-specific configuration.
|
|
347
|
+
|
|
348
|
+
Returns
|
|
349
|
+
-------
|
|
350
|
+
AsyncHttpResponse[AopAsyncExecuteResponseOut]
|
|
351
|
+
AOP execution started successfully
|
|
352
|
+
"""
|
|
353
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
354
|
+
"api/v0/aop/execute-async",
|
|
355
|
+
method="POST",
|
|
356
|
+
json=convert_and_respect_annotation_metadata(
|
|
357
|
+
object_=request, annotation=AopExecuteRequestIn, direction="write"
|
|
358
|
+
),
|
|
359
|
+
headers={
|
|
360
|
+
"content-type": "application/json",
|
|
361
|
+
},
|
|
362
|
+
request_options=request_options,
|
|
363
|
+
omit=OMIT,
|
|
364
|
+
)
|
|
365
|
+
try:
|
|
366
|
+
if 200 <= _response.status_code < 300:
|
|
367
|
+
_data = typing.cast(
|
|
368
|
+
AopAsyncExecuteResponseOut,
|
|
369
|
+
parse_obj_as(
|
|
370
|
+
type_=AopAsyncExecuteResponseOut, # type: ignore
|
|
371
|
+
object_=_response.json(),
|
|
372
|
+
),
|
|
373
|
+
)
|
|
374
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
375
|
+
if _response.status_code == 400:
|
|
376
|
+
raise BadRequestError(
|
|
377
|
+
headers=dict(_response.headers),
|
|
378
|
+
body=typing.cast(
|
|
379
|
+
typing.Optional[typing.Any],
|
|
380
|
+
parse_obj_as(
|
|
381
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
382
|
+
object_=_response.json(),
|
|
383
|
+
),
|
|
384
|
+
),
|
|
385
|
+
)
|
|
386
|
+
if _response.status_code == 401:
|
|
387
|
+
raise UnauthorizedError(
|
|
388
|
+
headers=dict(_response.headers),
|
|
389
|
+
body=typing.cast(
|
|
390
|
+
typing.Optional[typing.Any],
|
|
391
|
+
parse_obj_as(
|
|
392
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
393
|
+
object_=_response.json(),
|
|
394
|
+
),
|
|
395
|
+
),
|
|
396
|
+
)
|
|
397
|
+
if _response.status_code == 404:
|
|
398
|
+
raise NotFoundError(
|
|
399
|
+
headers=dict(_response.headers),
|
|
400
|
+
body=typing.cast(
|
|
401
|
+
AssetNotFoundError,
|
|
402
|
+
parse_obj_as(
|
|
403
|
+
type_=AssetNotFoundError, # type: ignore
|
|
404
|
+
object_=_response.json(),
|
|
405
|
+
),
|
|
406
|
+
),
|
|
407
|
+
)
|
|
408
|
+
if _response.status_code == 422:
|
|
409
|
+
raise UnprocessableEntityError(
|
|
410
|
+
headers=dict(_response.headers),
|
|
411
|
+
body=typing.cast(
|
|
412
|
+
typing.Optional[typing.Any],
|
|
413
|
+
parse_obj_as(
|
|
414
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
415
|
+
object_=_response.json(),
|
|
416
|
+
),
|
|
417
|
+
),
|
|
418
|
+
)
|
|
419
|
+
if _response.status_code == 500:
|
|
420
|
+
raise InternalServerError(
|
|
421
|
+
headers=dict(_response.headers),
|
|
422
|
+
body=typing.cast(
|
|
423
|
+
typing.Optional[typing.Any],
|
|
424
|
+
parse_obj_as(
|
|
425
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
426
|
+
object_=_response.json(),
|
|
427
|
+
),
|
|
428
|
+
),
|
|
429
|
+
)
|
|
430
|
+
_response_json = _response.json()
|
|
431
|
+
except JSONDecodeError:
|
|
432
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
433
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
athena/base_client.py
CHANGED
|
@@ -4,6 +4,7 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
6
6
|
from .agents.client import AgentsClient, AsyncAgentsClient
|
|
7
|
+
from .aop.client import AopClient, AsyncAopClient
|
|
7
8
|
from .assets.client import AssetsClient, AsyncAssetsClient
|
|
8
9
|
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
9
10
|
from .environment import AthenaEnvironment
|
|
@@ -77,6 +78,7 @@ class BaseAthena:
|
|
|
77
78
|
timeout=_defaulted_timeout,
|
|
78
79
|
)
|
|
79
80
|
self.agents = AgentsClient(client_wrapper=self._client_wrapper)
|
|
81
|
+
self.aop = AopClient(client_wrapper=self._client_wrapper)
|
|
80
82
|
self.assets = AssetsClient(client_wrapper=self._client_wrapper)
|
|
81
83
|
self.query = QueryClient(client_wrapper=self._client_wrapper)
|
|
82
84
|
self.tools = ToolsClient(client_wrapper=self._client_wrapper)
|
|
@@ -148,6 +150,7 @@ class AsyncBaseAthena:
|
|
|
148
150
|
timeout=_defaulted_timeout,
|
|
149
151
|
)
|
|
150
152
|
self.agents = AsyncAgentsClient(client_wrapper=self._client_wrapper)
|
|
153
|
+
self.aop = AsyncAopClient(client_wrapper=self._client_wrapper)
|
|
151
154
|
self.assets = AsyncAssetsClient(client_wrapper=self._client_wrapper)
|
|
152
155
|
self.query = AsyncQueryClient(client_wrapper=self._client_wrapper)
|
|
153
156
|
self.tools = AsyncToolsClient(client_wrapper=self._client_wrapper)
|
athena/core/client_wrapper.py
CHANGED
|
@@ -22,10 +22,10 @@ class BaseClientWrapper:
|
|
|
22
22
|
|
|
23
23
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
24
24
|
headers: typing.Dict[str, str] = {
|
|
25
|
-
"User-Agent": "athena-intelligence/0.1.
|
|
25
|
+
"User-Agent": "athena-intelligence/0.1.205",
|
|
26
26
|
"X-Fern-Language": "Python",
|
|
27
27
|
"X-Fern-SDK-Name": "athena-intelligence",
|
|
28
|
-
"X-Fern-SDK-Version": "0.1.
|
|
28
|
+
"X-Fern-SDK-Version": "0.1.205",
|
|
29
29
|
**(self.get_custom_headers() or {}),
|
|
30
30
|
}
|
|
31
31
|
headers["X-API-KEY"] = self.api_key
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
5
|
from ..core.api_error import ApiError
|
|
6
|
-
from ..types.parent_folder_error import ParentFolderError
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
class BadRequestError(ApiError):
|
|
10
|
-
def __init__(self, body:
|
|
9
|
+
def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
11
10
|
super().__init__(status_code=400, headers=headers, body=body)
|
athena/tools/raw_client.py
CHANGED
|
@@ -25,7 +25,6 @@ from ..types.data_frame_unknown_format_error import DataFrameUnknownFormatError
|
|
|
25
25
|
from ..types.file_chunk_request_out import FileChunkRequestOut
|
|
26
26
|
from ..types.file_too_large_error import FileTooLargeError
|
|
27
27
|
from ..types.folder_response import FolderResponse
|
|
28
|
-
from ..types.parent_folder_error import ParentFolderError
|
|
29
28
|
from ..types.save_asset_request_out import SaveAssetRequestOut
|
|
30
29
|
from .types.tools_data_frame_request_columns_item import ToolsDataFrameRequestColumnsItem
|
|
31
30
|
|
|
@@ -337,9 +336,9 @@ class RawToolsClient:
|
|
|
337
336
|
raise BadRequestError(
|
|
338
337
|
headers=dict(_response.headers),
|
|
339
338
|
body=typing.cast(
|
|
340
|
-
|
|
339
|
+
typing.Optional[typing.Any],
|
|
341
340
|
parse_obj_as(
|
|
342
|
-
type_=
|
|
341
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
343
342
|
object_=_response.json(),
|
|
344
343
|
),
|
|
345
344
|
),
|
|
@@ -645,9 +644,9 @@ class RawToolsClient:
|
|
|
645
644
|
raise BadRequestError(
|
|
646
645
|
headers=dict(_response.headers),
|
|
647
646
|
body=typing.cast(
|
|
648
|
-
|
|
647
|
+
typing.Optional[typing.Any],
|
|
649
648
|
parse_obj_as(
|
|
650
|
-
type_=
|
|
649
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
651
650
|
object_=_response.json(),
|
|
652
651
|
),
|
|
653
652
|
),
|
|
@@ -984,9 +983,9 @@ class AsyncRawToolsClient:
|
|
|
984
983
|
raise BadRequestError(
|
|
985
984
|
headers=dict(_response.headers),
|
|
986
985
|
body=typing.cast(
|
|
987
|
-
|
|
986
|
+
typing.Optional[typing.Any],
|
|
988
987
|
parse_obj_as(
|
|
989
|
-
type_=
|
|
988
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
990
989
|
object_=_response.json(),
|
|
991
990
|
),
|
|
992
991
|
),
|
|
@@ -1293,9 +1292,9 @@ class AsyncRawToolsClient:
|
|
|
1293
1292
|
raise BadRequestError(
|
|
1294
1293
|
headers=dict(_response.headers),
|
|
1295
1294
|
body=typing.cast(
|
|
1296
|
-
|
|
1295
|
+
typing.Optional[typing.Any],
|
|
1297
1296
|
parse_obj_as(
|
|
1298
|
-
type_=
|
|
1297
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1299
1298
|
object_=_response.json(),
|
|
1300
1299
|
),
|
|
1301
1300
|
),
|
athena/types/__init__.py
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
+
from .aop_async_execute_response_out import AopAsyncExecuteResponseOut
|
|
6
|
+
from .aop_execute_request_in import AopExecuteRequestIn
|
|
7
|
+
from .aop_execute_response_out import AopExecuteResponseOut
|
|
5
8
|
from .asset_content_request_out import AssetContentRequestOut
|
|
6
9
|
from .asset_node import AssetNode
|
|
7
10
|
from .asset_not_found_error import AssetNotFoundError
|
|
@@ -39,7 +42,6 @@ from .input_message_content_item import (
|
|
|
39
42
|
InputMessageContentItem_Text,
|
|
40
43
|
)
|
|
41
44
|
from .paginated_assets_out import PaginatedAssetsOut
|
|
42
|
-
from .parent_folder_error import ParentFolderError
|
|
43
45
|
from .prompt_message import PromptMessage
|
|
44
46
|
from .public_asset_out import PublicAssetOut
|
|
45
47
|
from .research_agent_response import ResearchAgentResponse
|
|
@@ -51,6 +53,9 @@ from .text_content import TextContent
|
|
|
51
53
|
from .type import Type
|
|
52
54
|
|
|
53
55
|
__all__ = [
|
|
56
|
+
"AopAsyncExecuteResponseOut",
|
|
57
|
+
"AopExecuteRequestIn",
|
|
58
|
+
"AopExecuteResponseOut",
|
|
54
59
|
"AssetContentRequestOut",
|
|
55
60
|
"AssetNode",
|
|
56
61
|
"AssetNotFoundError",
|
|
@@ -88,7 +93,6 @@ __all__ = [
|
|
|
88
93
|
"InputMessageContentItem_ImageUrl",
|
|
89
94
|
"InputMessageContentItem_Text",
|
|
90
95
|
"PaginatedAssetsOut",
|
|
91
|
-
"ParentFolderError",
|
|
92
96
|
"PromptMessage",
|
|
93
97
|
"PublicAssetOut",
|
|
94
98
|
"ResearchAgentResponse",
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AopAsyncExecuteResponseOut(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Response model for async AOP execution.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
aop_asset_id: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
ID of the AOP asset that was executed
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
aop_config: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Full configuration of the AOP asset
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
aop_title: str = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
Title of the AOP asset
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
base_prompt: str = pydantic.Field()
|
|
30
|
+
"""
|
|
31
|
+
Base prompt of the AOP before user inputs were added
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
enabled_tools: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
35
|
+
"""
|
|
36
|
+
List of tools that were enabled for this execution
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
final_prompt: str = pydantic.Field()
|
|
40
|
+
"""
|
|
41
|
+
Final prompt used for execution including user inputs
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
message: str = pydantic.Field()
|
|
45
|
+
"""
|
|
46
|
+
Status message about the async execution
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
status: str = pydantic.Field()
|
|
50
|
+
"""
|
|
51
|
+
Status of the execution (always 'started' for async)
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
sync_server: str = pydantic.Field()
|
|
55
|
+
"""
|
|
56
|
+
Sync server URL used for execution
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
thread_id: str = pydantic.Field()
|
|
60
|
+
"""
|
|
61
|
+
Unique thread ID for tracking the execution
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
trigger_type: str = pydantic.Field()
|
|
65
|
+
"""
|
|
66
|
+
Type of trigger that initiated the execution
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
if IS_PYDANTIC_V2:
|
|
70
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
71
|
+
else:
|
|
72
|
+
|
|
73
|
+
class Config:
|
|
74
|
+
frozen = True
|
|
75
|
+
smart_union = True
|
|
76
|
+
extra = pydantic.Extra.allow
|
|
@@ -6,8 +6,20 @@ import pydantic
|
|
|
6
6
|
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
10
|
-
|
|
9
|
+
class AopExecuteRequestIn(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Request model for executing an AOP (Agent Operating Procedure).
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
asset_id: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
ID of the existing AOP asset to execute
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
user_inputs: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None)
|
|
20
|
+
"""
|
|
21
|
+
Optional user inputs to append to the AOP's prompt as key-value pairs
|
|
22
|
+
"""
|
|
11
23
|
|
|
12
24
|
if IS_PYDANTIC_V2:
|
|
13
25
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AopExecuteResponseOut(UniversalBaseModel):
|
|
10
|
+
"""
|
|
11
|
+
Response model for AOP execution.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
aop_asset_id: str = pydantic.Field()
|
|
15
|
+
"""
|
|
16
|
+
ID of the AOP asset that was executed
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
aop_config: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
|
|
20
|
+
"""
|
|
21
|
+
Full configuration of the AOP asset
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
aop_title: str = pydantic.Field()
|
|
25
|
+
"""
|
|
26
|
+
Title of the AOP asset
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
base_prompt: str = pydantic.Field()
|
|
30
|
+
"""
|
|
31
|
+
Base prompt of the AOP before user inputs were added
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
enabled_tools: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
35
|
+
"""
|
|
36
|
+
List of tools that were enabled for this execution
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
final_prompt: str = pydantic.Field()
|
|
40
|
+
"""
|
|
41
|
+
Final prompt used for execution including user inputs
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
response: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
|
|
45
|
+
"""
|
|
46
|
+
The execution response from the AOP
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
status: str = pydantic.Field()
|
|
50
|
+
"""
|
|
51
|
+
Status of the execution (e.g., 'submitted')
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
sync_server: str = pydantic.Field()
|
|
55
|
+
"""
|
|
56
|
+
Sync server URL used for execution
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
thread_id: str = pydantic.Field()
|
|
60
|
+
"""
|
|
61
|
+
Unique thread ID for tracking the execution
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
trigger_type: str = pydantic.Field()
|
|
65
|
+
"""
|
|
66
|
+
Type of trigger that initiated the execution
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
if IS_PYDANTIC_V2:
|
|
70
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
71
|
+
else:
|
|
72
|
+
|
|
73
|
+
class Config:
|
|
74
|
+
frozen = True
|
|
75
|
+
smart_union = True
|
|
76
|
+
extra = pydantic.Extra.allow
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
athena/__init__.py,sha256=
|
|
1
|
+
athena/__init__.py,sha256=VXyrAkqUDbvUpdBa-A7lShZliUPwL00Q0brxX3cS_Hs,3597
|
|
2
2
|
athena/agents/__init__.py,sha256=dg7IOwE6-BQSx20JEhdc1VDHlbIHPy08x5fuww_Tvko,180
|
|
3
3
|
athena/agents/client.py,sha256=A70jdG6spqLkPriU8-NCn0vOJvdc5f4SKoVZLOebZjQ,5975
|
|
4
4
|
athena/agents/drive/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
@@ -14,14 +14,17 @@ athena/agents/research/raw_client.py,sha256=l0XGwUGn0ZjNZSvDaLLWeYlQsDSaSFCnUcCt
|
|
|
14
14
|
athena/agents/sql/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
15
15
|
athena/agents/sql/client.py,sha256=Ht7PMJSMqVwihdqk74yyqwFUSXOPcLjxNB-YU6cVGAE,4069
|
|
16
16
|
athena/agents/sql/raw_client.py,sha256=sI7Aq6_Z4AdgXzqBXG2G4l2fYQTWjQ-5IeNZdClmXhY,6017
|
|
17
|
+
athena/aop/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
18
|
+
athena/aop/client.py,sha256=xdmDUTR_XAKLX3Oo2lRrnpuh34zZtU18yBI0KTsOSGY,6506
|
|
19
|
+
athena/aop/raw_client.py,sha256=plXlJeQ4c9FgCh8cB8tr44kEPHaemm1H_akuDV9Xfms,18246
|
|
17
20
|
athena/assets/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
18
21
|
athena/assets/client.py,sha256=8qxDICl5Dz-cNeUOl0du1spj54g_-bLObSLK_biUXV0,5159
|
|
19
22
|
athena/assets/raw_client.py,sha256=TW6dCb1i68p-0sf4_B2F0H8SK-kk9sIHFAuwfTEg5GQ,7077
|
|
20
|
-
athena/base_client.py,sha256=
|
|
23
|
+
athena/base_client.py,sha256=v0xO5KUQrRW8zlNSeyNWwv8r3Yc5bn3RzRWNTOeeGEY,6523
|
|
21
24
|
athena/client.py,sha256=lK3vVU3TF3YjPpiohpxcuRl8x_sSw8HmQ-uuDDeAT6I,22161
|
|
22
25
|
athena/core/__init__.py,sha256=lTcqUPXcx4112yLDd70RAPeqq6tu3eFMe1pKOqkW9JQ,1562
|
|
23
26
|
athena/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
|
|
24
|
-
athena/core/client_wrapper.py,sha256=
|
|
27
|
+
athena/core/client_wrapper.py,sha256=fZWSYnU3HfaLMpPZ75iQcWJJOtpC_vpESfpLKi8Yu9Y,2392
|
|
25
28
|
athena/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
26
29
|
athena/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
27
30
|
athena/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
|
|
@@ -35,7 +38,7 @@ athena/core/request_options.py,sha256=h0QUNCFVdCW_7GclVySCAY2w4NhtXVBUCmHgmzaxpc
|
|
|
35
38
|
athena/core/serialization.py,sha256=ECL3bvv_0i7U4uvPidZCNel--MUbA0iq0aGcNKi3kws,9818
|
|
36
39
|
athena/environment.py,sha256=_e7YwByXALEk7fNJNJvjF81caYTbsx4c7wwftCJHQ7g,214
|
|
37
40
|
athena/errors/__init__.py,sha256=ouNi-VrkRD37haxSAk1-3mbexWE2qCMtctdE5CEgXvM,675
|
|
38
|
-
athena/errors/bad_request_error.py,sha256=
|
|
41
|
+
athena/errors/bad_request_error.py,sha256=PnE3v3kETCXm9E3LiNcHLNtjPEUvpe98-r59q-kQb78,338
|
|
39
42
|
athena/errors/content_too_large_error.py,sha256=i4Af_rueEaP5CftotSDwCaMRlkcC76KyT2NsEIjZH0I,392
|
|
40
43
|
athena/errors/internal_server_error.py,sha256=t1-kpoDC2biEuoE-Ne8v1kuQswvsIEwt_xPPoBmGG00,342
|
|
41
44
|
athena/errors/not_found_error.py,sha256=m-s2prtvwM0THnWsIJun5Km57RDrNptxZnxvI5Q7Nhk,388
|
|
@@ -56,7 +59,7 @@ athena/tools/client.py,sha256=MoSKdWoj5GP1Ars8vRZOq2XTSxZjgKBnXIoBGKa7x_g,19298
|
|
|
56
59
|
athena/tools/email/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
57
60
|
athena/tools/email/client.py,sha256=dOidOOOLHdfz2c3nykzyOa7nTftS91d2_aws0LTg8DU,5921
|
|
58
61
|
athena/tools/email/raw_client.py,sha256=GkSxb-RFdhGgFNghnwH6i0cPI_gfWGLUmWvBNlBlhE4,9962
|
|
59
|
-
athena/tools/raw_client.py,sha256=
|
|
62
|
+
athena/tools/raw_client.py,sha256=iiAKpFTyBoYLzL5G0BCV6GM69NxCkksB_30XAAmyc24,53049
|
|
60
63
|
athena/tools/sheets/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
61
64
|
athena/tools/sheets/client.py,sha256=PFN_qTfL2sNXkSyU8rDbwEqrHW1ACI9hVkGdfzbDdOE,55273
|
|
62
65
|
athena/tools/sheets/raw_client.py,sha256=bi2koBw2Ggct_9ZWZ3kRS50a9sVbT-ZWVtpU9XfMS9k,89950
|
|
@@ -68,7 +71,10 @@ athena/tools/tasks/client.py,sha256=c_YZ7OjQNJmPKbeeXJznXj3zo5CRFSv02dLupAdHAyo,
|
|
|
68
71
|
athena/tools/tasks/raw_client.py,sha256=Mexzuf_HcRXWNlESDGQkHHv5tC2tAo-AX3PBSuSRO3U,3812
|
|
69
72
|
athena/tools/types/__init__.py,sha256=ZI6REilQ0Xuocjd8iyNVfLvOsA2Ltlb8--px07wRSPg,217
|
|
70
73
|
athena/tools/types/tools_data_frame_request_columns_item.py,sha256=GA1FUlTV_CfSc-KToTAwFf4Exl0rr4fsweVZupztjw0,138
|
|
71
|
-
athena/types/__init__.py,sha256=
|
|
74
|
+
athena/types/__init__.py,sha256=Vip2IwctpaB5yqoT_iZ5djAL9leN-HeNV-0scuGjo9Y,4051
|
|
75
|
+
athena/types/aop_async_execute_response_out.py,sha256=R3oy0RLyD-t4MQCnp3Ll13Ci3D5JUMhPyuetbhrONNs,1798
|
|
76
|
+
athena/types/aop_execute_request_in.py,sha256=mEsMKyNN6e90gZra733lJDC6z0bZWdc72af3B-Z5aqE,889
|
|
77
|
+
athena/types/aop_execute_response_out.py,sha256=sOaPWALEo5hWKSnoq_kXrHKtgqsJvgCWcOWpjCTtTCA,1816
|
|
72
78
|
athena/types/asset_content_request_out.py,sha256=RYlcY6j6Ju5EQL7UquDwyTe7uqxyuO8Bg8LCsv1YiUE,652
|
|
73
79
|
athena/types/asset_node.py,sha256=3l7CUK2c_h4QT8ktSq0rFP9veF9G_V9mNe3NZlGl-xQ,804
|
|
74
80
|
athena/types/asset_not_found_error.py,sha256=lIQpdTXCgbXRs21XCMhd_kB7fR6Y6Ep112mK4rejNx0,528
|
|
@@ -102,7 +108,6 @@ athena/types/image_url_content.py,sha256=SIlScFxuyfXpSU-xMLypitQK5gu_6ITjZYt64Dq
|
|
|
102
108
|
athena/types/input_message.py,sha256=MwgLCWH9mfUM5NFEV_AVjhS12ruNOxZxSXLcYKQ0rww,854
|
|
103
109
|
athena/types/input_message_content_item.py,sha256=F-H4SNqrr__t7mPquBMyXnR8-gpyDJC6x48oJO1PXak,1163
|
|
104
110
|
athena/types/paginated_assets_out.py,sha256=NJ9vwjimfaGCMPeYRKw4yEZPWYkdWpSsB60-iW8_yPI,1384
|
|
105
|
-
athena/types/parent_folder_error.py,sha256=yDIQtaAY9XqVCScw-QGmWTHrbi0Zl1Nur15fCEYKdTI,527
|
|
106
111
|
athena/types/prompt_message.py,sha256=5WrlKURJuD0DPhMmP3gpBNuRgGfbE9ArY0BW_OSq0P4,634
|
|
107
112
|
athena/types/public_asset_out.py,sha256=rBPFX3PKM0zxK3Qh8uICE14idg-UkDDob_xFRprO4bo,2775
|
|
108
113
|
athena/types/research_agent_response.py,sha256=BnBRbDcQEh-qNjLfvjoigTVHtkYZjwdjYU5ONjr-OWQ,656
|
|
@@ -113,6 +118,6 @@ athena/types/structured_data_extractor_response.py,sha256=yFQ0CiFDdlZIq2X8UprEAw
|
|
|
113
118
|
athena/types/text_content.py,sha256=tcVCPj3tHh5zQcTElr2tdCIjjfx3ZI63rKIlaG8vo64,592
|
|
114
119
|
athena/types/type.py,sha256=Gvs56nvBMPcQpOZkfPocGNNb7S05PuINianbT309QAQ,146
|
|
115
120
|
athena/version.py,sha256=tnXYUugs9zF_pkVdem-QBorKSuhEOOuetkR57dADDxE,86
|
|
116
|
-
athena_intelligence-0.1.
|
|
117
|
-
athena_intelligence-0.1.
|
|
118
|
-
athena_intelligence-0.1.
|
|
121
|
+
athena_intelligence-0.1.205.dist-info/METADATA,sha256=cxr4yqUDhnPtGoJ148NkSYC9BlTHIvUIJRn5EZwPUbE,5440
|
|
122
|
+
athena_intelligence-0.1.205.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
123
|
+
athena_intelligence-0.1.205.dist-info/RECORD,,
|
|
File without changes
|