athena-intelligence 0.1.119__tar.gz → 0.1.272__tar.gz
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_intelligence-0.1.119 → athena_intelligence-0.1.272}/PKG-INFO +7 -3
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/pyproject.toml +37 -6
- athena_intelligence-0.1.272/src/athena/__init__.py +312 -0
- athena_intelligence-0.1.272/src/athena/agents/__init__.py +39 -0
- athena_intelligence-0.1.272/src/athena/agents/client.py +240 -0
- {athena_intelligence-0.1.119/src/athena/agents/athena_assistant → athena_intelligence-0.1.272/src/athena/agents/drive}/__init__.py +2 -0
- athena_intelligence-0.1.272/src/athena/agents/drive/client.py +133 -0
- athena_intelligence-0.1.272/src/athena/agents/drive/raw_client.py +155 -0
- {athena_intelligence-0.1.119/src/athena/agents/structured_data_extractor → athena_intelligence-0.1.272/src/athena/agents/general}/__init__.py +2 -0
- athena_intelligence-0.1.272/src/athena/agents/general/client.py +345 -0
- athena_intelligence-0.1.272/src/athena/agents/general/raw_client.py +369 -0
- athena_intelligence-0.1.272/src/athena/agents/raw_client.py +176 -0
- athena_intelligence-0.1.272/src/athena/agents/research/__init__.py +4 -0
- athena_intelligence-0.1.272/src/athena/agents/research/client.py +133 -0
- athena_intelligence-0.1.272/src/athena/agents/research/raw_client.py +155 -0
- athena_intelligence-0.1.272/src/athena/agents/sql/__init__.py +4 -0
- athena_intelligence-0.1.272/src/athena/agents/sql/client.py +133 -0
- athena_intelligence-0.1.272/src/athena/agents/sql/raw_client.py +155 -0
- athena_intelligence-0.1.272/src/athena/aop/__init__.py +4 -0
- athena_intelligence-0.1.272/src/athena/aop/client.py +201 -0
- athena_intelligence-0.1.272/src/athena/aop/raw_client.py +432 -0
- athena_intelligence-0.1.272/src/athena/assets/__init__.py +4 -0
- athena_intelligence-0.1.272/src/athena/assets/client.py +501 -0
- athena_intelligence-0.1.272/src/athena/assets/raw_client.py +726 -0
- athena_intelligence-0.1.272/src/athena/base_client.py +268 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/client.py +206 -89
- athena_intelligence-0.1.272/src/athena/core/__init__.py +105 -0
- athena_intelligence-0.1.272/src/athena/core/api_error.py +23 -0
- athena_intelligence-0.1.272/src/athena/core/client_wrapper.py +79 -0
- athena_intelligence-0.1.272/src/athena/core/file.py +67 -0
- athena_intelligence-0.1.272/src/athena/core/force_multipart.py +18 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/core/http_client.py +146 -46
- athena_intelligence-0.1.272/src/athena/core/http_response.py +55 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/core/jsonable_encoder.py +32 -31
- athena_intelligence-0.1.272/src/athena/core/pydantic_utilities.py +258 -0
- athena_intelligence-0.1.272/src/athena/core/query_encoder.py +58 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/core/request_options.py +5 -2
- athena_intelligence-0.1.272/src/athena/core/serialization.py +276 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/environment.py +1 -0
- athena_intelligence-0.1.272/src/athena/errors/__init__.py +56 -0
- athena_intelligence-0.1.272/src/athena/errors/bad_request_error.py +10 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/errors/content_too_large_error.py +4 -2
- athena_intelligence-0.1.272/src/athena/errors/internal_server_error.py +10 -0
- athena_intelligence-0.1.272/src/athena/errors/not_found_error.py +10 -0
- athena_intelligence-0.1.272/src/athena/errors/unauthorized_error.py +10 -0
- athena_intelligence-0.1.272/src/athena/errors/unprocessable_entity_error.py +10 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/errors/unsupported_media_type_error.py +4 -2
- athena_intelligence-0.1.272/src/athena/query/__init__.py +34 -0
- athena_intelligence-0.1.272/src/athena/query/client.py +209 -0
- athena_intelligence-0.1.272/src/athena/query/raw_client.py +344 -0
- athena_intelligence-0.1.272/src/athena/query/types/__init__.py +36 -0
- athena_intelligence-0.1.272/src/athena/threads/__init__.py +4 -0
- athena_intelligence-0.1.272/src/athena/threads/client.py +114 -0
- athena_intelligence-0.1.272/src/athena/threads/raw_client.py +192 -0
- athena_intelligence-0.1.272/src/athena/tools/__init__.py +52 -0
- athena_intelligence-0.1.272/src/athena/tools/calendar/__init__.py +4 -0
- athena_intelligence-0.1.272/src/athena/tools/calendar/client.py +163 -0
- athena_intelligence-0.1.272/src/athena/tools/calendar/raw_client.py +172 -0
- athena_intelligence-0.1.272/src/athena/tools/client.py +805 -0
- athena_intelligence-0.1.272/src/athena/tools/email/__init__.py +4 -0
- athena_intelligence-0.1.272/src/athena/tools/email/client.py +221 -0
- athena_intelligence-0.1.272/src/athena/tools/email/raw_client.py +248 -0
- athena_intelligence-0.1.272/src/athena/tools/raw_client.py +1326 -0
- athena_intelligence-0.1.272/src/athena/tools/sheets/__init__.py +34 -0
- athena_intelligence-0.1.272/src/athena/tools/sheets/client.py +2233 -0
- athena_intelligence-0.1.272/src/athena/tools/sheets/raw_client.py +2744 -0
- athena_intelligence-0.1.272/src/athena/tools/sheets/types/__init__.py +36 -0
- athena_intelligence-0.1.272/src/athena/tools/sheets/types/update_sheet_range_request_values_item_item.py +5 -0
- athena_intelligence-0.1.272/src/athena/tools/structured_data_extractor/__init__.py +4 -0
- athena_intelligence-0.1.272/src/athena/tools/structured_data_extractor/client.py +267 -0
- athena_intelligence-0.1.272/src/athena/tools/structured_data_extractor/raw_client.py +240 -0
- athena_intelligence-0.1.272/src/athena/tools/tasks/__init__.py +4 -0
- athena_intelligence-0.1.272/src/athena/tools/tasks/client.py +99 -0
- athena_intelligence-0.1.272/src/athena/tools/tasks/raw_client.py +96 -0
- athena_intelligence-0.1.272/src/athena/tools/types/__init__.py +34 -0
- athena_intelligence-0.1.272/src/athena/types/__init__.py +257 -0
- athena_intelligence-0.1.272/src/athena/types/aop_async_execute_response_out.py +71 -0
- athena_intelligence-0.1.272/src/athena/types/aop_execute_request_in.py +31 -0
- athena_intelligence-0.1.272/src/athena/types/aop_execute_response_out.py +77 -0
- athena_intelligence-0.1.272/src/athena/types/asset_content_request_out.py +26 -0
- athena_intelligence-0.1.272/src/athena/types/asset_node.py +32 -0
- athena_intelligence-0.1.272/src/athena/types/asset_screenshot_response_out.py +43 -0
- athena_intelligence-0.1.272/src/athena/types/backgroundcolor.py +7 -0
- athena_intelligence-0.1.272/src/athena/types/border_model.py +27 -0
- athena_intelligence-0.1.272/src/athena/types/border_style.py +7 -0
- athena_intelligence-0.1.272/src/athena/types/borders_model.py +58 -0
- athena_intelligence-0.1.272/src/athena/types/cell_format.py +49 -0
- athena_intelligence-0.1.272/src/athena/types/cell_format_horizontal_alignment.py +5 -0
- athena_intelligence-0.1.272/src/athena/types/cell_format_vertical_alignment.py +5 -0
- athena_intelligence-0.1.272/src/athena/types/chunk.py +26 -0
- athena_intelligence-0.1.272/src/athena/types/chunk_content_item.py +39 -0
- athena_intelligence-0.1.272/src/athena/types/chunk_result.py +25 -0
- athena_intelligence-0.1.272/src/athena/types/chunk_result_chunk_id.py +5 -0
- athena_intelligence-0.1.272/src/athena/types/color.py +7 -0
- athena_intelligence-0.1.272/src/athena/types/content.py +7 -0
- athena_intelligence-0.1.272/src/athena/types/conversation_asset_info.py +116 -0
- athena_intelligence-0.1.272/src/athena/types/conversation_message.py +42 -0
- athena_intelligence-0.1.272/src/athena/types/conversation_result.py +67 -0
- athena_intelligence-0.1.272/src/athena/types/creatable_asset_type.py +5 -0
- athena_intelligence-0.1.272/src/athena/types/create_asset_response_out.py +46 -0
- athena_intelligence-0.1.272/src/athena/types/create_new_sheet_tab_response.py +37 -0
- athena_intelligence-0.1.272/src/athena/types/create_project_response_out.py +51 -0
- athena_intelligence-0.1.272/src/athena/types/custom_agent_response.py +22 -0
- athena_intelligence-0.1.272/src/athena/types/data_frame_request_out.py +28 -0
- athena_intelligence-0.1.272/src/athena/types/data_frame_unknown_format_error.py +21 -0
- athena_intelligence-0.1.272/src/athena/types/dimension_properties.py +49 -0
- athena_intelligence-0.1.272/src/athena/types/document_chunk.py +24 -0
- athena_intelligence-0.1.272/src/athena/types/drive_agent_response.py +22 -0
- athena_intelligence-0.1.272/src/athena/types/file_chunk_request_out.py +24 -0
- athena_intelligence-0.1.272/src/athena/types/file_too_large_error.py +19 -0
- athena_intelligence-0.1.272/src/athena/types/folder_response.py +31 -0
- athena_intelligence-0.1.272/src/athena/types/general_agent_config.py +27 -0
- athena_intelligence-0.1.272/src/athena/types/general_agent_config_enabled_tools_item.py +5 -0
- athena_intelligence-0.1.272/src/athena/types/general_agent_request.py +39 -0
- athena_intelligence-0.1.272/src/athena/types/general_agent_response.py +24 -0
- athena_intelligence-0.1.272/src/athena/types/general_agent_response_message.py +100 -0
- athena_intelligence-0.1.272/src/athena/types/general_agent_response_message_kwargs.py +74 -0
- athena_intelligence-0.1.272/src/athena/types/get_table_response.py +42 -0
- athena_intelligence-0.1.272/src/athena/types/grid_range.py +39 -0
- athena_intelligence-0.1.272/src/athena/types/id.py +5 -0
- athena_intelligence-0.1.272/src/athena/types/image_url_content.py +23 -0
- athena_intelligence-0.1.272/src/athena/types/input_message.py +29 -0
- athena_intelligence-0.1.272/src/athena/types/input_message_content_item.py +39 -0
- athena_intelligence-0.1.272/src/athena/types/number_format_model.py +28 -0
- athena_intelligence-0.1.272/src/athena/types/number_format_type.py +21 -0
- athena_intelligence-0.1.272/src/athena/types/paginated_assets_out.py +52 -0
- athena_intelligence-0.1.272/src/athena/types/prompt_message.py +25 -0
- athena_intelligence-0.1.272/src/athena/types/public_asset_out.py +97 -0
- athena_intelligence-0.1.272/src/athena/types/research_agent_response.py +22 -0
- athena_intelligence-0.1.272/src/athena/types/save_asset_request_out.py +23 -0
- athena_intelligence-0.1.272/src/athena/types/sheet.py +76 -0
- athena_intelligence-0.1.272/src/athena/types/sheet_operation_response.py +32 -0
- athena_intelligence-0.1.272/src/athena/types/sql_agent_response.py +27 -0
- athena_intelligence-0.1.272/src/athena/types/structured_data_extractor_response.py +32 -0
- athena_intelligence-0.1.272/src/athena/types/tabcolor.py +7 -0
- athena_intelligence-0.1.272/src/athena/types/table_row_data.py +5 -0
- athena_intelligence-0.1.272/src/athena/types/text_content.py +23 -0
- athena_intelligence-0.1.272/src/athena/types/text_format_model.py +28 -0
- athena_intelligence-0.1.272/src/athena/types/textrotation.py +5 -0
- athena_intelligence-0.1.272/src/athena/types/theme_color.py +20 -0
- athena_intelligence-0.1.272/src/athena/types/thread_status_response_out.py +52 -0
- athena_intelligence-0.1.272/src/athena/types/type.py +5 -0
- athena_intelligence-0.1.272/src/athena/types/wrap_strategy.py +5 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/version.py +0 -1
- athena_intelligence-0.1.119/src/athena/__init__.py +0 -69
- athena_intelligence-0.1.119/src/athena/agents/__init__.py +0 -5
- athena_intelligence-0.1.119/src/athena/agents/athena_assistant/client.py +0 -353
- athena_intelligence-0.1.119/src/athena/agents/client.py +0 -19
- athena_intelligence-0.1.119/src/athena/agents/structured_data_extractor/client.py +0 -150
- athena_intelligence-0.1.119/src/athena/base_client.py +0 -146
- athena_intelligence-0.1.119/src/athena/core/__init__.py +0 -30
- athena_intelligence-0.1.119/src/athena/core/api_error.py +0 -15
- athena_intelligence-0.1.119/src/athena/core/client_wrapper.py +0 -55
- athena_intelligence-0.1.119/src/athena/core/file.py +0 -38
- athena_intelligence-0.1.119/src/athena/core/pydantic_utilities.py +0 -28
- athena_intelligence-0.1.119/src/athena/core/query_encoder.py +0 -33
- athena_intelligence-0.1.119/src/athena/errors/__init__.py +0 -19
- athena_intelligence-0.1.119/src/athena/errors/bad_request_error.py +0 -9
- athena_intelligence-0.1.119/src/athena/errors/internal_server_error.py +0 -10
- athena_intelligence-0.1.119/src/athena/errors/not_found_error.py +0 -9
- athena_intelligence-0.1.119/src/athena/errors/unauthorized_error.py +0 -10
- athena_intelligence-0.1.119/src/athena/errors/unprocessable_entity_error.py +0 -10
- athena_intelligence-0.1.119/src/athena/query/__init__.py +0 -5
- athena_intelligence-0.1.119/src/athena/query/client.py +0 -239
- athena_intelligence-0.1.119/src/athena/query/types/__init__.py +0 -5
- athena_intelligence-0.1.119/src/athena/tools/__init__.py +0 -5
- athena_intelligence-0.1.119/src/athena/tools/client.py +0 -526
- athena_intelligence-0.1.119/src/athena/tools/types/__init__.py +0 -5
- athena_intelligence-0.1.119/src/athena/types/__init__.py +0 -39
- athena_intelligence-0.1.119/src/athena/types/asset_not_found_error.py +0 -29
- athena_intelligence-0.1.119/src/athena/types/athena_assistant_config.py +0 -36
- athena_intelligence-0.1.119/src/athena/types/athena_assistant_config_enabled_tools_item.py +0 -7
- athena_intelligence-0.1.119/src/athena/types/athena_assistant_reponse.py +0 -33
- athena_intelligence-0.1.119/src/athena/types/athena_assistant_request.py +0 -38
- athena_intelligence-0.1.119/src/athena/types/data_frame_request_out.py +0 -38
- athena_intelligence-0.1.119/src/athena/types/data_frame_unknown_format_error.py +0 -31
- athena_intelligence-0.1.119/src/athena/types/document_chunk.py +0 -34
- athena_intelligence-0.1.119/src/athena/types/file_chunk_request_out.py +0 -34
- athena_intelligence-0.1.119/src/athena/types/file_too_large_error.py +0 -29
- athena_intelligence-0.1.119/src/athena/types/parent_folder_error.py +0 -29
- athena_intelligence-0.1.119/src/athena/types/save_asset_request_out.py +0 -33
- athena_intelligence-0.1.119/src/athena/types/structured_data_extractor_reponse.py +0 -36
- athena_intelligence-0.1.119/src/athena/types/tool.py +0 -17
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/README.md +0 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/core/datetime_utils.py +0 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/core/remove_none_from_dict.py +0 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/py.typed +0 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/query/types/query_execute_request_database_asset_ids.py +0 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/tools/types/tools_data_frame_request_columns_item.py +0 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/types/data_frame_request_out_columns_item.py +0 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/types/data_frame_request_out_data_item_item.py +0 -0
- {athena_intelligence-0.1.119 → athena_intelligence-0.1.272}/src/athena/types/data_frame_request_out_index_item.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: athena-intelligence
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.272
|
|
4
4
|
Summary: Athena Intelligence Python Library
|
|
5
|
-
Requires-Python: >=3.
|
|
5
|
+
Requires-Python: >=3.9,<4.0
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
7
7
|
Classifier: Operating System :: MacOS
|
|
8
8
|
Classifier: Operating System :: Microsoft :: Windows
|
|
@@ -11,15 +11,19 @@ Classifier: Operating System :: POSIX
|
|
|
11
11
|
Classifier: Operating System :: POSIX :: Linux
|
|
12
12
|
Classifier: Programming Language :: Python
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
20
|
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Dist: fastapi (==0.115.10)
|
|
21
22
|
Requires-Dist: httpx (>=0.21.2)
|
|
23
|
+
Requires-Dist: langchain_core (>=0.3.40,<0.4.0)
|
|
24
|
+
Requires-Dist: langserve (>=0.3.1,<0.4.0)
|
|
22
25
|
Requires-Dist: pydantic (>=1.9.2)
|
|
26
|
+
Requires-Dist: pydantic-core (>=2.18.2)
|
|
23
27
|
Requires-Dist: python-magic (==0.4.27)
|
|
24
28
|
Requires-Dist: typing_extensions (>=4.0.0)
|
|
25
29
|
Description-Content-Type: text/markdown
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "athena-intelligence"
|
|
3
|
+
|
|
1
4
|
[tool.poetry]
|
|
2
5
|
name = "athena-intelligence"
|
|
3
|
-
version = "0.1.
|
|
6
|
+
version = "0.1.272"
|
|
4
7
|
description = "Athena Intelligence Python Library"
|
|
5
8
|
readme = "README.md"
|
|
6
9
|
authors = []
|
|
@@ -28,25 +31,30 @@ packages = [
|
|
|
28
31
|
]
|
|
29
32
|
|
|
30
33
|
[project.urls]
|
|
31
|
-
Documentation = 'https://docs.
|
|
32
|
-
Homepage = 'https://www.
|
|
34
|
+
Documentation = 'https://docs.athenaintel.com/'
|
|
35
|
+
Homepage = 'https://www.athenaintel.com/'
|
|
33
36
|
Repository = 'https://github.com/Athena-Intel/athena-python'
|
|
34
37
|
|
|
35
38
|
[tool.poetry.dependencies]
|
|
36
|
-
python = "
|
|
39
|
+
python = ">=3.9,<4.0"
|
|
40
|
+
fastapi = "0.115.10"
|
|
37
41
|
httpx = ">=0.21.2"
|
|
42
|
+
langchain_core = "^0.3.40"
|
|
43
|
+
langserve = "^0.3.1"
|
|
38
44
|
pydantic = ">= 1.9.2"
|
|
45
|
+
pydantic-core = ">=2.18.2"
|
|
39
46
|
python-magic = "0.4.27"
|
|
40
47
|
typing_extensions = ">= 4.0.0"
|
|
41
48
|
|
|
42
|
-
[tool.poetry.dev
|
|
43
|
-
mypy = "1.0
|
|
49
|
+
[tool.poetry.group.dev.dependencies]
|
|
50
|
+
mypy = "==1.13.0"
|
|
44
51
|
pytest = "^7.4.0"
|
|
45
52
|
pytest-asyncio = "^0.23.5"
|
|
46
53
|
python-dateutil = "^2.9.0"
|
|
47
54
|
types-python-dateutil = "^2.9.0.20240316"
|
|
48
55
|
pandas = ">= 1.5.3"
|
|
49
56
|
pandas-stubs = ">= 1.5.3"
|
|
57
|
+
ruff = "==0.11.5"
|
|
50
58
|
|
|
51
59
|
[tool.pytest.ini_options]
|
|
52
60
|
testpaths = [ "tests" ]
|
|
@@ -55,6 +63,29 @@ asyncio_mode = "auto"
|
|
|
55
63
|
[tool.mypy]
|
|
56
64
|
plugins = ["pydantic.mypy"]
|
|
57
65
|
|
|
66
|
+
[tool.ruff]
|
|
67
|
+
line-length = 120
|
|
68
|
+
|
|
69
|
+
[tool.ruff.lint]
|
|
70
|
+
select = [
|
|
71
|
+
"E", # pycodestyle errors
|
|
72
|
+
"F", # pyflakes
|
|
73
|
+
"I", # isort
|
|
74
|
+
]
|
|
75
|
+
ignore = [
|
|
76
|
+
"E402", # Module level import not at top of file
|
|
77
|
+
"E501", # Line too long
|
|
78
|
+
"E711", # Comparison to `None` should be `cond is not None`
|
|
79
|
+
"E712", # Avoid equality comparisons to `True`; use `if ...:` checks
|
|
80
|
+
"E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for insinstance checks
|
|
81
|
+
"E722", # Do not use bare `except`
|
|
82
|
+
"E731", # Do not assign a `lambda` expression, use a `def`
|
|
83
|
+
"F821", # Undefined name
|
|
84
|
+
"F841" # Local variable ... is assigned to but never used
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
[tool.ruff.lint.isort]
|
|
88
|
+
section-order = ["future", "standard-library", "third-party", "first-party"]
|
|
58
89
|
|
|
59
90
|
[build-system]
|
|
60
91
|
requires = ["poetry-core"]
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
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
|
+
DocumentChunk,
|
|
46
|
+
DriveAgentResponse,
|
|
47
|
+
FileChunkRequestOut,
|
|
48
|
+
FileTooLargeError,
|
|
49
|
+
FolderResponse,
|
|
50
|
+
GeneralAgentConfig,
|
|
51
|
+
GeneralAgentConfigEnabledToolsItem,
|
|
52
|
+
GeneralAgentRequest,
|
|
53
|
+
GeneralAgentResponse,
|
|
54
|
+
GeneralAgentResponseMessage,
|
|
55
|
+
GeneralAgentResponseMessageKwargs,
|
|
56
|
+
GetTableResponse,
|
|
57
|
+
GridRange,
|
|
58
|
+
Id,
|
|
59
|
+
ImageUrlContent,
|
|
60
|
+
InputMessage,
|
|
61
|
+
InputMessageContentItem,
|
|
62
|
+
InputMessageContentItem_ImageUrl,
|
|
63
|
+
InputMessageContentItem_Text,
|
|
64
|
+
NumberFormatModel,
|
|
65
|
+
NumberFormatType,
|
|
66
|
+
PaginatedAssetsOut,
|
|
67
|
+
PromptMessage,
|
|
68
|
+
PublicAssetOut,
|
|
69
|
+
ResearchAgentResponse,
|
|
70
|
+
SaveAssetRequestOut,
|
|
71
|
+
Sheet,
|
|
72
|
+
SheetOperationResponse,
|
|
73
|
+
SqlAgentResponse,
|
|
74
|
+
StructuredDataExtractorResponse,
|
|
75
|
+
Tabcolor,
|
|
76
|
+
TableRowData,
|
|
77
|
+
TextContent,
|
|
78
|
+
TextFormatModel,
|
|
79
|
+
Textrotation,
|
|
80
|
+
ThemeColor,
|
|
81
|
+
ThreadStatusResponseOut,
|
|
82
|
+
Type,
|
|
83
|
+
WrapStrategy,
|
|
84
|
+
)
|
|
85
|
+
from .errors import (
|
|
86
|
+
BadRequestError,
|
|
87
|
+
ContentTooLargeError,
|
|
88
|
+
InternalServerError,
|
|
89
|
+
NotFoundError,
|
|
90
|
+
UnauthorizedError,
|
|
91
|
+
UnprocessableEntityError,
|
|
92
|
+
UnsupportedMediaTypeError,
|
|
93
|
+
)
|
|
94
|
+
from . import agents, aop, assets, query, threads, tools
|
|
95
|
+
from .client import AsyncAthena, Athena
|
|
96
|
+
from .environment import AthenaEnvironment
|
|
97
|
+
from .query import QueryExecuteRequestDatabaseAssetIds
|
|
98
|
+
from .tools import ToolsDataFrameRequestColumnsItem
|
|
99
|
+
from .version import __version__
|
|
100
|
+
_dynamic_imports: typing.Dict[str, str] = {
|
|
101
|
+
"AopAsyncExecuteResponseOut": ".types",
|
|
102
|
+
"AopExecuteRequestIn": ".types",
|
|
103
|
+
"AopExecuteResponseOut": ".types",
|
|
104
|
+
"AssetContentRequestOut": ".types",
|
|
105
|
+
"AssetNode": ".types",
|
|
106
|
+
"AssetScreenshotResponseOut": ".types",
|
|
107
|
+
"AsyncAthena": ".client",
|
|
108
|
+
"Athena": ".client",
|
|
109
|
+
"AthenaEnvironment": ".environment",
|
|
110
|
+
"Backgroundcolor": ".types",
|
|
111
|
+
"BadRequestError": ".errors",
|
|
112
|
+
"BorderModel": ".types",
|
|
113
|
+
"BorderStyle": ".types",
|
|
114
|
+
"BordersModel": ".types",
|
|
115
|
+
"CellFormat": ".types",
|
|
116
|
+
"CellFormatHorizontalAlignment": ".types",
|
|
117
|
+
"CellFormatVerticalAlignment": ".types",
|
|
118
|
+
"Chunk": ".types",
|
|
119
|
+
"ChunkContentItem": ".types",
|
|
120
|
+
"ChunkContentItem_ImageUrl": ".types",
|
|
121
|
+
"ChunkContentItem_Text": ".types",
|
|
122
|
+
"ChunkResult": ".types",
|
|
123
|
+
"ChunkResultChunkId": ".types",
|
|
124
|
+
"Color": ".types",
|
|
125
|
+
"Content": ".types",
|
|
126
|
+
"ContentTooLargeError": ".errors",
|
|
127
|
+
"ConversationAssetInfo": ".types",
|
|
128
|
+
"ConversationMessage": ".types",
|
|
129
|
+
"ConversationResult": ".types",
|
|
130
|
+
"CreatableAssetType": ".types",
|
|
131
|
+
"CreateAssetResponseOut": ".types",
|
|
132
|
+
"CreateNewSheetTabResponse": ".types",
|
|
133
|
+
"CreateProjectResponseOut": ".types",
|
|
134
|
+
"CustomAgentResponse": ".types",
|
|
135
|
+
"DataFrameRequestOut": ".types",
|
|
136
|
+
"DataFrameRequestOutColumnsItem": ".types",
|
|
137
|
+
"DataFrameRequestOutDataItemItem": ".types",
|
|
138
|
+
"DataFrameRequestOutIndexItem": ".types",
|
|
139
|
+
"DataFrameUnknownFormatError": ".types",
|
|
140
|
+
"DimensionProperties": ".types",
|
|
141
|
+
"DocumentChunk": ".types",
|
|
142
|
+
"DriveAgentResponse": ".types",
|
|
143
|
+
"FileChunkRequestOut": ".types",
|
|
144
|
+
"FileTooLargeError": ".types",
|
|
145
|
+
"FolderResponse": ".types",
|
|
146
|
+
"GeneralAgentConfig": ".types",
|
|
147
|
+
"GeneralAgentConfigEnabledToolsItem": ".types",
|
|
148
|
+
"GeneralAgentRequest": ".types",
|
|
149
|
+
"GeneralAgentResponse": ".types",
|
|
150
|
+
"GeneralAgentResponseMessage": ".types",
|
|
151
|
+
"GeneralAgentResponseMessageKwargs": ".types",
|
|
152
|
+
"GetTableResponse": ".types",
|
|
153
|
+
"GridRange": ".types",
|
|
154
|
+
"Id": ".types",
|
|
155
|
+
"ImageUrlContent": ".types",
|
|
156
|
+
"InputMessage": ".types",
|
|
157
|
+
"InputMessageContentItem": ".types",
|
|
158
|
+
"InputMessageContentItem_ImageUrl": ".types",
|
|
159
|
+
"InputMessageContentItem_Text": ".types",
|
|
160
|
+
"InternalServerError": ".errors",
|
|
161
|
+
"NotFoundError": ".errors",
|
|
162
|
+
"NumberFormatModel": ".types",
|
|
163
|
+
"NumberFormatType": ".types",
|
|
164
|
+
"PaginatedAssetsOut": ".types",
|
|
165
|
+
"PromptMessage": ".types",
|
|
166
|
+
"PublicAssetOut": ".types",
|
|
167
|
+
"QueryExecuteRequestDatabaseAssetIds": ".query",
|
|
168
|
+
"ResearchAgentResponse": ".types",
|
|
169
|
+
"SaveAssetRequestOut": ".types",
|
|
170
|
+
"Sheet": ".types",
|
|
171
|
+
"SheetOperationResponse": ".types",
|
|
172
|
+
"SqlAgentResponse": ".types",
|
|
173
|
+
"StructuredDataExtractorResponse": ".types",
|
|
174
|
+
"Tabcolor": ".types",
|
|
175
|
+
"TableRowData": ".types",
|
|
176
|
+
"TextContent": ".types",
|
|
177
|
+
"TextFormatModel": ".types",
|
|
178
|
+
"Textrotation": ".types",
|
|
179
|
+
"ThemeColor": ".types",
|
|
180
|
+
"ThreadStatusResponseOut": ".types",
|
|
181
|
+
"ToolsDataFrameRequestColumnsItem": ".tools",
|
|
182
|
+
"Type": ".types",
|
|
183
|
+
"UnauthorizedError": ".errors",
|
|
184
|
+
"UnprocessableEntityError": ".errors",
|
|
185
|
+
"UnsupportedMediaTypeError": ".errors",
|
|
186
|
+
"WrapStrategy": ".types",
|
|
187
|
+
"__version__": ".version",
|
|
188
|
+
"agents": ".agents",
|
|
189
|
+
"aop": ".aop",
|
|
190
|
+
"assets": ".assets",
|
|
191
|
+
"query": ".query",
|
|
192
|
+
"threads": ".threads",
|
|
193
|
+
"tools": ".tools",
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def __getattr__(attr_name: str) -> typing.Any:
|
|
198
|
+
module_name = _dynamic_imports.get(attr_name)
|
|
199
|
+
if module_name is None:
|
|
200
|
+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
|
|
201
|
+
try:
|
|
202
|
+
module = import_module(module_name, __package__)
|
|
203
|
+
if module_name == f".{attr_name}":
|
|
204
|
+
return module
|
|
205
|
+
else:
|
|
206
|
+
return getattr(module, attr_name)
|
|
207
|
+
except ImportError as e:
|
|
208
|
+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
|
|
209
|
+
except AttributeError as e:
|
|
210
|
+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
def __dir__():
|
|
214
|
+
lazy_attrs = list(_dynamic_imports.keys())
|
|
215
|
+
return sorted(lazy_attrs)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
__all__ = [
|
|
219
|
+
"AopAsyncExecuteResponseOut",
|
|
220
|
+
"AopExecuteRequestIn",
|
|
221
|
+
"AopExecuteResponseOut",
|
|
222
|
+
"AssetContentRequestOut",
|
|
223
|
+
"AssetNode",
|
|
224
|
+
"AssetScreenshotResponseOut",
|
|
225
|
+
"AsyncAthena",
|
|
226
|
+
"Athena",
|
|
227
|
+
"AthenaEnvironment",
|
|
228
|
+
"Backgroundcolor",
|
|
229
|
+
"BadRequestError",
|
|
230
|
+
"BorderModel",
|
|
231
|
+
"BorderStyle",
|
|
232
|
+
"BordersModel",
|
|
233
|
+
"CellFormat",
|
|
234
|
+
"CellFormatHorizontalAlignment",
|
|
235
|
+
"CellFormatVerticalAlignment",
|
|
236
|
+
"Chunk",
|
|
237
|
+
"ChunkContentItem",
|
|
238
|
+
"ChunkContentItem_ImageUrl",
|
|
239
|
+
"ChunkContentItem_Text",
|
|
240
|
+
"ChunkResult",
|
|
241
|
+
"ChunkResultChunkId",
|
|
242
|
+
"Color",
|
|
243
|
+
"Content",
|
|
244
|
+
"ContentTooLargeError",
|
|
245
|
+
"ConversationAssetInfo",
|
|
246
|
+
"ConversationMessage",
|
|
247
|
+
"ConversationResult",
|
|
248
|
+
"CreatableAssetType",
|
|
249
|
+
"CreateAssetResponseOut",
|
|
250
|
+
"CreateNewSheetTabResponse",
|
|
251
|
+
"CreateProjectResponseOut",
|
|
252
|
+
"CustomAgentResponse",
|
|
253
|
+
"DataFrameRequestOut",
|
|
254
|
+
"DataFrameRequestOutColumnsItem",
|
|
255
|
+
"DataFrameRequestOutDataItemItem",
|
|
256
|
+
"DataFrameRequestOutIndexItem",
|
|
257
|
+
"DataFrameUnknownFormatError",
|
|
258
|
+
"DimensionProperties",
|
|
259
|
+
"DocumentChunk",
|
|
260
|
+
"DriveAgentResponse",
|
|
261
|
+
"FileChunkRequestOut",
|
|
262
|
+
"FileTooLargeError",
|
|
263
|
+
"FolderResponse",
|
|
264
|
+
"GeneralAgentConfig",
|
|
265
|
+
"GeneralAgentConfigEnabledToolsItem",
|
|
266
|
+
"GeneralAgentRequest",
|
|
267
|
+
"GeneralAgentResponse",
|
|
268
|
+
"GeneralAgentResponseMessage",
|
|
269
|
+
"GeneralAgentResponseMessageKwargs",
|
|
270
|
+
"GetTableResponse",
|
|
271
|
+
"GridRange",
|
|
272
|
+
"Id",
|
|
273
|
+
"ImageUrlContent",
|
|
274
|
+
"InputMessage",
|
|
275
|
+
"InputMessageContentItem",
|
|
276
|
+
"InputMessageContentItem_ImageUrl",
|
|
277
|
+
"InputMessageContentItem_Text",
|
|
278
|
+
"InternalServerError",
|
|
279
|
+
"NotFoundError",
|
|
280
|
+
"NumberFormatModel",
|
|
281
|
+
"NumberFormatType",
|
|
282
|
+
"PaginatedAssetsOut",
|
|
283
|
+
"PromptMessage",
|
|
284
|
+
"PublicAssetOut",
|
|
285
|
+
"QueryExecuteRequestDatabaseAssetIds",
|
|
286
|
+
"ResearchAgentResponse",
|
|
287
|
+
"SaveAssetRequestOut",
|
|
288
|
+
"Sheet",
|
|
289
|
+
"SheetOperationResponse",
|
|
290
|
+
"SqlAgentResponse",
|
|
291
|
+
"StructuredDataExtractorResponse",
|
|
292
|
+
"Tabcolor",
|
|
293
|
+
"TableRowData",
|
|
294
|
+
"TextContent",
|
|
295
|
+
"TextFormatModel",
|
|
296
|
+
"Textrotation",
|
|
297
|
+
"ThemeColor",
|
|
298
|
+
"ThreadStatusResponseOut",
|
|
299
|
+
"ToolsDataFrameRequestColumnsItem",
|
|
300
|
+
"Type",
|
|
301
|
+
"UnauthorizedError",
|
|
302
|
+
"UnprocessableEntityError",
|
|
303
|
+
"UnsupportedMediaTypeError",
|
|
304
|
+
"WrapStrategy",
|
|
305
|
+
"__version__",
|
|
306
|
+
"agents",
|
|
307
|
+
"aop",
|
|
308
|
+
"assets",
|
|
309
|
+
"query",
|
|
310
|
+
"threads",
|
|
311
|
+
"tools",
|
|
312
|
+
]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
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
|
+
|
|
38
|
+
|
|
39
|
+
__all__ = ["drive", "general", "research", "sql"]
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import typing
|
|
6
|
+
|
|
7
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ..core.request_options import RequestOptions
|
|
9
|
+
from ..types.custom_agent_response import CustomAgentResponse
|
|
10
|
+
from .raw_client import AsyncRawAgentsClient, RawAgentsClient
|
|
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
|
|
17
|
+
# this is used as the default value for optional parameters
|
|
18
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class AgentsClient:
|
|
22
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
23
|
+
self._raw_client = RawAgentsClient(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
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def with_raw_response(self) -> RawAgentsClient:
|
|
32
|
+
"""
|
|
33
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
34
|
+
|
|
35
|
+
Returns
|
|
36
|
+
-------
|
|
37
|
+
RawAgentsClient
|
|
38
|
+
"""
|
|
39
|
+
return self._raw_client
|
|
40
|
+
|
|
41
|
+
def invoke_by_id(
|
|
42
|
+
self,
|
|
43
|
+
agent_id: str,
|
|
44
|
+
*,
|
|
45
|
+
config: typing.Dict[str, typing.Optional[typing.Any]],
|
|
46
|
+
messages: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
|
|
47
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
48
|
+
) -> CustomAgentResponse:
|
|
49
|
+
"""
|
|
50
|
+
Coming soon!
|
|
51
|
+
|
|
52
|
+
Invoke a custom agent created in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
|
|
53
|
+
|
|
54
|
+
Custom agents can be created and configured in spaces to perform specialized tasks.
|
|
55
|
+
Refer to the specific agent's documentation for details on configuration options
|
|
56
|
+
and expected responses.
|
|
57
|
+
|
|
58
|
+
Parameters
|
|
59
|
+
----------
|
|
60
|
+
agent_id : str
|
|
61
|
+
The ID of the custom agent to invoke. Create custom agents in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
|
|
62
|
+
|
|
63
|
+
config : typing.Dict[str, typing.Optional[typing.Any]]
|
|
64
|
+
Configuration for the custom agent. See the agent's documentation for specific configuration options.
|
|
65
|
+
|
|
66
|
+
messages : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
67
|
+
The messages to send to the custom agent
|
|
68
|
+
|
|
69
|
+
request_options : typing.Optional[RequestOptions]
|
|
70
|
+
Request-specific configuration.
|
|
71
|
+
|
|
72
|
+
Returns
|
|
73
|
+
-------
|
|
74
|
+
CustomAgentResponse
|
|
75
|
+
Successful Response
|
|
76
|
+
|
|
77
|
+
Examples
|
|
78
|
+
--------
|
|
79
|
+
from athena import Athena
|
|
80
|
+
|
|
81
|
+
client = Athena(
|
|
82
|
+
api_key="YOUR_API_KEY",
|
|
83
|
+
)
|
|
84
|
+
client.agents.invoke_by_id(
|
|
85
|
+
agent_id="agent_id",
|
|
86
|
+
config={"key": "value"},
|
|
87
|
+
messages=[{"key": "value"}],
|
|
88
|
+
)
|
|
89
|
+
"""
|
|
90
|
+
_response = self._raw_client.invoke_by_id(
|
|
91
|
+
agent_id, config=config, messages=messages, request_options=request_options
|
|
92
|
+
)
|
|
93
|
+
return _response.data
|
|
94
|
+
|
|
95
|
+
@property
|
|
96
|
+
def drive(self):
|
|
97
|
+
if self._drive is None:
|
|
98
|
+
from .drive.client import DriveClient # noqa: E402
|
|
99
|
+
|
|
100
|
+
self._drive = DriveClient(client_wrapper=self._client_wrapper)
|
|
101
|
+
return self._drive
|
|
102
|
+
|
|
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
|
|
110
|
+
|
|
111
|
+
@property
|
|
112
|
+
def research(self):
|
|
113
|
+
if self._research is None:
|
|
114
|
+
from .research.client import ResearchClient # noqa: E402
|
|
115
|
+
|
|
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
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def with_raw_response(self) -> AsyncRawAgentsClient:
|
|
139
|
+
"""
|
|
140
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
141
|
+
|
|
142
|
+
Returns
|
|
143
|
+
-------
|
|
144
|
+
AsyncRawAgentsClient
|
|
145
|
+
"""
|
|
146
|
+
return self._raw_client
|
|
147
|
+
|
|
148
|
+
async def invoke_by_id(
|
|
149
|
+
self,
|
|
150
|
+
agent_id: str,
|
|
151
|
+
*,
|
|
152
|
+
config: typing.Dict[str, typing.Optional[typing.Any]],
|
|
153
|
+
messages: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
|
|
154
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
155
|
+
) -> CustomAgentResponse:
|
|
156
|
+
"""
|
|
157
|
+
Coming soon!
|
|
158
|
+
|
|
159
|
+
Invoke a custom agent created in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
|
|
160
|
+
|
|
161
|
+
Custom agents can be created and configured in spaces to perform specialized tasks.
|
|
162
|
+
Refer to the specific agent's documentation for details on configuration options
|
|
163
|
+
and expected responses.
|
|
164
|
+
|
|
165
|
+
Parameters
|
|
166
|
+
----------
|
|
167
|
+
agent_id : str
|
|
168
|
+
The ID of the custom agent to invoke. Create custom agents in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
|
|
169
|
+
|
|
170
|
+
config : typing.Dict[str, typing.Optional[typing.Any]]
|
|
171
|
+
Configuration for the custom agent. See the agent's documentation for specific configuration options.
|
|
172
|
+
|
|
173
|
+
messages : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
174
|
+
The messages to send to the custom agent
|
|
175
|
+
|
|
176
|
+
request_options : typing.Optional[RequestOptions]
|
|
177
|
+
Request-specific configuration.
|
|
178
|
+
|
|
179
|
+
Returns
|
|
180
|
+
-------
|
|
181
|
+
CustomAgentResponse
|
|
182
|
+
Successful Response
|
|
183
|
+
|
|
184
|
+
Examples
|
|
185
|
+
--------
|
|
186
|
+
import asyncio
|
|
187
|
+
|
|
188
|
+
from athena import AsyncAthena
|
|
189
|
+
|
|
190
|
+
client = AsyncAthena(
|
|
191
|
+
api_key="YOUR_API_KEY",
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
async def main() -> None:
|
|
196
|
+
await client.agents.invoke_by_id(
|
|
197
|
+
agent_id="agent_id",
|
|
198
|
+
config={"key": "value"},
|
|
199
|
+
messages=[{"key": "value"}],
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
asyncio.run(main())
|
|
204
|
+
"""
|
|
205
|
+
_response = await self._raw_client.invoke_by_id(
|
|
206
|
+
agent_id, config=config, messages=messages, request_options=request_options
|
|
207
|
+
)
|
|
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
|