athena-intelligence 0.1.84__py3-none-any.whl → 0.1.86__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
athena/__init__.py CHANGED
@@ -1,6 +1,7 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .types import (
4
+ AthenaDocumentV2Out,
4
5
  ConvertPdfToSheetOut,
5
6
  DataFrameParsingError,
6
7
  DataFrameRequestOut,
@@ -51,6 +52,7 @@ from .tools import ToolsDataFrameRequestColumnsItem
51
52
  from .version import __version__
52
53
 
53
54
  __all__ = [
55
+ "AthenaDocumentV2Out",
54
56
  "AthenaEnvironment",
55
57
  "ConvertPdfToSheetOut",
56
58
  "DataFrameParsingError",
@@ -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.84",
20
+ "X-Fern-SDK-Version": "0.1.86",
21
21
  }
22
22
  headers["X-API-KEY"] = self.api_key
23
23
  return headers
athena/tools/client.py CHANGED
@@ -15,6 +15,7 @@ from ..errors.internal_server_error import InternalServerError
15
15
  from ..errors.not_found_error import NotFoundError
16
16
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
17
17
  from ..errors.unsupported_media_type_error import UnsupportedMediaTypeError
18
+ from ..types.athena_document_v_2_out import AthenaDocumentV2Out
18
19
  from ..types.convert_pdf_to_sheet_out import ConvertPdfToSheetOut
19
20
  from ..types.data_frame_parsing_error import DataFrameParsingError
20
21
  from ..types.data_frame_request_out import DataFrameRequestOut
@@ -210,7 +211,7 @@ class ToolsClient:
210
211
  columns: typing.Optional[
211
212
  typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]
212
213
  ] = None,
213
- sheet_name: typing.Optional[str] = None,
214
+ sheet_name: typing.Optional[int] = None,
214
215
  separator: typing.Optional[str] = None,
215
216
  request_options: typing.Optional[RequestOptions] = None,
216
217
  ) -> DataFrameRequestOut:
@@ -226,7 +227,7 @@ class ToolsClient:
226
227
  columns : typing.Optional[typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]]
227
228
  should be a list of strings or a list of integers
228
229
 
229
- sheet_name : typing.Optional[str]
230
+ sheet_name : typing.Optional[int]
230
231
  only for excel files
231
232
 
232
233
  separator : typing.Optional[str]
@@ -741,6 +742,73 @@ class ToolsClient:
741
742
  raise ApiError(status_code=_response.status_code, body=_response.text)
742
743
  raise ApiError(status_code=_response.status_code, body=_response_json)
743
744
 
745
+ def athena_documents(
746
+ self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
747
+ ) -> AthenaDocumentV2Out:
748
+ """
749
+ Parameters
750
+ ----------
751
+ document_id : str
752
+
753
+ request_options : typing.Optional[RequestOptions]
754
+ Request-specific configuration.
755
+
756
+ Returns
757
+ -------
758
+ AthenaDocumentV2Out
759
+ Successful Response
760
+
761
+ Examples
762
+ --------
763
+ from athena.client import Athena
764
+
765
+ client = Athena(
766
+ api_key="YOUR_API_KEY",
767
+ )
768
+ client.tools.athena_documents(
769
+ document_id="doc_9249292-d118-42d3-95b4-00eccfe0754f",
770
+ )
771
+ """
772
+ _response = self._client_wrapper.httpx_client.request(
773
+ method="POST",
774
+ url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/athena-document-v2"),
775
+ params=encode_query(
776
+ jsonable_encoder(
777
+ request_options.get("additional_query_parameters") if request_options is not None else None
778
+ )
779
+ ),
780
+ json=jsonable_encoder({"document_id": document_id})
781
+ if request_options is None or request_options.get("additional_body_parameters") is None
782
+ else {
783
+ **jsonable_encoder({"document_id": document_id}),
784
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
785
+ },
786
+ headers=jsonable_encoder(
787
+ remove_none_from_dict(
788
+ {
789
+ **self._client_wrapper.get_headers(),
790
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
791
+ }
792
+ )
793
+ ),
794
+ timeout=request_options.get("timeout_in_seconds")
795
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
796
+ else self._client_wrapper.get_timeout(),
797
+ retries=0,
798
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
799
+ )
800
+ if 200 <= _response.status_code < 300:
801
+ return pydantic_v1.parse_obj_as(AthenaDocumentV2Out, _response.json()) # type: ignore
802
+ if _response.status_code == 422:
803
+ raise UnprocessableEntityError(
804
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
805
+ )
806
+ try:
807
+ _response_json = _response.json()
808
+ except JSONDecodeError:
809
+ raise ApiError(status_code=_response.status_code, body=_response.text)
810
+ raise ApiError(status_code=_response.status_code, body=_response_json)
811
+
744
812
 
745
813
  class AsyncToolsClient:
746
814
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -917,7 +985,7 @@ class AsyncToolsClient:
917
985
  columns: typing.Optional[
918
986
  typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]
919
987
  ] = None,
920
- sheet_name: typing.Optional[str] = None,
988
+ sheet_name: typing.Optional[int] = None,
921
989
  separator: typing.Optional[str] = None,
922
990
  request_options: typing.Optional[RequestOptions] = None,
923
991
  ) -> DataFrameRequestOut:
@@ -933,7 +1001,7 @@ class AsyncToolsClient:
933
1001
  columns : typing.Optional[typing.Union[ToolsDataFrameRequestColumnsItem, typing.Sequence[ToolsDataFrameRequestColumnsItem]]]
934
1002
  should be a list of strings or a list of integers
935
1003
 
936
- sheet_name : typing.Optional[str]
1004
+ sheet_name : typing.Optional[int]
937
1005
  only for excel files
938
1006
 
939
1007
  separator : typing.Optional[str]
@@ -1447,3 +1515,70 @@ class AsyncToolsClient:
1447
1515
  except JSONDecodeError:
1448
1516
  raise ApiError(status_code=_response.status_code, body=_response.text)
1449
1517
  raise ApiError(status_code=_response.status_code, body=_response_json)
1518
+
1519
+ async def athena_documents(
1520
+ self, *, document_id: str, request_options: typing.Optional[RequestOptions] = None
1521
+ ) -> AthenaDocumentV2Out:
1522
+ """
1523
+ Parameters
1524
+ ----------
1525
+ document_id : str
1526
+
1527
+ request_options : typing.Optional[RequestOptions]
1528
+ Request-specific configuration.
1529
+
1530
+ Returns
1531
+ -------
1532
+ AthenaDocumentV2Out
1533
+ Successful Response
1534
+
1535
+ Examples
1536
+ --------
1537
+ from athena.client import AsyncAthena
1538
+
1539
+ client = AsyncAthena(
1540
+ api_key="YOUR_API_KEY",
1541
+ )
1542
+ await client.tools.athena_documents(
1543
+ document_id="doc_9249292-d118-42d3-95b4-00eccfe0754f",
1544
+ )
1545
+ """
1546
+ _response = await self._client_wrapper.httpx_client.request(
1547
+ method="POST",
1548
+ url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/athena-document-v2"),
1549
+ params=encode_query(
1550
+ jsonable_encoder(
1551
+ request_options.get("additional_query_parameters") if request_options is not None else None
1552
+ )
1553
+ ),
1554
+ json=jsonable_encoder({"document_id": document_id})
1555
+ if request_options is None or request_options.get("additional_body_parameters") is None
1556
+ else {
1557
+ **jsonable_encoder({"document_id": document_id}),
1558
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
1559
+ },
1560
+ headers=jsonable_encoder(
1561
+ remove_none_from_dict(
1562
+ {
1563
+ **self._client_wrapper.get_headers(),
1564
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
1565
+ }
1566
+ )
1567
+ ),
1568
+ timeout=request_options.get("timeout_in_seconds")
1569
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
1570
+ else self._client_wrapper.get_timeout(),
1571
+ retries=0,
1572
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
1573
+ )
1574
+ if 200 <= _response.status_code < 300:
1575
+ return pydantic_v1.parse_obj_as(AthenaDocumentV2Out, _response.json()) # type: ignore
1576
+ if _response.status_code == 422:
1577
+ raise UnprocessableEntityError(
1578
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
1579
+ )
1580
+ try:
1581
+ _response_json = _response.json()
1582
+ except JSONDecodeError:
1583
+ raise ApiError(status_code=_response.status_code, body=_response.text)
1584
+ raise ApiError(status_code=_response.status_code, body=_response_json)
athena/types/__init__.py CHANGED
@@ -1,5 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ from .athena_document_v_2_out import AthenaDocumentV2Out
3
4
  from .convert_pdf_to_sheet_out import ConvertPdfToSheetOut
4
5
  from .data_frame_parsing_error import DataFrameParsingError
5
6
  from .data_frame_request_out import DataFrameRequestOut
@@ -44,6 +45,7 @@ from .validation_error_loc_item import ValidationErrorLocItem
44
45
  from .workflow_status_out import WorkflowStatusOut
45
46
 
46
47
  __all__ = [
48
+ "AthenaDocumentV2Out",
47
49
  "ConvertPdfToSheetOut",
48
50
  "DataFrameParsingError",
49
51
  "DataFrameRequestOut",
@@ -0,0 +1,29 @@
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 deep_union_pydantic_dicts, pydantic_v1
8
+
9
+
10
+ class AthenaDocumentV2Out(pydantic_v1.BaseModel):
11
+ output: typing.Dict[str, typing.Any]
12
+
13
+ def json(self, **kwargs: typing.Any) -> str:
14
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
15
+ return super().json(**kwargs_with_defaults)
16
+
17
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
18
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
19
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
20
+
21
+ return deep_union_pydantic_dicts(
22
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
23
+ )
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ extra = pydantic_v1.Extra.allow
29
+ json_encoders = {dt.datetime: serialize_datetime}
athena/types/model.py CHANGED
@@ -27,6 +27,7 @@ class Model(str, enum.Enum):
27
27
  CLAUDE_3_HAIKU_20240307 = "claude-3-haiku-20240307"
28
28
  CLAUDE_35_SONNET_20240620 = "claude-3-5-sonnet-20240620"
29
29
  GOOGLE_GEMINI_10_PRO_LATEST = "google-gemini-1.0-pro-latest"
30
+ GOOGLE_GEMINI_15_PRO_LATEST = "google-gemini-1.5-pro-latest"
30
31
  DATABRICKS_DBRX = "databricks-dbrx"
31
32
 
32
33
  def visit(
@@ -47,6 +48,7 @@ class Model(str, enum.Enum):
47
48
  claude_3_haiku_20240307: typing.Callable[[], T_Result],
48
49
  claude_35_sonnet_20240620: typing.Callable[[], T_Result],
49
50
  google_gemini_10_pro_latest: typing.Callable[[], T_Result],
51
+ google_gemini_15_pro_latest: typing.Callable[[], T_Result],
50
52
  databricks_dbrx: typing.Callable[[], T_Result],
51
53
  ) -> T_Result:
52
54
  if self is Model.GPT_35_TURBO:
@@ -81,5 +83,7 @@ class Model(str, enum.Enum):
81
83
  return claude_35_sonnet_20240620()
82
84
  if self is Model.GOOGLE_GEMINI_10_PRO_LATEST:
83
85
  return google_gemini_10_pro_latest()
86
+ if self is Model.GOOGLE_GEMINI_15_PRO_LATEST:
87
+ return google_gemini_15_pro_latest()
84
88
  if self is Model.DATABRICKS_DBRX:
85
89
  return databricks_dbrx()
@@ -16,6 +16,7 @@ class QueryModel(pydantic_v1.BaseModel):
16
16
  )
17
17
  dimensions: typing.Optional[typing.List[str]] = None
18
18
  filters: typing.Optional[typing.List[FilterModel]] = None
19
+ order: typing.Optional[typing.Dict[str, typing.Any]] = None
19
20
  limit: typing.Optional[int] = None
20
21
 
21
22
  def json(self, **kwargs: typing.Any) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.84
3
+ Version: 0.1.86
4
4
  Summary: Athena Intelligence Python Library
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Intended Audience :: Developers
@@ -1,11 +1,11 @@
1
- athena/__init__.py,sha256=S-yzA6G5fLjtyXBy2EPQ7eBzd_czab5tJGAJUcv_LgA,2749
1
+ athena/__init__.py,sha256=vS1F7G3hdiHGM-q24LBoKf77EHpaDBrb3ZzM_sgXoGY,2801
2
2
  athena/base_client.py,sha256=4HD21xS-Kl2oyy0OQGPVSH8X3aRpKdefKKOGXkAa-1M,7101
3
3
  athena/chain/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
4
4
  athena/chain/client.py,sha256=3O5tTl9skrhNS--6Jt-Za7CmmBz1MQLiqeNK0Ewtup0,16977
5
5
  athena/client.py,sha256=gVUvs9Wui80KKYfXOzWQjfcar98ijg8NzNaPLkULFFA,6757
6
6
  athena/core/__init__.py,sha256=UFXpYzcGxWQUucU1TkjOQ9mGWN3A5JohluOIWVYKU4I,973
7
7
  athena/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
8
- athena/core/client_wrapper.py,sha256=Ias36Y3yOhjFDZRabC6_FlVgWN0p0pf2MSZg2SMh-GI,1495
8
+ athena/core/client_wrapper.py,sha256=ujw-SZMlg7IKRB5rwW50cLXxVAMNLoMM7e6vQ-2Pcig,1495
9
9
  athena/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
10
10
  athena/core/file.py,sha256=sy1RUGZ3aJYuw998bZytxxo6QdgKmlnlgBaMvwEKCGg,1480
11
11
  athena/core/http_client.py,sha256=5ok6hqgZDJhg57EHvMnr0BBaHdG50QxFPKaCZ9aVWTc,5059
@@ -35,10 +35,11 @@ athena/search/client.py,sha256=1XD9KW-crpB4U2bGOrYngOxdomjoUInthNe_H9tXdgA,7978
35
35
  athena/snippet/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
36
36
  athena/snippet/client.py,sha256=0_lhr8_IHNah2qdDT8OpwOSHN_SCqE0F7KLx4YHp-8I,12217
37
37
  athena/tools/__init__.py,sha256=3n7oOoMebo06MAQqYRE2CX9Q0fTNnKBYE0cTlh1MPkM,165
38
- athena/tools/client.py,sha256=C55orGhXtURrn8T8-XHJjCAHEUABz9KeCxA13t2dkKc,58155
38
+ athena/tools/client.py,sha256=ur1PDs-ftZDWIB_5-FUKLlHNzvGgN2DgJea_B09lidM,63809
39
39
  athena/tools/types/__init__.py,sha256=cA-ZQm6veQAP3_vKu9KkZpISsQqgTBN_Z--FGY1c2iA,197
40
40
  athena/tools/types/tools_data_frame_request_columns_item.py,sha256=GA1FUlTV_CfSc-KToTAwFf4Exl0rr4fsweVZupztjw0,138
41
- athena/types/__init__.py,sha256=mOox5XE1eT51OIcJmBmHt9y3FKe412J-ydKk7WLkFrg,3214
41
+ athena/types/__init__.py,sha256=UKGjYkgCipVr4_CBwGkCL6PdYGC4XsS7qYdRmCGpr8Q,3298
42
+ athena/types/athena_document_v_2_out.py,sha256=_wUNU1ygb0FNcf3ls9Xf0_3ePHkwXjRhh7YAKJcfirw,1146
42
43
  athena/types/convert_pdf_to_sheet_out.py,sha256=ce27tpf6OzV7eVTpMV3oeEqvqVzOwUBFRxxHnS6Y60M,1152
43
44
  athena/types/data_frame_parsing_error.py,sha256=gXJXZQsZKgzRoF7iLKvy1JFZAPI-M-ajY7ybLW-XYvA,1145
44
45
  athena/types/data_frame_request_out.py,sha256=u2dVlNwkzIStseKbXHGwt8kvjre64TNrulDxE7Gi7E0,1522
@@ -64,9 +65,9 @@ athena/types/llm_model.py,sha256=kGCC7WEAe-Lq7r6kiXhy5UCn6vdSdb7ydbq5gIjeye0,666
64
65
  athena/types/map_reduce_chain_out.py,sha256=p9rN21wMZaki_rpd1Z_0DM4tvlDdYG8gHE2Xg4TEAvE,1213
65
66
  athena/types/message_out.py,sha256=Jli5sJBAtwOgkZjpx28kVHfBRoBLuINyNTm_9AXPuys,1108
66
67
  athena/types/message_out_dto.py,sha256=iELbR1DZBrlSshzIdfpZ3ZR2V1fzAzVw4aprxcfzg38,1294
67
- athena/types/model.py,sha256=qUqa8Tcmb3o0Cxul_1UGiNlJGPlbr4OGqYNLtxf8oEQ,3510
68
+ athena/types/model.py,sha256=2dpNftSHkrgeUl-00Zk3UZ1tSkeygOfimHFDu5mc3ek,3746
68
69
  athena/types/publish_formats.py,sha256=1j2fgJo0MMaHzEEYxd9uCFq_Y7bFoQox0JgKCfcPXLo,1148
69
- athena/types/query_model.py,sha256=IIOOn36s6JWuDNxy4-OvXhSh2hcL0ZLDo9pnPvlbB28,1620
70
+ athena/types/query_model.py,sha256=F-HSvgcTys4hA3e7sYas_71APMZmAu_LOKqWVZ0-Jx4,1684
70
71
  athena/types/report.py,sha256=Yr_Ph7BS-2QgMJ3az5GP_fwlRMl6i4-1MGWYcLPSPhY,1189
71
72
  athena/types/researcher_out.py,sha256=XC8f90Q1G18zSSEzJ3pM5hrMnBDt0rrBIri0pJVFWQg,1142
72
73
  athena/types/semantic_query_out.py,sha256=sdsVToZ5o5AUTKVSeCeyhb8TwINMX5RZgs5XbZgkiaQ,1143
@@ -86,6 +87,6 @@ athena/upload/client.py,sha256=L66H0qFpFH1RYIfKJLQgPDZ3HK5ZagRwYQX5BIen1rc,6825
86
87
  athena/version.py,sha256=8aYAOJtVLaJLpRp6mTiEIhnl8gXA7yE0aDtZ-3mKQ4k,87
87
88
  athena/workflow/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
88
89
  athena/workflow/client.py,sha256=3LCFYbAoOWcvzwME677syefoJ55ukdTUxiQ71jXw7so,6663
89
- athena_intelligence-0.1.84.dist-info/METADATA,sha256=CVZngWwieSVyUaAXXYdR1IK9ujhUk8NKckYXMVBJWwk,5273
90
- athena_intelligence-0.1.84.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
91
- athena_intelligence-0.1.84.dist-info/RECORD,,
90
+ athena_intelligence-0.1.86.dist-info/METADATA,sha256=oiAY6HrOZNxyXsjDtH8XB6QZkv5mgS77ouasBMLWlfQ,5273
91
+ athena_intelligence-0.1.86.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
92
+ athena_intelligence-0.1.86.dist-info/RECORD,,