athena-intelligence 0.1.126__tar.gz → 0.1.127__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 (89) hide show
  1. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/__init__.py +4 -0
  4. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/client_wrapper.py +1 -1
  5. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/client.py +381 -5
  6. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/__init__.py +4 -0
  7. athena_intelligence-0.1.127/src/athena/types/asset_content_request_out.py +26 -0
  8. athena_intelligence-0.1.127/src/athena/types/asset_screenshot_response_out.py +43 -0
  9. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/general_agent_config.py +1 -0
  10. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/README.md +0 -0
  11. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/__init__.py +0 -0
  12. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/client.py +0 -0
  13. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/drive/__init__.py +0 -0
  14. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/drive/client.py +0 -0
  15. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/general/__init__.py +0 -0
  16. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/general/client.py +0 -0
  17. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/research/__init__.py +0 -0
  18. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/research/client.py +0 -0
  19. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/sql/__init__.py +0 -0
  20. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/agents/sql/client.py +0 -0
  21. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/base_client.py +0 -0
  22. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/client.py +0 -0
  23. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/__init__.py +0 -0
  24. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/api_error.py +0 -0
  25. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/datetime_utils.py +0 -0
  26. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/file.py +0 -0
  27. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/http_client.py +0 -0
  28. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/jsonable_encoder.py +0 -0
  29. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/pydantic_utilities.py +0 -0
  30. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/query_encoder.py +0 -0
  31. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/remove_none_from_dict.py +0 -0
  32. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/request_options.py +0 -0
  33. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/core/serialization.py +0 -0
  34. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/environment.py +0 -0
  35. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/errors/__init__.py +0 -0
  36. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/errors/bad_request_error.py +0 -0
  37. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/errors/content_too_large_error.py +0 -0
  38. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/errors/internal_server_error.py +0 -0
  39. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/errors/not_found_error.py +0 -0
  40. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/errors/unauthorized_error.py +0 -0
  41. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/errors/unprocessable_entity_error.py +0 -0
  42. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/errors/unsupported_media_type_error.py +0 -0
  43. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/py.typed +0 -0
  44. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/query/__init__.py +0 -0
  45. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/query/client.py +0 -0
  46. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/query/types/__init__.py +0 -0
  47. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/query/types/query_execute_request_database_asset_ids.py +0 -0
  48. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/__init__.py +0 -0
  49. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/calendar/__init__.py +0 -0
  50. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/calendar/client.py +0 -0
  51. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/email/__init__.py +0 -0
  52. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/email/client.py +0 -0
  53. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/structured_data_extractor/__init__.py +0 -0
  54. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/structured_data_extractor/client.py +0 -0
  55. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/tasks/__init__.py +0 -0
  56. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/tasks/client.py +0 -0
  57. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/types/__init__.py +0 -0
  58. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/tools/types/tools_data_frame_request_columns_item.py +0 -0
  59. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/asset_node.py +0 -0
  60. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/asset_not_found_error.py +0 -0
  61. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/chunk.py +0 -0
  62. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/chunk_content_item.py +0 -0
  63. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/chunk_result.py +0 -0
  64. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/chunk_result_chunk_id.py +0 -0
  65. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/custom_agent_response.py +0 -0
  66. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/data_frame_request_out.py +0 -0
  67. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/data_frame_request_out_columns_item.py +0 -0
  68. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/data_frame_request_out_data_item_item.py +0 -0
  69. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/data_frame_request_out_index_item.py +0 -0
  70. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/data_frame_unknown_format_error.py +0 -0
  71. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/document_chunk.py +0 -0
  72. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/drive_agent_response.py +0 -0
  73. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/file_chunk_request_out.py +0 -0
  74. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/file_too_large_error.py +0 -0
  75. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/folder_response.py +0 -0
  76. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/general_agent_config_enabled_tools_item.py +0 -0
  77. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/general_agent_request.py +0 -0
  78. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/general_agent_response.py +0 -0
  79. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/image_url_content.py +0 -0
  80. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/parent_folder_error.py +0 -0
  81. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/prompt_message.py +0 -0
  82. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/research_agent_response.py +0 -0
  83. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/save_asset_request_out.py +0 -0
  84. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/sql_agent_response.py +0 -0
  85. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/structured_data_extractor_response.py +0 -0
  86. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/text_content.py +0 -0
  87. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/tool.py +0 -0
  88. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/types/type.py +0 -0
  89. {athena_intelligence-0.1.126 → athena_intelligence-0.1.127}/src/athena/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: athena-intelligence
3
- Version: 0.1.126
3
+ Version: 0.1.127
4
4
  Summary: Athena Intelligence Python Library
5
5
  Requires-Python: >=3.9,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -3,7 +3,7 @@ name = "athena-intelligence"
3
3
 
4
4
  [tool.poetry]
5
5
  name = "athena-intelligence"
6
- version = "0.1.126"
6
+ version = "0.1.127"
7
7
  description = "Athena Intelligence Python Library"
8
8
  readme = "README.md"
9
9
  authors = []
@@ -1,8 +1,10 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .types import (
4
+ AssetContentRequestOut,
4
5
  AssetNode,
5
6
  AssetNotFoundError,
7
+ AssetScreenshotResponseOut,
6
8
  Chunk,
7
9
  ChunkContentItem,
8
10
  ChunkContentItem_ImageUrl,
@@ -52,8 +54,10 @@ from .tools import ToolsDataFrameRequestColumnsItem
52
54
  from .version import __version__
53
55
 
54
56
  __all__ = [
57
+ "AssetContentRequestOut",
55
58
  "AssetNode",
56
59
  "AssetNotFoundError",
60
+ "AssetScreenshotResponseOut",
57
61
  "AsyncAthena",
58
62
  "Athena",
59
63
  "AthenaEnvironment",
@@ -16,7 +16,7 @@ class BaseClientWrapper:
16
16
  headers: typing.Dict[str, str] = {
17
17
  "X-Fern-Language": "Python",
18
18
  "X-Fern-SDK-Name": "athena-intelligence",
19
- "X-Fern-SDK-Version": "0.1.126",
19
+ "X-Fern-SDK-Version": "0.1.127",
20
20
  }
21
21
  headers["X-API-KEY"] = self.api_key
22
22
  return headers
@@ -15,6 +15,9 @@ from ..types.asset_not_found_error import AssetNotFoundError
15
15
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
16
16
  from json.decoder import JSONDecodeError
17
17
  from ..core.api_error import ApiError
18
+ from ..types.asset_content_request_out import AssetContentRequestOut
19
+ from ..types.asset_screenshot_response_out import AssetScreenshotResponseOut
20
+ from ..errors.internal_server_error import InternalServerError
18
21
  from ..types.folder_response import FolderResponse
19
22
  from ..errors.bad_request_error import BadRequestError
20
23
  from ..types.parent_folder_error import ParentFolderError
@@ -22,7 +25,6 @@ from .types.tools_data_frame_request_columns_item import ToolsDataFrameRequestCo
22
25
  from ..types.data_frame_request_out import DataFrameRequestOut
23
26
  from ..errors.unsupported_media_type_error import UnsupportedMediaTypeError
24
27
  from ..types.data_frame_unknown_format_error import DataFrameUnknownFormatError
25
- from ..errors.internal_server_error import InternalServerError
26
28
  from .. import core
27
29
  from ..types.save_asset_request_out import SaveAssetRequestOut
28
30
  from ..errors.content_too_large_error import ContentTooLargeError
@@ -134,6 +136,185 @@ class ToolsClient:
134
136
  raise ApiError(status_code=_response.status_code, body=_response.text)
135
137
  raise ApiError(status_code=_response.status_code, body=_response_json)
136
138
 
139
+ def get_asset_content(
140
+ self, *, asset_id: str, request_options: typing.Optional[RequestOptions] = None
141
+ ) -> AssetContentRequestOut:
142
+ """
143
+ Get the content of an asset.
144
+
145
+ Parameters
146
+ ----------
147
+ asset_id : str
148
+
149
+ request_options : typing.Optional[RequestOptions]
150
+ Request-specific configuration.
151
+
152
+ Returns
153
+ -------
154
+ AssetContentRequestOut
155
+ Successful Response
156
+
157
+ Examples
158
+ --------
159
+ from athena import Athena
160
+
161
+ client = Athena(
162
+ api_key="YOUR_API_KEY",
163
+ )
164
+ client.tools.get_asset_content(
165
+ asset_id="asset_id",
166
+ )
167
+ """
168
+ _response = self._client_wrapper.httpx_client.request(
169
+ "api/v0/tools/asset/content",
170
+ method="GET",
171
+ params={
172
+ "asset_id": asset_id,
173
+ },
174
+ request_options=request_options,
175
+ )
176
+ try:
177
+ if 200 <= _response.status_code < 300:
178
+ return typing.cast(
179
+ AssetContentRequestOut,
180
+ parse_obj_as(
181
+ type_=AssetContentRequestOut, # type: ignore
182
+ object_=_response.json(),
183
+ ),
184
+ )
185
+ if _response.status_code == 401:
186
+ raise UnauthorizedError(
187
+ typing.cast(
188
+ typing.Optional[typing.Any],
189
+ parse_obj_as(
190
+ type_=typing.Optional[typing.Any], # type: ignore
191
+ object_=_response.json(),
192
+ ),
193
+ )
194
+ )
195
+ if _response.status_code == 404:
196
+ raise NotFoundError(
197
+ typing.cast(
198
+ AssetNotFoundError,
199
+ parse_obj_as(
200
+ type_=AssetNotFoundError, # type: ignore
201
+ object_=_response.json(),
202
+ ),
203
+ )
204
+ )
205
+ if _response.status_code == 422:
206
+ raise UnprocessableEntityError(
207
+ typing.cast(
208
+ typing.Optional[typing.Any],
209
+ parse_obj_as(
210
+ type_=typing.Optional[typing.Any], # type: ignore
211
+ object_=_response.json(),
212
+ ),
213
+ )
214
+ )
215
+ _response_json = _response.json()
216
+ except JSONDecodeError:
217
+ raise ApiError(status_code=_response.status_code, body=_response.text)
218
+ raise ApiError(status_code=_response.status_code, body=_response_json)
219
+
220
+ def get_asset_screenshot(
221
+ self,
222
+ *,
223
+ asset_id: str,
224
+ page_number: typing.Optional[int] = None,
225
+ request_options: typing.Optional[RequestOptions] = None,
226
+ ) -> AssetScreenshotResponseOut:
227
+ """
228
+ Get a screenshot of a specific page from an asset.
229
+
230
+ Parameters
231
+ ----------
232
+ asset_id : str
233
+
234
+ page_number : typing.Optional[int]
235
+
236
+ request_options : typing.Optional[RequestOptions]
237
+ Request-specific configuration.
238
+
239
+ Returns
240
+ -------
241
+ AssetScreenshotResponseOut
242
+ Successful Response
243
+
244
+ Examples
245
+ --------
246
+ from athena import Athena
247
+
248
+ client = Athena(
249
+ api_key="YOUR_API_KEY",
250
+ )
251
+ client.tools.get_asset_screenshot(
252
+ asset_id="asset_id",
253
+ )
254
+ """
255
+ _response = self._client_wrapper.httpx_client.request(
256
+ "api/v0/tools/asset/screenshot",
257
+ method="GET",
258
+ params={
259
+ "asset_id": asset_id,
260
+ "page_number": page_number,
261
+ },
262
+ request_options=request_options,
263
+ )
264
+ try:
265
+ if 200 <= _response.status_code < 300:
266
+ return typing.cast(
267
+ AssetScreenshotResponseOut,
268
+ parse_obj_as(
269
+ type_=AssetScreenshotResponseOut, # type: ignore
270
+ object_=_response.json(),
271
+ ),
272
+ )
273
+ if _response.status_code == 401:
274
+ raise UnauthorizedError(
275
+ typing.cast(
276
+ typing.Optional[typing.Any],
277
+ parse_obj_as(
278
+ type_=typing.Optional[typing.Any], # type: ignore
279
+ object_=_response.json(),
280
+ ),
281
+ )
282
+ )
283
+ if _response.status_code == 404:
284
+ raise NotFoundError(
285
+ typing.cast(
286
+ AssetNotFoundError,
287
+ parse_obj_as(
288
+ type_=AssetNotFoundError, # type: ignore
289
+ object_=_response.json(),
290
+ ),
291
+ )
292
+ )
293
+ if _response.status_code == 422:
294
+ raise UnprocessableEntityError(
295
+ typing.cast(
296
+ typing.Optional[typing.Any],
297
+ parse_obj_as(
298
+ type_=typing.Optional[typing.Any], # type: ignore
299
+ object_=_response.json(),
300
+ ),
301
+ )
302
+ )
303
+ if _response.status_code == 500:
304
+ raise InternalServerError(
305
+ typing.cast(
306
+ typing.Optional[typing.Any],
307
+ parse_obj_as(
308
+ type_=typing.Optional[typing.Any], # type: ignore
309
+ object_=_response.json(),
310
+ ),
311
+ )
312
+ )
313
+ _response_json = _response.json()
314
+ except JSONDecodeError:
315
+ raise ApiError(status_code=_response.status_code, body=_response.text)
316
+ raise ApiError(status_code=_response.status_code, body=_response_json)
317
+
137
318
  def list_contents(
138
319
  self,
139
320
  *,
@@ -243,7 +424,7 @@ class ToolsClient:
243
424
  columns: typing.Optional[
244
425
  typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]
245
426
  ] = None,
246
- sheet_name: typing.Optional[int] = None,
427
+ sheet_name: typing.Optional[str] = None,
247
428
  separator: typing.Optional[str] = None,
248
429
  request_options: typing.Optional[RequestOptions] = None,
249
430
  ) -> DataFrameRequestOut:
@@ -259,7 +440,7 @@ class ToolsClient:
259
440
  columns : typing.Optional[typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]]
260
441
  should be a list of strings or a list of integers
261
442
 
262
- sheet_name : typing.Optional[int]
443
+ sheet_name : typing.Optional[str]
263
444
  only for excel files
264
445
 
265
446
  separator : typing.Optional[str]
@@ -635,6 +816,201 @@ class AsyncToolsClient:
635
816
  raise ApiError(status_code=_response.status_code, body=_response.text)
636
817
  raise ApiError(status_code=_response.status_code, body=_response_json)
637
818
 
819
+ async def get_asset_content(
820
+ self, *, asset_id: str, request_options: typing.Optional[RequestOptions] = None
821
+ ) -> AssetContentRequestOut:
822
+ """
823
+ Get the content of an asset.
824
+
825
+ Parameters
826
+ ----------
827
+ asset_id : str
828
+
829
+ request_options : typing.Optional[RequestOptions]
830
+ Request-specific configuration.
831
+
832
+ Returns
833
+ -------
834
+ AssetContentRequestOut
835
+ Successful Response
836
+
837
+ Examples
838
+ --------
839
+ import asyncio
840
+
841
+ from athena import AsyncAthena
842
+
843
+ client = AsyncAthena(
844
+ api_key="YOUR_API_KEY",
845
+ )
846
+
847
+
848
+ async def main() -> None:
849
+ await client.tools.get_asset_content(
850
+ asset_id="asset_id",
851
+ )
852
+
853
+
854
+ asyncio.run(main())
855
+ """
856
+ _response = await self._client_wrapper.httpx_client.request(
857
+ "api/v0/tools/asset/content",
858
+ method="GET",
859
+ params={
860
+ "asset_id": asset_id,
861
+ },
862
+ request_options=request_options,
863
+ )
864
+ try:
865
+ if 200 <= _response.status_code < 300:
866
+ return typing.cast(
867
+ AssetContentRequestOut,
868
+ parse_obj_as(
869
+ type_=AssetContentRequestOut, # type: ignore
870
+ object_=_response.json(),
871
+ ),
872
+ )
873
+ if _response.status_code == 401:
874
+ raise UnauthorizedError(
875
+ typing.cast(
876
+ typing.Optional[typing.Any],
877
+ parse_obj_as(
878
+ type_=typing.Optional[typing.Any], # type: ignore
879
+ object_=_response.json(),
880
+ ),
881
+ )
882
+ )
883
+ if _response.status_code == 404:
884
+ raise NotFoundError(
885
+ typing.cast(
886
+ AssetNotFoundError,
887
+ parse_obj_as(
888
+ type_=AssetNotFoundError, # type: ignore
889
+ object_=_response.json(),
890
+ ),
891
+ )
892
+ )
893
+ if _response.status_code == 422:
894
+ raise UnprocessableEntityError(
895
+ typing.cast(
896
+ typing.Optional[typing.Any],
897
+ parse_obj_as(
898
+ type_=typing.Optional[typing.Any], # type: ignore
899
+ object_=_response.json(),
900
+ ),
901
+ )
902
+ )
903
+ _response_json = _response.json()
904
+ except JSONDecodeError:
905
+ raise ApiError(status_code=_response.status_code, body=_response.text)
906
+ raise ApiError(status_code=_response.status_code, body=_response_json)
907
+
908
+ async def get_asset_screenshot(
909
+ self,
910
+ *,
911
+ asset_id: str,
912
+ page_number: typing.Optional[int] = None,
913
+ request_options: typing.Optional[RequestOptions] = None,
914
+ ) -> AssetScreenshotResponseOut:
915
+ """
916
+ Get a screenshot of a specific page from an asset.
917
+
918
+ Parameters
919
+ ----------
920
+ asset_id : str
921
+
922
+ page_number : typing.Optional[int]
923
+
924
+ request_options : typing.Optional[RequestOptions]
925
+ Request-specific configuration.
926
+
927
+ Returns
928
+ -------
929
+ AssetScreenshotResponseOut
930
+ Successful Response
931
+
932
+ Examples
933
+ --------
934
+ import asyncio
935
+
936
+ from athena import AsyncAthena
937
+
938
+ client = AsyncAthena(
939
+ api_key="YOUR_API_KEY",
940
+ )
941
+
942
+
943
+ async def main() -> None:
944
+ await client.tools.get_asset_screenshot(
945
+ asset_id="asset_id",
946
+ )
947
+
948
+
949
+ asyncio.run(main())
950
+ """
951
+ _response = await self._client_wrapper.httpx_client.request(
952
+ "api/v0/tools/asset/screenshot",
953
+ method="GET",
954
+ params={
955
+ "asset_id": asset_id,
956
+ "page_number": page_number,
957
+ },
958
+ request_options=request_options,
959
+ )
960
+ try:
961
+ if 200 <= _response.status_code < 300:
962
+ return typing.cast(
963
+ AssetScreenshotResponseOut,
964
+ parse_obj_as(
965
+ type_=AssetScreenshotResponseOut, # type: ignore
966
+ object_=_response.json(),
967
+ ),
968
+ )
969
+ if _response.status_code == 401:
970
+ raise UnauthorizedError(
971
+ typing.cast(
972
+ typing.Optional[typing.Any],
973
+ parse_obj_as(
974
+ type_=typing.Optional[typing.Any], # type: ignore
975
+ object_=_response.json(),
976
+ ),
977
+ )
978
+ )
979
+ if _response.status_code == 404:
980
+ raise NotFoundError(
981
+ typing.cast(
982
+ AssetNotFoundError,
983
+ parse_obj_as(
984
+ type_=AssetNotFoundError, # type: ignore
985
+ object_=_response.json(),
986
+ ),
987
+ )
988
+ )
989
+ if _response.status_code == 422:
990
+ raise UnprocessableEntityError(
991
+ typing.cast(
992
+ typing.Optional[typing.Any],
993
+ parse_obj_as(
994
+ type_=typing.Optional[typing.Any], # type: ignore
995
+ object_=_response.json(),
996
+ ),
997
+ )
998
+ )
999
+ if _response.status_code == 500:
1000
+ raise InternalServerError(
1001
+ typing.cast(
1002
+ typing.Optional[typing.Any],
1003
+ parse_obj_as(
1004
+ type_=typing.Optional[typing.Any], # type: ignore
1005
+ object_=_response.json(),
1006
+ ),
1007
+ )
1008
+ )
1009
+ _response_json = _response.json()
1010
+ except JSONDecodeError:
1011
+ raise ApiError(status_code=_response.status_code, body=_response.text)
1012
+ raise ApiError(status_code=_response.status_code, body=_response_json)
1013
+
638
1014
  async def list_contents(
639
1015
  self,
640
1016
  *,
@@ -752,7 +1128,7 @@ class AsyncToolsClient:
752
1128
  columns: typing.Optional[
753
1129
  typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]
754
1130
  ] = None,
755
- sheet_name: typing.Optional[int] = None,
1131
+ sheet_name: typing.Optional[str] = None,
756
1132
  separator: typing.Optional[str] = None,
757
1133
  request_options: typing.Optional[RequestOptions] = None,
758
1134
  ) -> DataFrameRequestOut:
@@ -768,7 +1144,7 @@ class AsyncToolsClient:
768
1144
  columns : typing.Optional[typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]]
769
1145
  should be a list of strings or a list of integers
770
1146
 
771
- sheet_name : typing.Optional[int]
1147
+ sheet_name : typing.Optional[str]
772
1148
  only for excel files
773
1149
 
774
1150
  separator : typing.Optional[str]
@@ -1,7 +1,9 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from .asset_content_request_out import AssetContentRequestOut
3
4
  from .asset_node import AssetNode
4
5
  from .asset_not_found_error import AssetNotFoundError
6
+ from .asset_screenshot_response_out import AssetScreenshotResponseOut
5
7
  from .chunk import Chunk
6
8
  from .chunk_content_item import ChunkContentItem, ChunkContentItem_ImageUrl, ChunkContentItem_Text
7
9
  from .chunk_result import ChunkResult
@@ -33,8 +35,10 @@ from .tool import Tool
33
35
  from .type import Type
34
36
 
35
37
  __all__ = [
38
+ "AssetContentRequestOut",
36
39
  "AssetNode",
37
40
  "AssetNotFoundError",
41
+ "AssetScreenshotResponseOut",
38
42
  "Chunk",
39
43
  "ChunkContentItem",
40
44
  "ChunkContentItem_ImageUrl",
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import pydantic
5
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import typing
7
+
8
+
9
+ class AssetContentRequestOut(UniversalBaseModel):
10
+ """
11
+ Response model with asset content.
12
+ """
13
+
14
+ content: str = pydantic.Field()
15
+ """
16
+ The content of the asset
17
+ """
18
+
19
+ if IS_PYDANTIC_V2:
20
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -0,0 +1,43 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing_extensions
5
+ from ..core.serialization import FieldMetadata
6
+ import pydantic
7
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
8
+ import typing
9
+
10
+
11
+ class AssetScreenshotResponseOut(UniversalBaseModel):
12
+ """
13
+ Response model with screenshot data.
14
+ """
15
+
16
+ base_64_image: typing_extensions.Annotated[str, FieldMetadata(alias="base64_image")] = pydantic.Field()
17
+ """
18
+ Base64-encoded image data
19
+ """
20
+
21
+ message: str = pydantic.Field()
22
+ """
23
+ Status message
24
+ """
25
+
26
+ page_number: int = pydantic.Field()
27
+ """
28
+ The page number that was captured
29
+ """
30
+
31
+ total_pages: int = pydantic.Field()
32
+ """
33
+ Total number of pages in the document
34
+ """
35
+
36
+ if IS_PYDANTIC_V2:
37
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
38
+ else:
39
+
40
+ class Config:
41
+ frozen = True
42
+ smart_union = True
43
+ extra = pydantic.Extra.allow
@@ -14,6 +14,7 @@ class GeneralAgentConfig(UniversalBaseModel):
14
14
 
15
15
  enabled_tools: typing.Optional[typing.List[GeneralAgentConfigEnabledToolsItem]] = None
16
16
  knowledge_base_asset_ids: typing.Optional[typing.List[str]] = None
17
+ model: typing.Optional[str] = None
17
18
  system_prompt: typing.Optional[str] = None
18
19
 
19
20
  if IS_PYDANTIC_V2: