athena-intelligence 0.1.127__tar.gz → 0.1.185__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.
Files changed (123) hide show
  1. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/PKG-INFO +3 -7
  2. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/pyproject.toml +25 -5
  3. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/__init__.py +24 -3
  4. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/agents/__init__.py +2 -0
  5. athena_intelligence-0.1.185/src/athena/agents/client.py +177 -0
  6. {athena_intelligence-0.1.127/src/athena/agents/sql → athena_intelligence-0.1.185/src/athena/agents/drive}/__init__.py +2 -0
  7. athena_intelligence-0.1.185/src/athena/agents/drive/client.py +133 -0
  8. athena_intelligence-0.1.127/src/athena/agents/drive/client.py → athena_intelligence-0.1.185/src/athena/agents/drive/raw_client.py +27 -54
  9. {athena_intelligence-0.1.127/src/athena/agents/drive → athena_intelligence-0.1.185/src/athena/agents/general}/__init__.py +2 -0
  10. athena_intelligence-0.1.185/src/athena/agents/general/client.py +345 -0
  11. athena_intelligence-0.1.127/src/athena/agents/general/client.py → athena_intelligence-0.1.185/src/athena/agents/general/raw_client.py +82 -205
  12. athena_intelligence-0.1.127/src/athena/agents/client.py → athena_intelligence-0.1.185/src/athena/agents/raw_client.py +27 -72
  13. {athena_intelligence-0.1.127/src/athena/agents/general → athena_intelligence-0.1.185/src/athena/agents/research}/__init__.py +2 -0
  14. athena_intelligence-0.1.185/src/athena/agents/research/client.py +133 -0
  15. athena_intelligence-0.1.127/src/athena/agents/research/client.py → athena_intelligence-0.1.185/src/athena/agents/research/raw_client.py +27 -54
  16. {athena_intelligence-0.1.127/src/athena/agents/research → athena_intelligence-0.1.185/src/athena/agents/sql}/__init__.py +2 -0
  17. athena_intelligence-0.1.185/src/athena/agents/sql/client.py +133 -0
  18. athena_intelligence-0.1.127/src/athena/agents/sql/client.py → athena_intelligence-0.1.185/src/athena/agents/sql/raw_client.py +27 -54
  19. athena_intelligence-0.1.185/src/athena/assets/__init__.py +4 -0
  20. athena_intelligence-0.1.185/src/athena/assets/client.py +144 -0
  21. athena_intelligence-0.1.185/src/athena/assets/raw_client.py +164 -0
  22. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/base_client.py +25 -11
  23. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/client.py +1 -1
  24. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/__init__.py +5 -0
  25. athena_intelligence-0.1.185/src/athena/core/api_error.py +23 -0
  26. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/client_wrapper.py +33 -8
  27. athena_intelligence-0.1.185/src/athena/core/force_multipart.py +16 -0
  28. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/http_client.py +70 -26
  29. athena_intelligence-0.1.185/src/athena/core/http_response.py +55 -0
  30. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/jsonable_encoder.py +0 -1
  31. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/pydantic_utilities.py +70 -111
  32. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/serialization.py +7 -3
  33. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/errors/__init__.py +2 -0
  34. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/errors/bad_request_error.py +4 -2
  35. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/errors/content_too_large_error.py +4 -2
  36. athena_intelligence-0.1.185/src/athena/errors/internal_server_error.py +10 -0
  37. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/errors/not_found_error.py +4 -2
  38. athena_intelligence-0.1.185/src/athena/errors/unauthorized_error.py +10 -0
  39. athena_intelligence-0.1.185/src/athena/errors/unprocessable_entity_error.py +10 -0
  40. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/errors/unsupported_media_type_error.py +4 -2
  41. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/query/__init__.py +2 -0
  42. athena_intelligence-0.1.185/src/athena/query/client.py +209 -0
  43. athena_intelligence-0.1.127/src/athena/query/client.py → athena_intelligence-0.1.185/src/athena/query/raw_client.py +71 -116
  44. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/query/types/__init__.py +2 -0
  45. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/tools/__init__.py +2 -0
  46. athena_intelligence-0.1.185/src/athena/tools/calendar/__init__.py +4 -0
  47. athena_intelligence-0.1.185/src/athena/tools/calendar/client.py +163 -0
  48. athena_intelligence-0.1.127/src/athena/tools/calendar/client.py → athena_intelligence-0.1.185/src/athena/tools/calendar/raw_client.py +43 -78
  49. athena_intelligence-0.1.185/src/athena/tools/client.py +669 -0
  50. athena_intelligence-0.1.185/src/athena/tools/email/__init__.py +4 -0
  51. athena_intelligence-0.1.185/src/athena/tools/email/client.py +221 -0
  52. athena_intelligence-0.1.127/src/athena/tools/email/client.py → athena_intelligence-0.1.185/src/athena/tools/email/raw_client.py +65 -114
  53. athena_intelligence-0.1.127/src/athena/tools/client.py → athena_intelligence-0.1.185/src/athena/tools/raw_client.py +352 -455
  54. athena_intelligence-0.1.185/src/athena/tools/structured_data_extractor/__init__.py +4 -0
  55. athena_intelligence-0.1.185/src/athena/tools/structured_data_extractor/client.py +267 -0
  56. athena_intelligence-0.1.127/src/athena/tools/structured_data_extractor/client.py → athena_intelligence-0.1.185/src/athena/tools/structured_data_extractor/raw_client.py +29 -110
  57. athena_intelligence-0.1.185/src/athena/tools/tasks/__init__.py +4 -0
  58. athena_intelligence-0.1.185/src/athena/tools/tasks/client.py +99 -0
  59. athena_intelligence-0.1.127/src/athena/tools/tasks/client.py → athena_intelligence-0.1.185/src/athena/tools/tasks/raw_client.py +27 -42
  60. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/tools/types/__init__.py +2 -0
  61. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/__init__.py +24 -2
  62. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/asset_content_request_out.py +3 -3
  63. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/asset_node.py +3 -3
  64. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/asset_not_found_error.py +2 -2
  65. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/asset_screenshot_response_out.py +4 -4
  66. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/chunk.py +3 -3
  67. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/chunk_content_item.py +3 -2
  68. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/chunk_result.py +3 -3
  69. athena_intelligence-0.1.185/src/athena/types/content.py +7 -0
  70. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/custom_agent_response.py +2 -2
  71. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/data_frame_request_out.py +3 -3
  72. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/data_frame_unknown_format_error.py +2 -2
  73. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/document_chunk.py +2 -2
  74. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/drive_agent_response.py +2 -2
  75. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/file_chunk_request_out.py +3 -3
  76. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/file_too_large_error.py +2 -2
  77. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/folder_response.py +10 -4
  78. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/general_agent_config.py +3 -3
  79. athena_intelligence-0.1.185/src/athena/types/general_agent_config_enabled_tools_item.py +5 -0
  80. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/general_agent_request.py +15 -4
  81. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/general_agent_response.py +4 -3
  82. athena_intelligence-0.1.185/src/athena/types/general_agent_response_message.py +100 -0
  83. athena_intelligence-0.1.185/src/athena/types/general_agent_response_message_kwargs.py +74 -0
  84. athena_intelligence-0.1.185/src/athena/types/id.py +5 -0
  85. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/image_url_content.py +2 -2
  86. athena_intelligence-0.1.185/src/athena/types/input_message.py +29 -0
  87. athena_intelligence-0.1.185/src/athena/types/input_message_content_item.py +39 -0
  88. athena_intelligence-0.1.185/src/athena/types/paginated_assets_out.py +52 -0
  89. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/parent_folder_error.py +2 -2
  90. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/prompt_message.py +3 -3
  91. athena_intelligence-0.1.185/src/athena/types/public_asset_out.py +97 -0
  92. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/research_agent_response.py +2 -2
  93. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/save_asset_request_out.py +2 -2
  94. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/sql_agent_response.py +2 -2
  95. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/structured_data_extractor_response.py +3 -3
  96. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/text_content.py +2 -2
  97. athena_intelligence-0.1.185/src/athena/types/type.py +5 -0
  98. athena_intelligence-0.1.127/src/athena/core/api_error.py +0 -15
  99. athena_intelligence-0.1.127/src/athena/errors/internal_server_error.py +0 -9
  100. athena_intelligence-0.1.127/src/athena/errors/unauthorized_error.py +0 -9
  101. athena_intelligence-0.1.127/src/athena/errors/unprocessable_entity_error.py +0 -9
  102. athena_intelligence-0.1.127/src/athena/tools/calendar/__init__.py +0 -2
  103. athena_intelligence-0.1.127/src/athena/tools/email/__init__.py +0 -2
  104. athena_intelligence-0.1.127/src/athena/tools/structured_data_extractor/__init__.py +0 -2
  105. athena_intelligence-0.1.127/src/athena/tools/tasks/__init__.py +0 -2
  106. athena_intelligence-0.1.127/src/athena/types/general_agent_config_enabled_tools_item.py +0 -6
  107. athena_intelligence-0.1.127/src/athena/types/tool.py +0 -5
  108. athena_intelligence-0.1.127/src/athena/types/type.py +0 -5
  109. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/README.md +0 -0
  110. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/datetime_utils.py +0 -0
  111. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/file.py +0 -0
  112. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/query_encoder.py +0 -0
  113. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/remove_none_from_dict.py +0 -0
  114. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/core/request_options.py +0 -0
  115. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/environment.py +0 -0
  116. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/py.typed +0 -0
  117. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/query/types/query_execute_request_database_asset_ids.py +0 -0
  118. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/tools/types/tools_data_frame_request_columns_item.py +0 -0
  119. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/chunk_result_chunk_id.py +0 -0
  120. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/data_frame_request_out_columns_item.py +0 -0
  121. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/data_frame_request_out_data_item_item.py +0 -0
  122. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/types/data_frame_request_out_index_item.py +0 -0
  123. {athena_intelligence-0.1.127 → athena_intelligence-0.1.185}/src/athena/version.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.127
3
+ Version: 0.1.185
4
4
  Summary: Athena Intelligence Python Library
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -15,7 +15,6 @@ Classifier: Programming Language :: Python :: 3.9
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Programming Language :: Python :: 3.13
19
18
  Classifier: Programming Language :: Python :: 3.8
20
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
20
  Classifier: Typing :: Typed
@@ -24,12 +23,9 @@ Requires-Dist: httpx (>=0.21.2)
24
23
  Requires-Dist: langchain_core (>=0.3.40,<0.4.0)
25
24
  Requires-Dist: langserve (>=0.3.1,<0.4.0)
26
25
  Requires-Dist: pydantic (>=1.9.2)
27
- Requires-Dist: pydantic-core (>=2.18.2,<3.0.0)
26
+ Requires-Dist: pydantic-core (>=2.18.2)
28
27
  Requires-Dist: python-magic (==0.4.27)
29
28
  Requires-Dist: typing_extensions (>=4.0.0)
30
- Project-URL: Documentation, https://docs.athenaintel.com/
31
- Project-URL: Homepage, https://www.athenaintel.com/
32
- Project-URL: Repository, https://github.com/Athena-Intel/athena-python
33
29
  Description-Content-Type: text/markdown
34
30
 
35
31
  # Athena Intelligence Python Library
@@ -3,7 +3,7 @@ name = "athena-intelligence"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "athena-intelligence"
6
- version = "0.1.127"
6
+ version = "0.1.185"
7
7
  description = "Athena Intelligence Python Library"
8
8
  readme = "README.md"
9
9
  authors = []
@@ -42,19 +42,19 @@ httpx = ">=0.21.2"
42
42
  langchain_core = "^0.3.40"
43
43
  langserve = "^0.3.1"
44
44
  pydantic = ">= 1.9.2"
45
- pydantic-core = "^2.18.2"
45
+ pydantic-core = ">=2.18.2"
46
46
  python-magic = "0.4.27"
47
47
  typing_extensions = ">= 4.0.0"
48
48
 
49
- [tool.poetry.dev-dependencies]
50
- mypy = "1.0.1"
49
+ [tool.poetry.group.dev.dependencies]
50
+ mypy = "==1.13.0"
51
51
  pytest = "^7.4.0"
52
52
  pytest-asyncio = "^0.23.5"
53
53
  python-dateutil = "^2.9.0"
54
54
  types-python-dateutil = "^2.9.0.20240316"
55
55
  pandas = ">= 1.5.3"
56
56
  pandas-stubs = ">= 1.5.3"
57
- ruff = "^0.5.6"
57
+ ruff = "==0.11.5"
58
58
 
59
59
  [tool.pytest.ini_options]
60
60
  testpaths = [ "tests" ]
@@ -66,6 +66,26 @@ plugins = ["pydantic.mypy"]
66
66
  [tool.ruff]
67
67
  line-length = 120
68
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"]
69
89
 
70
90
  [build-system]
71
91
  requires = ["poetry-core"]
@@ -1,5 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ # isort: skip_file
4
+
3
5
  from .types import (
4
6
  AssetContentRequestOut,
5
7
  AssetNode,
@@ -11,6 +13,7 @@ from .types import (
11
13
  ChunkContentItem_Text,
12
14
  ChunkResult,
13
15
  ChunkResultChunkId,
16
+ Content,
14
17
  CustomAgentResponse,
15
18
  DataFrameRequestOut,
16
19
  DataFrameRequestOutColumnsItem,
@@ -26,15 +29,23 @@ from .types import (
26
29
  GeneralAgentConfigEnabledToolsItem,
27
30
  GeneralAgentRequest,
28
31
  GeneralAgentResponse,
32
+ GeneralAgentResponseMessage,
33
+ GeneralAgentResponseMessageKwargs,
34
+ Id,
29
35
  ImageUrlContent,
36
+ InputMessage,
37
+ InputMessageContentItem,
38
+ InputMessageContentItem_ImageUrl,
39
+ InputMessageContentItem_Text,
40
+ PaginatedAssetsOut,
30
41
  ParentFolderError,
31
42
  PromptMessage,
43
+ PublicAssetOut,
32
44
  ResearchAgentResponse,
33
45
  SaveAssetRequestOut,
34
46
  SqlAgentResponse,
35
47
  StructuredDataExtractorResponse,
36
48
  TextContent,
37
- Tool,
38
49
  Type,
39
50
  )
40
51
  from .errors import (
@@ -46,7 +57,7 @@ from .errors import (
46
57
  UnprocessableEntityError,
47
58
  UnsupportedMediaTypeError,
48
59
  )
49
- from . import agents, query, tools
60
+ from . import agents, assets, query, tools
50
61
  from .client import AsyncAthena, Athena
51
62
  from .environment import AthenaEnvironment
52
63
  from .query import QueryExecuteRequestDatabaseAssetIds
@@ -68,6 +79,7 @@ __all__ = [
68
79
  "ChunkContentItem_Text",
69
80
  "ChunkResult",
70
81
  "ChunkResultChunkId",
82
+ "Content",
71
83
  "ContentTooLargeError",
72
84
  "CustomAgentResponse",
73
85
  "DataFrameRequestOut",
@@ -84,18 +96,26 @@ __all__ = [
84
96
  "GeneralAgentConfigEnabledToolsItem",
85
97
  "GeneralAgentRequest",
86
98
  "GeneralAgentResponse",
99
+ "GeneralAgentResponseMessage",
100
+ "GeneralAgentResponseMessageKwargs",
101
+ "Id",
87
102
  "ImageUrlContent",
103
+ "InputMessage",
104
+ "InputMessageContentItem",
105
+ "InputMessageContentItem_ImageUrl",
106
+ "InputMessageContentItem_Text",
88
107
  "InternalServerError",
89
108
  "NotFoundError",
109
+ "PaginatedAssetsOut",
90
110
  "ParentFolderError",
91
111
  "PromptMessage",
112
+ "PublicAssetOut",
92
113
  "QueryExecuteRequestDatabaseAssetIds",
93
114
  "ResearchAgentResponse",
94
115
  "SaveAssetRequestOut",
95
116
  "SqlAgentResponse",
96
117
  "StructuredDataExtractorResponse",
97
118
  "TextContent",
98
- "Tool",
99
119
  "ToolsDataFrameRequestColumnsItem",
100
120
  "Type",
101
121
  "UnauthorizedError",
@@ -103,6 +123,7 @@ __all__ = [
103
123
  "UnsupportedMediaTypeError",
104
124
  "__version__",
105
125
  "agents",
126
+ "assets",
106
127
  "query",
107
128
  "tools",
108
129
  ]
@@ -1,5 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ # isort: skip_file
4
+
3
5
  from . import drive, general, research, sql
4
6
 
5
7
  __all__ = ["drive", "general", "research", "sql"]
@@ -0,0 +1,177 @@
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.custom_agent_response import CustomAgentResponse
8
+ from .drive.client import AsyncDriveClient, DriveClient
9
+ from .general.client import AsyncGeneralClient, GeneralClient
10
+ from .raw_client import AsyncRawAgentsClient, RawAgentsClient
11
+ from .research.client import AsyncResearchClient, ResearchClient
12
+ from .sql.client import AsyncSqlClient, SqlClient
13
+
14
+ # this is used as the default value for optional parameters
15
+ OMIT = typing.cast(typing.Any, ...)
16
+
17
+
18
+ class AgentsClient:
19
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
20
+ self._raw_client = RawAgentsClient(client_wrapper=client_wrapper)
21
+ self.drive = DriveClient(client_wrapper=client_wrapper)
22
+
23
+ self.general = GeneralClient(client_wrapper=client_wrapper)
24
+
25
+ self.research = ResearchClient(client_wrapper=client_wrapper)
26
+
27
+ self.sql = SqlClient(client_wrapper=client_wrapper)
28
+
29
+ @property
30
+ def with_raw_response(self) -> RawAgentsClient:
31
+ """
32
+ Retrieves a raw implementation of this client that returns raw responses.
33
+
34
+ Returns
35
+ -------
36
+ RawAgentsClient
37
+ """
38
+ return self._raw_client
39
+
40
+ def invoke_by_id(
41
+ self,
42
+ agent_id: str,
43
+ *,
44
+ config: typing.Dict[str, typing.Optional[typing.Any]],
45
+ messages: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
46
+ request_options: typing.Optional[RequestOptions] = None,
47
+ ) -> CustomAgentResponse:
48
+ """
49
+ Coming soon!
50
+
51
+ Invoke a custom agent created in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
52
+
53
+ Custom agents can be created and configured in spaces to perform specialized tasks.
54
+ Refer to the specific agent's documentation for details on configuration options
55
+ and expected responses.
56
+
57
+ Parameters
58
+ ----------
59
+ agent_id : str
60
+ The ID of the custom agent to invoke. Create custom agents in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
61
+
62
+ config : typing.Dict[str, typing.Optional[typing.Any]]
63
+ Configuration for the custom agent. See the agent's documentation for specific configuration options.
64
+
65
+ messages : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
66
+ The messages to send to the custom agent
67
+
68
+ request_options : typing.Optional[RequestOptions]
69
+ Request-specific configuration.
70
+
71
+ Returns
72
+ -------
73
+ CustomAgentResponse
74
+ Successful Response
75
+
76
+ Examples
77
+ --------
78
+ from athena import Athena
79
+
80
+ client = Athena(
81
+ api_key="YOUR_API_KEY",
82
+ )
83
+ client.agents.invoke_by_id(
84
+ agent_id="agent_id",
85
+ config={"key": "value"},
86
+ messages=[{"key": "value"}],
87
+ )
88
+ """
89
+ _response = self._raw_client.invoke_by_id(
90
+ agent_id, config=config, messages=messages, request_options=request_options
91
+ )
92
+ return _response.data
93
+
94
+
95
+ class AsyncAgentsClient:
96
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
97
+ self._raw_client = AsyncRawAgentsClient(client_wrapper=client_wrapper)
98
+ self.drive = AsyncDriveClient(client_wrapper=client_wrapper)
99
+
100
+ self.general = AsyncGeneralClient(client_wrapper=client_wrapper)
101
+
102
+ self.research = AsyncResearchClient(client_wrapper=client_wrapper)
103
+
104
+ self.sql = AsyncSqlClient(client_wrapper=client_wrapper)
105
+
106
+ @property
107
+ def with_raw_response(self) -> AsyncRawAgentsClient:
108
+ """
109
+ Retrieves a raw implementation of this client that returns raw responses.
110
+
111
+ Returns
112
+ -------
113
+ AsyncRawAgentsClient
114
+ """
115
+ return self._raw_client
116
+
117
+ async def invoke_by_id(
118
+ self,
119
+ agent_id: str,
120
+ *,
121
+ config: typing.Dict[str, typing.Optional[typing.Any]],
122
+ messages: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
123
+ request_options: typing.Optional[RequestOptions] = None,
124
+ ) -> CustomAgentResponse:
125
+ """
126
+ Coming soon!
127
+
128
+ Invoke a custom agent created in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
129
+
130
+ Custom agents can be created and configured in spaces to perform specialized tasks.
131
+ Refer to the specific agent's documentation for details on configuration options
132
+ and expected responses.
133
+
134
+ Parameters
135
+ ----------
136
+ agent_id : str
137
+ The ID of the custom agent to invoke. Create custom agents in [spaces](https://resources.athenaintel.com/docs/agents/create-your-agent).
138
+
139
+ config : typing.Dict[str, typing.Optional[typing.Any]]
140
+ Configuration for the custom agent. See the agent's documentation for specific configuration options.
141
+
142
+ messages : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
143
+ The messages to send to the custom agent
144
+
145
+ request_options : typing.Optional[RequestOptions]
146
+ Request-specific configuration.
147
+
148
+ Returns
149
+ -------
150
+ CustomAgentResponse
151
+ Successful Response
152
+
153
+ Examples
154
+ --------
155
+ import asyncio
156
+
157
+ from athena import AsyncAthena
158
+
159
+ client = AsyncAthena(
160
+ api_key="YOUR_API_KEY",
161
+ )
162
+
163
+
164
+ async def main() -> None:
165
+ await client.agents.invoke_by_id(
166
+ agent_id="agent_id",
167
+ config={"key": "value"},
168
+ messages=[{"key": "value"}],
169
+ )
170
+
171
+
172
+ asyncio.run(main())
173
+ """
174
+ _response = await self._raw_client.invoke_by_id(
175
+ agent_id, config=config, messages=messages, request_options=request_options
176
+ )
177
+ return _response.data
@@ -1,2 +1,4 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ # isort: skip_file
4
+
@@ -0,0 +1,133 @@
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.drive_agent_response import DriveAgentResponse
8
+ from .raw_client import AsyncRawDriveClient, RawDriveClient
9
+
10
+ # this is used as the default value for optional parameters
11
+ OMIT = typing.cast(typing.Any, ...)
12
+
13
+
14
+ class DriveClient:
15
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
16
+ self._raw_client = RawDriveClient(client_wrapper=client_wrapper)
17
+
18
+ @property
19
+ def with_raw_response(self) -> RawDriveClient:
20
+ """
21
+ Retrieves a raw implementation of this client that returns raw responses.
22
+
23
+ Returns
24
+ -------
25
+ RawDriveClient
26
+ """
27
+ return self._raw_client
28
+
29
+ def invoke(
30
+ self,
31
+ *,
32
+ config: typing.Dict[str, typing.Optional[typing.Any]],
33
+ messages: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
34
+ request_options: typing.Optional[RequestOptions] = None,
35
+ ) -> DriveAgentResponse:
36
+ """
37
+ Coming soon! Manage folders and search for files in the internal drive.
38
+
39
+ Parameters
40
+ ----------
41
+ config : typing.Dict[str, typing.Optional[typing.Any]]
42
+ Configuration for the drive agent including folder paths and search parameters
43
+
44
+ messages : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
45
+ The messages to send to the drive agent
46
+
47
+ request_options : typing.Optional[RequestOptions]
48
+ Request-specific configuration.
49
+
50
+ Returns
51
+ -------
52
+ DriveAgentResponse
53
+ Successful Response
54
+
55
+ Examples
56
+ --------
57
+ from athena import Athena
58
+
59
+ client = Athena(
60
+ api_key="YOUR_API_KEY",
61
+ )
62
+ client.agents.drive.invoke(
63
+ config={"key": "value"},
64
+ messages=[{"key": "value"}],
65
+ )
66
+ """
67
+ _response = self._raw_client.invoke(config=config, messages=messages, request_options=request_options)
68
+ return _response.data
69
+
70
+
71
+ class AsyncDriveClient:
72
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
73
+ self._raw_client = AsyncRawDriveClient(client_wrapper=client_wrapper)
74
+
75
+ @property
76
+ def with_raw_response(self) -> AsyncRawDriveClient:
77
+ """
78
+ Retrieves a raw implementation of this client that returns raw responses.
79
+
80
+ Returns
81
+ -------
82
+ AsyncRawDriveClient
83
+ """
84
+ return self._raw_client
85
+
86
+ async def invoke(
87
+ self,
88
+ *,
89
+ config: typing.Dict[str, typing.Optional[typing.Any]],
90
+ messages: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
91
+ request_options: typing.Optional[RequestOptions] = None,
92
+ ) -> DriveAgentResponse:
93
+ """
94
+ Coming soon! Manage folders and search for files in the internal drive.
95
+
96
+ Parameters
97
+ ----------
98
+ config : typing.Dict[str, typing.Optional[typing.Any]]
99
+ Configuration for the drive agent including folder paths and search parameters
100
+
101
+ messages : typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]]
102
+ The messages to send to the drive agent
103
+
104
+ request_options : typing.Optional[RequestOptions]
105
+ Request-specific configuration.
106
+
107
+ Returns
108
+ -------
109
+ DriveAgentResponse
110
+ Successful Response
111
+
112
+ Examples
113
+ --------
114
+ import asyncio
115
+
116
+ from athena import AsyncAthena
117
+
118
+ client = AsyncAthena(
119
+ api_key="YOUR_API_KEY",
120
+ )
121
+
122
+
123
+ async def main() -> None:
124
+ await client.agents.drive.invoke(
125
+ config={"key": "value"},
126
+ messages=[{"key": "value"}],
127
+ )
128
+
129
+
130
+ asyncio.run(main())
131
+ """
132
+ _response = await self._raw_client.invoke(config=config, messages=messages, request_options=request_options)
133
+ return _response.data
@@ -1,20 +1,21 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  import typing
4
- from ...core.client_wrapper import SyncClientWrapper
5
- from ...core.request_options import RequestOptions
6
- from ...types.drive_agent_response import DriveAgentResponse
7
- from ...core.pydantic_utilities import parse_obj_as
8
- from ...errors.unprocessable_entity_error import UnprocessableEntityError
9
4
  from json.decoder import JSONDecodeError
5
+
10
6
  from ...core.api_error import ApiError
11
- from ...core.client_wrapper import AsyncClientWrapper
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 ...errors.unprocessable_entity_error import UnprocessableEntityError
12
+ from ...types.drive_agent_response import DriveAgentResponse
12
13
 
13
14
  # this is used as the default value for optional parameters
14
15
  OMIT = typing.cast(typing.Any, ...)
15
16
 
16
17
 
17
- class DriveClient:
18
+ class RawDriveClient:
18
19
  def __init__(self, *, client_wrapper: SyncClientWrapper):
19
20
  self._client_wrapper = client_wrapper
20
21
 
@@ -24,7 +25,7 @@ class DriveClient:
24
25
  config: typing.Dict[str, typing.Optional[typing.Any]],
25
26
  messages: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
26
27
  request_options: typing.Optional[RequestOptions] = None,
27
- ) -> DriveAgentResponse:
28
+ ) -> HttpResponse[DriveAgentResponse]:
28
29
  """
29
30
  Coming soon! Manage folders and search for files in the internal drive.
30
31
 
@@ -41,20 +42,8 @@ class DriveClient:
41
42
 
42
43
  Returns
43
44
  -------
44
- DriveAgentResponse
45
+ HttpResponse[DriveAgentResponse]
45
46
  Successful Response
46
-
47
- Examples
48
- --------
49
- from athena import Athena
50
-
51
- client = Athena(
52
- api_key="YOUR_API_KEY",
53
- )
54
- client.agents.drive.invoke(
55
- config={"key": "value"},
56
- messages=[{"key": "value"}],
57
- )
58
47
  """
59
48
  _response = self._client_wrapper.httpx_client.request(
60
49
  "api/v0/agents/drive/invoke",
@@ -71,30 +60,32 @@ class DriveClient:
71
60
  )
72
61
  try:
73
62
  if 200 <= _response.status_code < 300:
74
- return typing.cast(
63
+ _data = typing.cast(
75
64
  DriveAgentResponse,
76
65
  parse_obj_as(
77
66
  type_=DriveAgentResponse, # type: ignore
78
67
  object_=_response.json(),
79
68
  ),
80
69
  )
70
+ return HttpResponse(response=_response, data=_data)
81
71
  if _response.status_code == 422:
82
72
  raise UnprocessableEntityError(
83
- typing.cast(
73
+ headers=dict(_response.headers),
74
+ body=typing.cast(
84
75
  typing.Optional[typing.Any],
85
76
  parse_obj_as(
86
77
  type_=typing.Optional[typing.Any], # type: ignore
87
78
  object_=_response.json(),
88
79
  ),
89
- )
80
+ ),
90
81
  )
91
82
  _response_json = _response.json()
92
83
  except JSONDecodeError:
93
- raise ApiError(status_code=_response.status_code, body=_response.text)
94
- raise ApiError(status_code=_response.status_code, body=_response_json)
84
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
85
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
95
86
 
96
87
 
97
- class AsyncDriveClient:
88
+ class AsyncRawDriveClient:
98
89
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
99
90
  self._client_wrapper = client_wrapper
100
91
 
@@ -104,7 +95,7 @@ class AsyncDriveClient:
104
95
  config: typing.Dict[str, typing.Optional[typing.Any]],
105
96
  messages: typing.Sequence[typing.Dict[str, typing.Optional[typing.Any]]],
106
97
  request_options: typing.Optional[RequestOptions] = None,
107
- ) -> DriveAgentResponse:
98
+ ) -> AsyncHttpResponse[DriveAgentResponse]:
108
99
  """
109
100
  Coming soon! Manage folders and search for files in the internal drive.
110
101
 
@@ -121,28 +112,8 @@ class AsyncDriveClient:
121
112
 
122
113
  Returns
123
114
  -------
124
- DriveAgentResponse
115
+ AsyncHttpResponse[DriveAgentResponse]
125
116
  Successful Response
126
-
127
- Examples
128
- --------
129
- import asyncio
130
-
131
- from athena import AsyncAthena
132
-
133
- client = AsyncAthena(
134
- api_key="YOUR_API_KEY",
135
- )
136
-
137
-
138
- async def main() -> None:
139
- await client.agents.drive.invoke(
140
- config={"key": "value"},
141
- messages=[{"key": "value"}],
142
- )
143
-
144
-
145
- asyncio.run(main())
146
117
  """
147
118
  _response = await self._client_wrapper.httpx_client.request(
148
119
  "api/v0/agents/drive/invoke",
@@ -159,24 +130,26 @@ class AsyncDriveClient:
159
130
  )
160
131
  try:
161
132
  if 200 <= _response.status_code < 300:
162
- return typing.cast(
133
+ _data = typing.cast(
163
134
  DriveAgentResponse,
164
135
  parse_obj_as(
165
136
  type_=DriveAgentResponse, # type: ignore
166
137
  object_=_response.json(),
167
138
  ),
168
139
  )
140
+ return AsyncHttpResponse(response=_response, data=_data)
169
141
  if _response.status_code == 422:
170
142
  raise UnprocessableEntityError(
171
- typing.cast(
143
+ headers=dict(_response.headers),
144
+ body=typing.cast(
172
145
  typing.Optional[typing.Any],
173
146
  parse_obj_as(
174
147
  type_=typing.Optional[typing.Any], # type: ignore
175
148
  object_=_response.json(),
176
149
  ),
177
- )
150
+ ),
178
151
  )
179
152
  _response_json = _response.json()
180
153
  except JSONDecodeError:
181
- raise ApiError(status_code=_response.status_code, body=_response.text)
182
- raise ApiError(status_code=_response.status_code, body=_response_json)
154
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
155
+ raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
@@ -1,2 +1,4 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ # isort: skip_file
4
+