athena-intelligence 0.1.80__tar.gz → 0.1.82__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.80 → athena_intelligence-0.1.82}/PKG-INFO +2 -1
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/pyproject.toml +2 -1
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/__init__.py +4 -1
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/chain/client.py +4 -2
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/client_wrapper.py +1 -1
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/errors/__init__.py +2 -1
- athena_intelligence-0.1.82/src/athena/errors/unsupported_media_type_error.py +9 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/tools/client.py +56 -34
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/__init__.py +2 -0
- athena_intelligence-0.1.82/src/athena/types/data_frame_unknown_format_error.py +27 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/README.md +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/base_client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/chain/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/api_error.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/datetime_utils.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/file.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/http_client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/jsonable_encoder.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/pydantic_utilities.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/remove_none_from_dict.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/request_options.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/dataset/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/dataset/client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/environment.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/errors/internal_server_error.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/errors/not_found_error.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/errors/unprocessable_entity_error.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/message/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/message/client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/polling_message_client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/py.typed +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/query/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/query/client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/report/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/report/client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/search/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/search/client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/snippet/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/snippet/client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/tools/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/tools/types/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/tools/types/tools_data_frame_request_columns_item.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/convert_pdf_to_sheet_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/data_frame_parsing_error.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/data_frame_request_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/data_frame_request_out_columns_item.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/data_frame_request_out_data_item_item.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/data_frame_request_out_index_item.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/dataset.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/document.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/excecute_tool_first_workflow_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/file_data_response.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/file_fetch_error.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/filter_model.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/filter_operator.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/firecrawl_scrape_url_data_reponse_dto.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/firecrawl_scrape_url_metadata.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/get_datasets_response.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/get_snippet_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/get_snippets_response.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/http_validation_error.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/langchain_documents_request_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/llm_model.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/map_reduce_chain_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/message_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/message_out_dto.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/model.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/publish_formats.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/query_model.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/report.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/researcher_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/semantic_query_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/snippet.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/sql_results.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/status_enum.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/structured_parse_result.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/time_dimension_model.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/tools.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/upload_documents_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/url_result.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/validation_error.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/validation_error_loc_item.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/workflow_status_out.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/upload/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/upload/client.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/version.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/workflow/__init__.py +0 -0
- {athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/workflow/client.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: athena-intelligence
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.82
|
4
4
|
Summary:
|
5
5
|
Requires-Python: >=3.8,<4.0
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
@@ -10,6 +10,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.11
|
11
11
|
Requires-Dist: httpx (>=0.21.2)
|
12
12
|
Requires-Dist: pydantic (>=1.9.2)
|
13
|
+
Requires-Dist: python-magic (==0.4.27)
|
13
14
|
Requires-Dist: typing_extensions (>=4.0.0)
|
14
15
|
Description-Content-Type: text/markdown
|
15
16
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "athena-intelligence"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.82"
|
4
4
|
description = ""
|
5
5
|
readme = "README.md"
|
6
6
|
authors = []
|
@@ -12,6 +12,7 @@ packages = [
|
|
12
12
|
python = "^3.8"
|
13
13
|
httpx = ">=0.21.2"
|
14
14
|
pydantic = ">= 1.9.2"
|
15
|
+
python-magic = "0.4.27"
|
15
16
|
typing_extensions = ">= 4.0.0"
|
16
17
|
|
17
18
|
[tool.poetry.dev-dependencies]
|
@@ -7,6 +7,7 @@ from .types import (
|
|
7
7
|
DataFrameRequestOutColumnsItem,
|
8
8
|
DataFrameRequestOutDataItemItem,
|
9
9
|
DataFrameRequestOutIndexItem,
|
10
|
+
DataFrameUnknownFormatError,
|
10
11
|
Dataset,
|
11
12
|
Document,
|
12
13
|
ExcecuteToolFirstWorkflowOut,
|
@@ -43,7 +44,7 @@ from .types import (
|
|
43
44
|
ValidationErrorLocItem,
|
44
45
|
WorkflowStatusOut,
|
45
46
|
)
|
46
|
-
from .errors import InternalServerError, NotFoundError, UnprocessableEntityError
|
47
|
+
from .errors import InternalServerError, NotFoundError, UnprocessableEntityError, UnsupportedMediaTypeError
|
47
48
|
from . import chain, dataset, message, query, report, search, snippet, tools, upload, workflow
|
48
49
|
from .environment import AthenaEnvironment
|
49
50
|
from .tools import ToolsDataFrameRequestColumnsItem
|
@@ -57,6 +58,7 @@ __all__ = [
|
|
57
58
|
"DataFrameRequestOutColumnsItem",
|
58
59
|
"DataFrameRequestOutDataItemItem",
|
59
60
|
"DataFrameRequestOutIndexItem",
|
61
|
+
"DataFrameUnknownFormatError",
|
60
62
|
"Dataset",
|
61
63
|
"Document",
|
62
64
|
"ExcecuteToolFirstWorkflowOut",
|
@@ -91,6 +93,7 @@ __all__ = [
|
|
91
93
|
"Tools",
|
92
94
|
"ToolsDataFrameRequestColumnsItem",
|
93
95
|
"UnprocessableEntityError",
|
96
|
+
"UnsupportedMediaTypeError",
|
94
97
|
"UploadDocumentsOut",
|
95
98
|
"UrlResult",
|
96
99
|
"ValidationError",
|
@@ -51,7 +51,7 @@ class ChainClient:
|
|
51
51
|
)
|
52
52
|
client.chain.structured_parse(
|
53
53
|
text_input='Athena is an AI-native analytics platform and artificial employee built to accelerate analytics workflows\n by offering enterprise teams co-pilot and auto-pilot modes. Athena learns your workflow as a co-pilot,\n allowing you to hand over controls to her for autonomous execution with confidence."\n\n Give me all of the modes Athena provides.',
|
54
|
-
custom_type_dict={
|
54
|
+
custom_type_dict={},
|
55
55
|
model=LlmModel.GPT_4_TURBO,
|
56
56
|
)
|
57
57
|
"""
|
@@ -127,6 +127,7 @@ class ChainClient:
|
|
127
127
|
documents=[
|
128
128
|
Document(
|
129
129
|
page_content="Athena is an AI-native analytics platform and artificial employee built to accelerate analytics workflows by offering enterprise teams co-pilot and auto-pilot modes. Athena learns your workflow as a co-pilot, allowing you to hand over controls to her for autonomous execution with confidence.",
|
130
|
+
metadata={"key": "value"},
|
130
131
|
)
|
131
132
|
],
|
132
133
|
model=LlmModel.MISTRAL_LARGE_0224,
|
@@ -220,7 +221,7 @@ class AsyncChainClient:
|
|
220
221
|
)
|
221
222
|
await client.chain.structured_parse(
|
222
223
|
text_input='Athena is an AI-native analytics platform and artificial employee built to accelerate analytics workflows\n by offering enterprise teams co-pilot and auto-pilot modes. Athena learns your workflow as a co-pilot,\n allowing you to hand over controls to her for autonomous execution with confidence."\n\n Give me all of the modes Athena provides.',
|
223
|
-
custom_type_dict={
|
224
|
+
custom_type_dict={},
|
224
225
|
model=LlmModel.GPT_4_TURBO,
|
225
226
|
)
|
226
227
|
"""
|
@@ -296,6 +297,7 @@ class AsyncChainClient:
|
|
296
297
|
documents=[
|
297
298
|
Document(
|
298
299
|
page_content="Athena is an AI-native analytics platform and artificial employee built to accelerate analytics workflows by offering enterprise teams co-pilot and auto-pilot modes. Athena learns your workflow as a co-pilot, allowing you to hand over controls to her for autonomous execution with confidence.",
|
300
|
+
metadata={"key": "value"},
|
299
301
|
)
|
300
302
|
],
|
301
303
|
model=LlmModel.MISTRAL_LARGE_0224,
|
@@ -17,7 +17,7 @@ class BaseClientWrapper:
|
|
17
17
|
headers: typing.Dict[str, str] = {
|
18
18
|
"X-Fern-Language": "Python",
|
19
19
|
"X-Fern-SDK-Name": "athena-intelligence",
|
20
|
-
"X-Fern-SDK-Version": "0.1.
|
20
|
+
"X-Fern-SDK-Version": "0.1.82",
|
21
21
|
}
|
22
22
|
headers["X-API-KEY"] = self.api_key
|
23
23
|
return headers
|
@@ -3,5 +3,6 @@
|
|
3
3
|
from .internal_server_error import InternalServerError
|
4
4
|
from .not_found_error import NotFoundError
|
5
5
|
from .unprocessable_entity_error import UnprocessableEntityError
|
6
|
+
from .unsupported_media_type_error import UnsupportedMediaTypeError
|
6
7
|
|
7
|
-
__all__ = ["InternalServerError", "NotFoundError", "UnprocessableEntityError"]
|
8
|
+
__all__ = ["InternalServerError", "NotFoundError", "UnprocessableEntityError", "UnsupportedMediaTypeError"]
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
from ..core.api_error import ApiError
|
4
|
+
from ..types.data_frame_unknown_format_error import DataFrameUnknownFormatError
|
5
|
+
|
6
|
+
|
7
|
+
class UnsupportedMediaTypeError(ApiError):
|
8
|
+
def __init__(self, body: DataFrameUnknownFormatError):
|
9
|
+
super().__init__(status_code=415, body=body)
|
@@ -13,9 +13,11 @@ from ..core.request_options import RequestOptions
|
|
13
13
|
from ..errors.internal_server_error import InternalServerError
|
14
14
|
from ..errors.not_found_error import NotFoundError
|
15
15
|
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
16
|
+
from ..errors.unsupported_media_type_error import UnsupportedMediaTypeError
|
16
17
|
from ..types.convert_pdf_to_sheet_out import ConvertPdfToSheetOut
|
17
18
|
from ..types.data_frame_parsing_error import DataFrameParsingError
|
18
19
|
from ..types.data_frame_request_out import DataFrameRequestOut
|
20
|
+
from ..types.data_frame_unknown_format_error import DataFrameUnknownFormatError
|
19
21
|
from ..types.excecute_tool_first_workflow_out import ExcecuteToolFirstWorkflowOut
|
20
22
|
from ..types.file_fetch_error import FileFetchError
|
21
23
|
from ..types.firecrawl_scrape_url_data_reponse_dto import FirecrawlScrapeUrlDataReponseDto
|
@@ -58,6 +60,7 @@ class ToolsClient:
|
|
58
60
|
)
|
59
61
|
client.tools.scrape_url(
|
60
62
|
url="https://www.athenaintelligence.ai",
|
63
|
+
params={"key": "value"},
|
61
64
|
)
|
62
65
|
"""
|
63
66
|
_request: typing.Dict[str, typing.Any] = {"url": url}
|
@@ -251,6 +254,10 @@ class ToolsClient:
|
|
251
254
|
return pydantic_v1.parse_obj_as(DataFrameRequestOut, _response.json()) # type: ignore
|
252
255
|
if _response.status_code == 404:
|
253
256
|
raise NotFoundError(pydantic_v1.parse_obj_as(FileFetchError, _response.json())) # type: ignore
|
257
|
+
if _response.status_code == 415:
|
258
|
+
raise UnsupportedMediaTypeError(
|
259
|
+
pydantic_v1.parse_obj_as(DataFrameUnknownFormatError, _response.json()) # type: ignore
|
260
|
+
)
|
254
261
|
if _response.status_code == 422:
|
255
262
|
raise UnprocessableEntityError(
|
256
263
|
pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
|
@@ -263,7 +270,9 @@ class ToolsClient:
|
|
263
270
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
264
271
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
265
272
|
|
266
|
-
def raw_data(
|
273
|
+
def raw_data(
|
274
|
+
self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
|
275
|
+
) -> typing.Iterator[bytes]:
|
267
276
|
"""
|
268
277
|
Parameters:
|
269
278
|
- document_id: str.
|
@@ -276,10 +285,10 @@ class ToolsClient:
|
|
276
285
|
api_key="YOUR_API_KEY",
|
277
286
|
)
|
278
287
|
client.tools.raw_data(
|
279
|
-
document_id="
|
288
|
+
document_id="string",
|
280
289
|
)
|
281
290
|
"""
|
282
|
-
|
291
|
+
with self._client_wrapper.httpx_client.stream(
|
283
292
|
method="GET",
|
284
293
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/raw-data"),
|
285
294
|
params=jsonable_encoder(
|
@@ -307,20 +316,23 @@ class ToolsClient:
|
|
307
316
|
else self._client_wrapper.get_timeout(),
|
308
317
|
retries=0,
|
309
318
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
310
|
-
)
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
pydantic_v1.parse_obj_as(
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
319
|
+
) as _response:
|
320
|
+
if 200 <= _response.status_code < 300:
|
321
|
+
for _chunk in _response.iter_bytes():
|
322
|
+
yield _chunk
|
323
|
+
return
|
324
|
+
_response.read()
|
325
|
+
if _response.status_code == 404:
|
326
|
+
raise NotFoundError(pydantic_v1.parse_obj_as(FileFetchError, _response.json())) # type: ignore
|
327
|
+
if _response.status_code == 422:
|
328
|
+
raise UnprocessableEntityError(
|
329
|
+
pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
|
330
|
+
)
|
331
|
+
try:
|
332
|
+
_response_json = _response.json()
|
333
|
+
except JSONDecodeError:
|
334
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
335
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
324
336
|
|
325
337
|
def tool_first_workflow(
|
326
338
|
self,
|
@@ -664,6 +676,7 @@ class AsyncToolsClient:
|
|
664
676
|
)
|
665
677
|
await client.tools.scrape_url(
|
666
678
|
url="https://www.athenaintelligence.ai",
|
679
|
+
params={"key": "value"},
|
667
680
|
)
|
668
681
|
"""
|
669
682
|
_request: typing.Dict[str, typing.Any] = {"url": url}
|
@@ -857,6 +870,10 @@ class AsyncToolsClient:
|
|
857
870
|
return pydantic_v1.parse_obj_as(DataFrameRequestOut, _response.json()) # type: ignore
|
858
871
|
if _response.status_code == 404:
|
859
872
|
raise NotFoundError(pydantic_v1.parse_obj_as(FileFetchError, _response.json())) # type: ignore
|
873
|
+
if _response.status_code == 415:
|
874
|
+
raise UnsupportedMediaTypeError(
|
875
|
+
pydantic_v1.parse_obj_as(DataFrameUnknownFormatError, _response.json()) # type: ignore
|
876
|
+
)
|
860
877
|
if _response.status_code == 422:
|
861
878
|
raise UnprocessableEntityError(
|
862
879
|
pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
|
@@ -869,7 +886,9 @@ class AsyncToolsClient:
|
|
869
886
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
870
887
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
871
888
|
|
872
|
-
async def raw_data(
|
889
|
+
async def raw_data(
|
890
|
+
self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
|
891
|
+
) -> typing.AsyncIterator[bytes]:
|
873
892
|
"""
|
874
893
|
Parameters:
|
875
894
|
- document_id: str.
|
@@ -882,10 +901,10 @@ class AsyncToolsClient:
|
|
882
901
|
api_key="YOUR_API_KEY",
|
883
902
|
)
|
884
903
|
await client.tools.raw_data(
|
885
|
-
document_id="
|
904
|
+
document_id="string",
|
886
905
|
)
|
887
906
|
"""
|
888
|
-
|
907
|
+
async with self._client_wrapper.httpx_client.stream(
|
889
908
|
method="GET",
|
890
909
|
url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/raw-data"),
|
891
910
|
params=jsonable_encoder(
|
@@ -913,20 +932,23 @@ class AsyncToolsClient:
|
|
913
932
|
else self._client_wrapper.get_timeout(),
|
914
933
|
retries=0,
|
915
934
|
max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
|
916
|
-
)
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
pydantic_v1.parse_obj_as(
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
935
|
+
) as _response:
|
936
|
+
if 200 <= _response.status_code < 300:
|
937
|
+
async for _chunk in _response.aiter_bytes():
|
938
|
+
yield _chunk
|
939
|
+
return
|
940
|
+
await _response.aread()
|
941
|
+
if _response.status_code == 404:
|
942
|
+
raise NotFoundError(pydantic_v1.parse_obj_as(FileFetchError, _response.json())) # type: ignore
|
943
|
+
if _response.status_code == 422:
|
944
|
+
raise UnprocessableEntityError(
|
945
|
+
pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
|
946
|
+
)
|
947
|
+
try:
|
948
|
+
_response_json = _response.json()
|
949
|
+
except JSONDecodeError:
|
950
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
951
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
930
952
|
|
931
953
|
async def tool_first_workflow(
|
932
954
|
self,
|
@@ -6,6 +6,7 @@ from .data_frame_request_out import DataFrameRequestOut
|
|
6
6
|
from .data_frame_request_out_columns_item import DataFrameRequestOutColumnsItem
|
7
7
|
from .data_frame_request_out_data_item_item import DataFrameRequestOutDataItemItem
|
8
8
|
from .data_frame_request_out_index_item import DataFrameRequestOutIndexItem
|
9
|
+
from .data_frame_unknown_format_error import DataFrameUnknownFormatError
|
9
10
|
from .dataset import Dataset
|
10
11
|
from .document import Document
|
11
12
|
from .excecute_tool_first_workflow_out import ExcecuteToolFirstWorkflowOut
|
@@ -49,6 +50,7 @@ __all__ = [
|
|
49
50
|
"DataFrameRequestOutColumnsItem",
|
50
51
|
"DataFrameRequestOutDataItemItem",
|
51
52
|
"DataFrameRequestOutIndexItem",
|
53
|
+
"DataFrameUnknownFormatError",
|
52
54
|
"Dataset",
|
53
55
|
"Document",
|
54
56
|
"ExcecuteToolFirstWorkflowOut",
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
2
|
+
|
3
|
+
import datetime as dt
|
4
|
+
import typing
|
5
|
+
|
6
|
+
from ..core.datetime_utils import serialize_datetime
|
7
|
+
from ..core.pydantic_utilities import pydantic_v1
|
8
|
+
|
9
|
+
|
10
|
+
class DataFrameUnknownFormatError(pydantic_v1.BaseModel):
|
11
|
+
message: str
|
12
|
+
document_id: str
|
13
|
+
media_type: str
|
14
|
+
|
15
|
+
def json(self, **kwargs: typing.Any) -> str:
|
16
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
17
|
+
return super().json(**kwargs_with_defaults)
|
18
|
+
|
19
|
+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
20
|
+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
21
|
+
return super().dict(**kwargs_with_defaults)
|
22
|
+
|
23
|
+
class Config:
|
24
|
+
frozen = True
|
25
|
+
smart_union = True
|
26
|
+
extra = pydantic_v1.Extra.allow
|
27
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/jsonable_encoder.py
RENAMED
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/pydantic_utilities.py
RENAMED
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/remove_none_from_dict.py
RENAMED
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/core/request_options.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/errors/internal_server_error.py
RENAMED
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/errors/not_found_error.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/polling_message_client.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/tools/types/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/data_frame_request_out.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/file_data_response.py
RENAMED
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/file_fetch_error.py
RENAMED
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/filter_operator.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/get_datasets_response.py
RENAMED
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/get_snippet_out.py
RENAMED
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/get_snippets_response.py
RENAMED
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/http_validation_error.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/map_reduce_chain_out.py
RENAMED
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/message_out_dto.py
RENAMED
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/publish_formats.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/researcher_out.py
RENAMED
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/semantic_query_out.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/time_dimension_model.py
RENAMED
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/upload_documents_out.py
RENAMED
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/validation_error.py
RENAMED
File without changes
|
File without changes
|
{athena_intelligence-0.1.80 → athena_intelligence-0.1.82}/src/athena/types/workflow_status_out.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|