athena-intelligence 0.1.210__py3-none-any.whl → 0.1.303__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.
- athena/__init__.py +232 -71
- athena/agents/__init__.py +33 -1
- athena/agents/client.py +81 -18
- athena/aop/client.py +2 -2
- athena/aop/raw_client.py +10 -11
- athena/assets/client.py +359 -2
- athena/assets/raw_client.py +562 -0
- athena/base_client.py +122 -22
- athena/client.py +23 -21
- athena/core/__init__.py +73 -20
- athena/core/client_wrapper.py +2 -2
- athena/core/force_multipart.py +4 -2
- athena/core/http_response.py +1 -1
- athena/core/pydantic_utilities.py +5 -2
- athena/environment.py +1 -2
- athena/errors/__init__.py +42 -7
- athena/errors/not_found_error.py +1 -2
- athena/query/__init__.py +28 -1
- athena/query/types/__init__.py +30 -1
- athena/threads/raw_client.py +4 -5
- athena/tools/__init__.py +47 -3
- athena/tools/client.py +161 -31
- athena/tools/raw_client.py +36 -34
- athena/tools/sheets/__init__.py +30 -0
- athena/tools/sheets/client.py +100 -122
- athena/tools/sheets/raw_client.py +91 -94
- athena/tools/sheets/types/__init__.py +36 -0
- athena/tools/sheets/types/update_sheet_range_request_values_item_item.py +5 -0
- athena/tools/types/__init__.py +28 -1
- athena/types/__init__.py +196 -54
- athena/types/aop_async_execute_response_out.py +0 -5
- athena/types/aop_execute_response_out.py +7 -6
- athena/types/backgroundcolor.py +7 -0
- athena/types/{document_chunk.py → border_model.py} +7 -4
- athena/types/border_style.py +7 -0
- athena/types/borders_model.py +58 -0
- athena/types/cell_format.py +49 -0
- athena/types/cell_format_horizontal_alignment.py +5 -0
- athena/types/cell_format_vertical_alignment.py +5 -0
- athena/types/color.py +7 -0
- athena/types/conversation_asset_info.py +13 -2
- athena/types/conversation_message.py +42 -0
- athena/types/conversation_result.py +67 -0
- athena/types/creatable_asset_type.py +5 -0
- athena/types/create_asset_response_out.py +46 -0
- athena/types/create_project_response_out.py +51 -0
- athena/types/dimension_properties.py +49 -0
- athena/types/get_table_response.py +7 -2
- athena/types/grid_range.py +39 -0
- athena/types/{file_chunk_request_out.py → number_format_model.py} +8 -4
- athena/types/number_format_type.py +21 -0
- athena/types/sheet.py +76 -0
- athena/types/tabcolor.py +7 -0
- athena/types/table_row_data.py +5 -0
- athena/types/text_format_model.py +28 -0
- athena/types/textrotation.py +5 -0
- athena/types/{asset_not_found_error.py → theme_color.py} +3 -2
- athena/types/thread_status_response_out.py +5 -0
- athena/types/wrap_strategy.py +5 -0
- {athena_intelligence-0.1.210.dist-info → athena_intelligence-0.1.303.dist-info}/METADATA +1 -1
- {athena_intelligence-0.1.210.dist-info → athena_intelligence-0.1.303.dist-info}/RECORD +62 -39
- {athena_intelligence-0.1.210.dist-info → athena_intelligence-0.1.303.dist-info}/WHEEL +0 -0
athena/__init__.py
CHANGED
|
@@ -2,74 +2,214 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from .types import (
|
|
10
|
+
AopAsyncExecuteResponseOut,
|
|
11
|
+
AopExecuteRequestIn,
|
|
12
|
+
AopExecuteResponseOut,
|
|
13
|
+
AssetContentRequestOut,
|
|
14
|
+
AssetNode,
|
|
15
|
+
AssetScreenshotResponseOut,
|
|
16
|
+
Backgroundcolor,
|
|
17
|
+
BorderModel,
|
|
18
|
+
BorderStyle,
|
|
19
|
+
BordersModel,
|
|
20
|
+
CellFormat,
|
|
21
|
+
CellFormatHorizontalAlignment,
|
|
22
|
+
CellFormatVerticalAlignment,
|
|
23
|
+
Chunk,
|
|
24
|
+
ChunkContentItem,
|
|
25
|
+
ChunkContentItem_ImageUrl,
|
|
26
|
+
ChunkContentItem_Text,
|
|
27
|
+
ChunkResult,
|
|
28
|
+
ChunkResultChunkId,
|
|
29
|
+
Color,
|
|
30
|
+
Content,
|
|
31
|
+
ConversationAssetInfo,
|
|
32
|
+
ConversationMessage,
|
|
33
|
+
ConversationResult,
|
|
34
|
+
CreatableAssetType,
|
|
35
|
+
CreateAssetResponseOut,
|
|
36
|
+
CreateNewSheetTabResponse,
|
|
37
|
+
CreateProjectResponseOut,
|
|
38
|
+
CustomAgentResponse,
|
|
39
|
+
DataFrameRequestOut,
|
|
40
|
+
DataFrameRequestOutColumnsItem,
|
|
41
|
+
DataFrameRequestOutDataItemItem,
|
|
42
|
+
DataFrameRequestOutIndexItem,
|
|
43
|
+
DataFrameUnknownFormatError,
|
|
44
|
+
DimensionProperties,
|
|
45
|
+
DriveAgentResponse,
|
|
46
|
+
FileTooLargeError,
|
|
47
|
+
FolderResponse,
|
|
48
|
+
GeneralAgentConfig,
|
|
49
|
+
GeneralAgentConfigEnabledToolsItem,
|
|
50
|
+
GeneralAgentRequest,
|
|
51
|
+
GeneralAgentResponse,
|
|
52
|
+
GeneralAgentResponseMessage,
|
|
53
|
+
GeneralAgentResponseMessageKwargs,
|
|
54
|
+
GetTableResponse,
|
|
55
|
+
GridRange,
|
|
56
|
+
Id,
|
|
57
|
+
ImageUrlContent,
|
|
58
|
+
InputMessage,
|
|
59
|
+
InputMessageContentItem,
|
|
60
|
+
InputMessageContentItem_ImageUrl,
|
|
61
|
+
InputMessageContentItem_Text,
|
|
62
|
+
NumberFormatModel,
|
|
63
|
+
NumberFormatType,
|
|
64
|
+
PaginatedAssetsOut,
|
|
65
|
+
PromptMessage,
|
|
66
|
+
PublicAssetOut,
|
|
67
|
+
ResearchAgentResponse,
|
|
68
|
+
SaveAssetRequestOut,
|
|
69
|
+
Sheet,
|
|
70
|
+
SheetOperationResponse,
|
|
71
|
+
SqlAgentResponse,
|
|
72
|
+
StructuredDataExtractorResponse,
|
|
73
|
+
Tabcolor,
|
|
74
|
+
TableRowData,
|
|
75
|
+
TextContent,
|
|
76
|
+
TextFormatModel,
|
|
77
|
+
Textrotation,
|
|
78
|
+
ThemeColor,
|
|
79
|
+
ThreadStatusResponseOut,
|
|
80
|
+
Type,
|
|
81
|
+
WrapStrategy,
|
|
82
|
+
)
|
|
83
|
+
from .errors import (
|
|
84
|
+
BadRequestError,
|
|
85
|
+
ContentTooLargeError,
|
|
86
|
+
InternalServerError,
|
|
87
|
+
NotFoundError,
|
|
88
|
+
UnauthorizedError,
|
|
89
|
+
UnprocessableEntityError,
|
|
90
|
+
UnsupportedMediaTypeError,
|
|
91
|
+
)
|
|
92
|
+
from . import agents, aop, assets, query, threads, tools
|
|
93
|
+
from .client import AsyncAthena, Athena
|
|
94
|
+
from .environment import AthenaEnvironment
|
|
95
|
+
from .query import QueryExecuteRequestDatabaseAssetIds
|
|
96
|
+
from .tools import ToolsDataFrameRequestColumnsItem
|
|
97
|
+
from .version import __version__
|
|
98
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
99
|
+
"AopAsyncExecuteResponseOut": ".types",
|
|
100
|
+
"AopExecuteRequestIn": ".types",
|
|
101
|
+
"AopExecuteResponseOut": ".types",
|
|
102
|
+
"AssetContentRequestOut": ".types",
|
|
103
|
+
"AssetNode": ".types",
|
|
104
|
+
"AssetScreenshotResponseOut": ".types",
|
|
105
|
+
"AsyncAthena": ".client",
|
|
106
|
+
"Athena": ".client",
|
|
107
|
+
"AthenaEnvironment": ".environment",
|
|
108
|
+
"Backgroundcolor": ".types",
|
|
109
|
+
"BadRequestError": ".errors",
|
|
110
|
+
"BorderModel": ".types",
|
|
111
|
+
"BorderStyle": ".types",
|
|
112
|
+
"BordersModel": ".types",
|
|
113
|
+
"CellFormat": ".types",
|
|
114
|
+
"CellFormatHorizontalAlignment": ".types",
|
|
115
|
+
"CellFormatVerticalAlignment": ".types",
|
|
116
|
+
"Chunk": ".types",
|
|
117
|
+
"ChunkContentItem": ".types",
|
|
118
|
+
"ChunkContentItem_ImageUrl": ".types",
|
|
119
|
+
"ChunkContentItem_Text": ".types",
|
|
120
|
+
"ChunkResult": ".types",
|
|
121
|
+
"ChunkResultChunkId": ".types",
|
|
122
|
+
"Color": ".types",
|
|
123
|
+
"Content": ".types",
|
|
124
|
+
"ContentTooLargeError": ".errors",
|
|
125
|
+
"ConversationAssetInfo": ".types",
|
|
126
|
+
"ConversationMessage": ".types",
|
|
127
|
+
"ConversationResult": ".types",
|
|
128
|
+
"CreatableAssetType": ".types",
|
|
129
|
+
"CreateAssetResponseOut": ".types",
|
|
130
|
+
"CreateNewSheetTabResponse": ".types",
|
|
131
|
+
"CreateProjectResponseOut": ".types",
|
|
132
|
+
"CustomAgentResponse": ".types",
|
|
133
|
+
"DataFrameRequestOut": ".types",
|
|
134
|
+
"DataFrameRequestOutColumnsItem": ".types",
|
|
135
|
+
"DataFrameRequestOutDataItemItem": ".types",
|
|
136
|
+
"DataFrameRequestOutIndexItem": ".types",
|
|
137
|
+
"DataFrameUnknownFormatError": ".types",
|
|
138
|
+
"DimensionProperties": ".types",
|
|
139
|
+
"DriveAgentResponse": ".types",
|
|
140
|
+
"FileTooLargeError": ".types",
|
|
141
|
+
"FolderResponse": ".types",
|
|
142
|
+
"GeneralAgentConfig": ".types",
|
|
143
|
+
"GeneralAgentConfigEnabledToolsItem": ".types",
|
|
144
|
+
"GeneralAgentRequest": ".types",
|
|
145
|
+
"GeneralAgentResponse": ".types",
|
|
146
|
+
"GeneralAgentResponseMessage": ".types",
|
|
147
|
+
"GeneralAgentResponseMessageKwargs": ".types",
|
|
148
|
+
"GetTableResponse": ".types",
|
|
149
|
+
"GridRange": ".types",
|
|
150
|
+
"Id": ".types",
|
|
151
|
+
"ImageUrlContent": ".types",
|
|
152
|
+
"InputMessage": ".types",
|
|
153
|
+
"InputMessageContentItem": ".types",
|
|
154
|
+
"InputMessageContentItem_ImageUrl": ".types",
|
|
155
|
+
"InputMessageContentItem_Text": ".types",
|
|
156
|
+
"InternalServerError": ".errors",
|
|
157
|
+
"NotFoundError": ".errors",
|
|
158
|
+
"NumberFormatModel": ".types",
|
|
159
|
+
"NumberFormatType": ".types",
|
|
160
|
+
"PaginatedAssetsOut": ".types",
|
|
161
|
+
"PromptMessage": ".types",
|
|
162
|
+
"PublicAssetOut": ".types",
|
|
163
|
+
"QueryExecuteRequestDatabaseAssetIds": ".query",
|
|
164
|
+
"ResearchAgentResponse": ".types",
|
|
165
|
+
"SaveAssetRequestOut": ".types",
|
|
166
|
+
"Sheet": ".types",
|
|
167
|
+
"SheetOperationResponse": ".types",
|
|
168
|
+
"SqlAgentResponse": ".types",
|
|
169
|
+
"StructuredDataExtractorResponse": ".types",
|
|
170
|
+
"Tabcolor": ".types",
|
|
171
|
+
"TableRowData": ".types",
|
|
172
|
+
"TextContent": ".types",
|
|
173
|
+
"TextFormatModel": ".types",
|
|
174
|
+
"Textrotation": ".types",
|
|
175
|
+
"ThemeColor": ".types",
|
|
176
|
+
"ThreadStatusResponseOut": ".types",
|
|
177
|
+
"ToolsDataFrameRequestColumnsItem": ".tools",
|
|
178
|
+
"Type": ".types",
|
|
179
|
+
"UnauthorizedError": ".errors",
|
|
180
|
+
"UnprocessableEntityError": ".errors",
|
|
181
|
+
"UnsupportedMediaTypeError": ".errors",
|
|
182
|
+
"WrapStrategy": ".types",
|
|
183
|
+
"__version__": ".version",
|
|
184
|
+
"agents": ".agents",
|
|
185
|
+
"aop": ".aop",
|
|
186
|
+
"assets": ".assets",
|
|
187
|
+
"query": ".query",
|
|
188
|
+
"threads": ".threads",
|
|
189
|
+
"tools": ".tools",
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
194
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
195
|
+
if module_name is None:
|
|
196
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
197
|
+
try:
|
|
198
|
+
module = import_module(module_name, __package__)
|
|
199
|
+
if module_name == f".{attr_name}":
|
|
200
|
+
return module
|
|
201
|
+
else:
|
|
202
|
+
return getattr(module, attr_name)
|
|
203
|
+
except ImportError as e:
|
|
204
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
205
|
+
except AttributeError as e:
|
|
206
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def __dir__():
|
|
210
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
211
|
+
return sorted(lazy_attrs)
|
|
212
|
+
|
|
73
213
|
|
|
74
214
|
__all__ = [
|
|
75
215
|
"AopAsyncExecuteResponseOut",
|
|
@@ -77,31 +217,42 @@ __all__ = [
|
|
|
77
217
|
"AopExecuteResponseOut",
|
|
78
218
|
"AssetContentRequestOut",
|
|
79
219
|
"AssetNode",
|
|
80
|
-
"AssetNotFoundError",
|
|
81
220
|
"AssetScreenshotResponseOut",
|
|
82
221
|
"AsyncAthena",
|
|
83
222
|
"Athena",
|
|
84
223
|
"AthenaEnvironment",
|
|
224
|
+
"Backgroundcolor",
|
|
85
225
|
"BadRequestError",
|
|
226
|
+
"BorderModel",
|
|
227
|
+
"BorderStyle",
|
|
228
|
+
"BordersModel",
|
|
229
|
+
"CellFormat",
|
|
230
|
+
"CellFormatHorizontalAlignment",
|
|
231
|
+
"CellFormatVerticalAlignment",
|
|
86
232
|
"Chunk",
|
|
87
233
|
"ChunkContentItem",
|
|
88
234
|
"ChunkContentItem_ImageUrl",
|
|
89
235
|
"ChunkContentItem_Text",
|
|
90
236
|
"ChunkResult",
|
|
91
237
|
"ChunkResultChunkId",
|
|
238
|
+
"Color",
|
|
92
239
|
"Content",
|
|
93
240
|
"ContentTooLargeError",
|
|
94
241
|
"ConversationAssetInfo",
|
|
242
|
+
"ConversationMessage",
|
|
243
|
+
"ConversationResult",
|
|
244
|
+
"CreatableAssetType",
|
|
245
|
+
"CreateAssetResponseOut",
|
|
95
246
|
"CreateNewSheetTabResponse",
|
|
247
|
+
"CreateProjectResponseOut",
|
|
96
248
|
"CustomAgentResponse",
|
|
97
249
|
"DataFrameRequestOut",
|
|
98
250
|
"DataFrameRequestOutColumnsItem",
|
|
99
251
|
"DataFrameRequestOutDataItemItem",
|
|
100
252
|
"DataFrameRequestOutIndexItem",
|
|
101
253
|
"DataFrameUnknownFormatError",
|
|
102
|
-
"
|
|
254
|
+
"DimensionProperties",
|
|
103
255
|
"DriveAgentResponse",
|
|
104
|
-
"FileChunkRequestOut",
|
|
105
256
|
"FileTooLargeError",
|
|
106
257
|
"FolderResponse",
|
|
107
258
|
"GeneralAgentConfig",
|
|
@@ -111,6 +262,7 @@ __all__ = [
|
|
|
111
262
|
"GeneralAgentResponseMessage",
|
|
112
263
|
"GeneralAgentResponseMessageKwargs",
|
|
113
264
|
"GetTableResponse",
|
|
265
|
+
"GridRange",
|
|
114
266
|
"Id",
|
|
115
267
|
"ImageUrlContent",
|
|
116
268
|
"InputMessage",
|
|
@@ -119,22 +271,31 @@ __all__ = [
|
|
|
119
271
|
"InputMessageContentItem_Text",
|
|
120
272
|
"InternalServerError",
|
|
121
273
|
"NotFoundError",
|
|
274
|
+
"NumberFormatModel",
|
|
275
|
+
"NumberFormatType",
|
|
122
276
|
"PaginatedAssetsOut",
|
|
123
277
|
"PromptMessage",
|
|
124
278
|
"PublicAssetOut",
|
|
125
279
|
"QueryExecuteRequestDatabaseAssetIds",
|
|
126
280
|
"ResearchAgentResponse",
|
|
127
281
|
"SaveAssetRequestOut",
|
|
282
|
+
"Sheet",
|
|
128
283
|
"SheetOperationResponse",
|
|
129
284
|
"SqlAgentResponse",
|
|
130
285
|
"StructuredDataExtractorResponse",
|
|
286
|
+
"Tabcolor",
|
|
287
|
+
"TableRowData",
|
|
131
288
|
"TextContent",
|
|
289
|
+
"TextFormatModel",
|
|
290
|
+
"Textrotation",
|
|
291
|
+
"ThemeColor",
|
|
132
292
|
"ThreadStatusResponseOut",
|
|
133
293
|
"ToolsDataFrameRequestColumnsItem",
|
|
134
294
|
"Type",
|
|
135
295
|
"UnauthorizedError",
|
|
136
296
|
"UnprocessableEntityError",
|
|
137
297
|
"UnsupportedMediaTypeError",
|
|
298
|
+
"WrapStrategy",
|
|
138
299
|
"__version__",
|
|
139
300
|
"agents",
|
|
140
301
|
"aop",
|
athena/agents/__init__.py
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
# isort: skip_file
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import typing
|
|
6
|
+
from importlib import import_module
|
|
7
|
+
|
|
8
|
+
if typing.TYPE_CHECKING:
|
|
9
|
+
from . import drive, general, research, sql
|
|
10
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
11
|
+
"drive": ".drive",
|
|
12
|
+
"general": ".general",
|
|
13
|
+
"research": ".research",
|
|
14
|
+
"sql": ".sql",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
19
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
20
|
+
if module_name is None:
|
|
21
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
22
|
+
try:
|
|
23
|
+
module = import_module(module_name, __package__)
|
|
24
|
+
if module_name == f".{attr_name}":
|
|
25
|
+
return module
|
|
26
|
+
else:
|
|
27
|
+
return getattr(module, attr_name)
|
|
28
|
+
except ImportError as e:
|
|
29
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
30
|
+
except AttributeError as e:
|
|
31
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def __dir__():
|
|
35
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
36
|
+
return sorted(lazy_attrs)
|
|
37
|
+
|
|
6
38
|
|
|
7
39
|
__all__ = ["drive", "general", "research", "sql"]
|
athena/agents/client.py
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
3
5
|
import typing
|
|
4
6
|
|
|
5
7
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
8
|
from ..core.request_options import RequestOptions
|
|
7
9
|
from ..types.custom_agent_response import CustomAgentResponse
|
|
8
|
-
from .drive.client import AsyncDriveClient, DriveClient
|
|
9
|
-
from .general.client import AsyncGeneralClient, GeneralClient
|
|
10
10
|
from .raw_client import AsyncRawAgentsClient, RawAgentsClient
|
|
11
|
-
from .research.client import AsyncResearchClient, ResearchClient
|
|
12
|
-
from .sql.client import AsyncSqlClient, SqlClient
|
|
13
11
|
|
|
12
|
+
if typing.TYPE_CHECKING:
|
|
13
|
+
from .drive.client import AsyncDriveClient, DriveClient
|
|
14
|
+
from .general.client import AsyncGeneralClient, GeneralClient
|
|
15
|
+
from .research.client import AsyncResearchClient, ResearchClient
|
|
16
|
+
from .sql.client import AsyncSqlClient, SqlClient
|
|
14
17
|
# this is used as the default value for optional parameters
|
|
15
18
|
OMIT = typing.cast(typing.Any, ...)
|
|
16
19
|
|
|
@@ -18,13 +21,11 @@ OMIT = typing.cast(typing.Any, ...)
|
|
|
18
21
|
class AgentsClient:
|
|
19
22
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
20
23
|
self._raw_client = RawAgentsClient(client_wrapper=client_wrapper)
|
|
21
|
-
self.
|
|
22
|
-
|
|
23
|
-
self.
|
|
24
|
-
|
|
25
|
-
self.
|
|
26
|
-
|
|
27
|
-
self.sql = SqlClient(client_wrapper=client_wrapper)
|
|
24
|
+
self._client_wrapper = client_wrapper
|
|
25
|
+
self._drive: typing.Optional[DriveClient] = None
|
|
26
|
+
self._general: typing.Optional[GeneralClient] = None
|
|
27
|
+
self._research: typing.Optional[ResearchClient] = None
|
|
28
|
+
self._sql: typing.Optional[SqlClient] = None
|
|
28
29
|
|
|
29
30
|
@property
|
|
30
31
|
def with_raw_response(self) -> RawAgentsClient:
|
|
@@ -91,17 +92,47 @@ class AgentsClient:
|
|
|
91
92
|
)
|
|
92
93
|
return _response.data
|
|
93
94
|
|
|
95
|
+
@property
|
|
96
|
+
def drive(self):
|
|
97
|
+
if self._drive is None:
|
|
98
|
+
from .drive.client import DriveClient # noqa: E402
|
|
94
99
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
self._raw_client = AsyncRawAgentsClient(client_wrapper=client_wrapper)
|
|
98
|
-
self.drive = AsyncDriveClient(client_wrapper=client_wrapper)
|
|
100
|
+
self._drive = DriveClient(client_wrapper=self._client_wrapper)
|
|
101
|
+
return self._drive
|
|
99
102
|
|
|
100
|
-
|
|
103
|
+
@property
|
|
104
|
+
def general(self):
|
|
105
|
+
if self._general is None:
|
|
106
|
+
from .general.client import GeneralClient # noqa: E402
|
|
107
|
+
|
|
108
|
+
self._general = GeneralClient(client_wrapper=self._client_wrapper)
|
|
109
|
+
return self._general
|
|
101
110
|
|
|
102
|
-
|
|
111
|
+
@property
|
|
112
|
+
def research(self):
|
|
113
|
+
if self._research is None:
|
|
114
|
+
from .research.client import ResearchClient # noqa: E402
|
|
103
115
|
|
|
104
|
-
|
|
116
|
+
self._research = ResearchClient(client_wrapper=self._client_wrapper)
|
|
117
|
+
return self._research
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def sql(self):
|
|
121
|
+
if self._sql is None:
|
|
122
|
+
from .sql.client import SqlClient # noqa: E402
|
|
123
|
+
|
|
124
|
+
self._sql = SqlClient(client_wrapper=self._client_wrapper)
|
|
125
|
+
return self._sql
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class AsyncAgentsClient:
|
|
129
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
130
|
+
self._raw_client = AsyncRawAgentsClient(client_wrapper=client_wrapper)
|
|
131
|
+
self._client_wrapper = client_wrapper
|
|
132
|
+
self._drive: typing.Optional[AsyncDriveClient] = None
|
|
133
|
+
self._general: typing.Optional[AsyncGeneralClient] = None
|
|
134
|
+
self._research: typing.Optional[AsyncResearchClient] = None
|
|
135
|
+
self._sql: typing.Optional[AsyncSqlClient] = None
|
|
105
136
|
|
|
106
137
|
@property
|
|
107
138
|
def with_raw_response(self) -> AsyncRawAgentsClient:
|
|
@@ -175,3 +206,35 @@ class AsyncAgentsClient:
|
|
|
175
206
|
agent_id, config=config, messages=messages, request_options=request_options
|
|
176
207
|
)
|
|
177
208
|
return _response.data
|
|
209
|
+
|
|
210
|
+
@property
|
|
211
|
+
def drive(self):
|
|
212
|
+
if self._drive is None:
|
|
213
|
+
from .drive.client import AsyncDriveClient # noqa: E402
|
|
214
|
+
|
|
215
|
+
self._drive = AsyncDriveClient(client_wrapper=self._client_wrapper)
|
|
216
|
+
return self._drive
|
|
217
|
+
|
|
218
|
+
@property
|
|
219
|
+
def general(self):
|
|
220
|
+
if self._general is None:
|
|
221
|
+
from .general.client import AsyncGeneralClient # noqa: E402
|
|
222
|
+
|
|
223
|
+
self._general = AsyncGeneralClient(client_wrapper=self._client_wrapper)
|
|
224
|
+
return self._general
|
|
225
|
+
|
|
226
|
+
@property
|
|
227
|
+
def research(self):
|
|
228
|
+
if self._research is None:
|
|
229
|
+
from .research.client import AsyncResearchClient # noqa: E402
|
|
230
|
+
|
|
231
|
+
self._research = AsyncResearchClient(client_wrapper=self._client_wrapper)
|
|
232
|
+
return self._research
|
|
233
|
+
|
|
234
|
+
@property
|
|
235
|
+
def sql(self):
|
|
236
|
+
if self._sql is None:
|
|
237
|
+
from .sql.client import AsyncSqlClient # noqa: E402
|
|
238
|
+
|
|
239
|
+
self._sql = AsyncSqlClient(client_wrapper=self._client_wrapper)
|
|
240
|
+
return self._sql
|
athena/aop/client.py
CHANGED
|
@@ -32,7 +32,7 @@ class AopClient:
|
|
|
32
32
|
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
33
33
|
) -> AopExecuteResponseOut:
|
|
34
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.
|
|
35
|
+
⚠️ DEPRECATED: This endpoint is deprecated. Please use /aop/execute-async instead for better performance and reliability. 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
36
|
|
|
37
37
|
Parameters
|
|
38
38
|
----------
|
|
@@ -118,7 +118,7 @@ class AsyncAopClient:
|
|
|
118
118
|
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
119
119
|
) -> AopExecuteResponseOut:
|
|
120
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.
|
|
121
|
+
⚠️ DEPRECATED: This endpoint is deprecated. Please use /aop/execute-async instead for better performance and reliability. 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
122
|
|
|
123
123
|
Parameters
|
|
124
124
|
----------
|
athena/aop/raw_client.py
CHANGED
|
@@ -17,7 +17,6 @@ from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
|
17
17
|
from ..types.aop_async_execute_response_out import AopAsyncExecuteResponseOut
|
|
18
18
|
from ..types.aop_execute_request_in import AopExecuteRequestIn
|
|
19
19
|
from ..types.aop_execute_response_out import AopExecuteResponseOut
|
|
20
|
-
from ..types.asset_not_found_error import AssetNotFoundError
|
|
21
20
|
|
|
22
21
|
# this is used as the default value for optional parameters
|
|
23
22
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -31,7 +30,7 @@ class RawAopClient:
|
|
|
31
30
|
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
32
31
|
) -> HttpResponse[AopExecuteResponseOut]:
|
|
33
32
|
"""
|
|
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.
|
|
33
|
+
⚠️ DEPRECATED: This endpoint is deprecated. Please use /aop/execute-async instead for better performance and reliability. 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
34
|
|
|
36
35
|
Parameters
|
|
37
36
|
----------
|
|
@@ -93,9 +92,9 @@ class RawAopClient:
|
|
|
93
92
|
raise NotFoundError(
|
|
94
93
|
headers=dict(_response.headers),
|
|
95
94
|
body=typing.cast(
|
|
96
|
-
|
|
95
|
+
typing.Optional[typing.Any],
|
|
97
96
|
parse_obj_as(
|
|
98
|
-
type_=
|
|
97
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
99
98
|
object_=_response.json(),
|
|
100
99
|
),
|
|
101
100
|
),
|
|
@@ -193,9 +192,9 @@ class RawAopClient:
|
|
|
193
192
|
raise NotFoundError(
|
|
194
193
|
headers=dict(_response.headers),
|
|
195
194
|
body=typing.cast(
|
|
196
|
-
|
|
195
|
+
typing.Optional[typing.Any],
|
|
197
196
|
parse_obj_as(
|
|
198
|
-
type_=
|
|
197
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
199
198
|
object_=_response.json(),
|
|
200
199
|
),
|
|
201
200
|
),
|
|
@@ -236,7 +235,7 @@ class AsyncRawAopClient:
|
|
|
236
235
|
self, *, request: AopExecuteRequestIn, request_options: typing.Optional[RequestOptions] = None
|
|
237
236
|
) -> AsyncHttpResponse[AopExecuteResponseOut]:
|
|
238
237
|
"""
|
|
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.
|
|
238
|
+
⚠️ DEPRECATED: This endpoint is deprecated. Please use /aop/execute-async instead for better performance and reliability. 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
239
|
|
|
241
240
|
Parameters
|
|
242
241
|
----------
|
|
@@ -298,9 +297,9 @@ class AsyncRawAopClient:
|
|
|
298
297
|
raise NotFoundError(
|
|
299
298
|
headers=dict(_response.headers),
|
|
300
299
|
body=typing.cast(
|
|
301
|
-
|
|
300
|
+
typing.Optional[typing.Any],
|
|
302
301
|
parse_obj_as(
|
|
303
|
-
type_=
|
|
302
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
304
303
|
object_=_response.json(),
|
|
305
304
|
),
|
|
306
305
|
),
|
|
@@ -398,9 +397,9 @@ class AsyncRawAopClient:
|
|
|
398
397
|
raise NotFoundError(
|
|
399
398
|
headers=dict(_response.headers),
|
|
400
399
|
body=typing.cast(
|
|
401
|
-
|
|
400
|
+
typing.Optional[typing.Any],
|
|
402
401
|
parse_obj_as(
|
|
403
|
-
type_=
|
|
402
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
404
403
|
object_=_response.json(),
|
|
405
404
|
),
|
|
406
405
|
),
|