athena-intelligence 0.1.28__tar.gz → 0.1.30__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 (45) hide show
  1. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/core/client_wrapper.py +1 -1
  4. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/dataset/client.py +50 -4
  5. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/snippet/client.py +50 -4
  6. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/dataset.py +1 -0
  7. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/get_datasets_response.py +4 -0
  8. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/get_snippets_response.py +4 -0
  9. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/model.py +8 -0
  10. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/README.md +0 -0
  11. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/__init__.py +0 -0
  12. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/base_client.py +0 -0
  13. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/client.py +0 -0
  14. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/core/__init__.py +0 -0
  15. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/core/api_error.py +0 -0
  16. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/core/datetime_utils.py +0 -0
  17. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/core/file.py +0 -0
  18. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/core/http_client.py +0 -0
  19. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/core/jsonable_encoder.py +0 -0
  20. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/core/remove_none_from_dict.py +0 -0
  21. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/core/request_options.py +0 -0
  22. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/dataset/__init__.py +0 -0
  23. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/environment.py +0 -0
  24. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/errors/__init__.py +0 -0
  25. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/errors/unprocessable_entity_error.py +0 -0
  26. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/message/__init__.py +0 -0
  27. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/message/client.py +0 -0
  28. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/polling_message_client.py +0 -0
  29. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/py.typed +0 -0
  30. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/query/__init__.py +0 -0
  31. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/query/client.py +0 -0
  32. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/report/__init__.py +0 -0
  33. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/report/client.py +0 -0
  34. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/snippet/__init__.py +0 -0
  35. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/__init__.py +0 -0
  36. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/http_validation_error.py +0 -0
  37. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/message_out.py +0 -0
  38. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/message_out_dto.py +0 -0
  39. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/report.py +0 -0
  40. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/snippet.py +0 -0
  41. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/sql_results.py +0 -0
  42. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/status_enum.py +0 -0
  43. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/tools.py +0 -0
  44. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/validation_error.py +0 -0
  45. {athena_intelligence-0.1.28 → athena_intelligence-0.1.30}/src/athena/types/validation_error_loc_item.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.28
3
+ Version: 0.1.30
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "athena-intelligence"
3
- version = "0.1.28"
3
+ version = "0.1.30"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -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.28",
19
+ "X-Fern-SDK-Version": "0.1.30",
20
20
  }
21
21
  headers["X-API-KEY"] = self.api_key
22
22
  return headers
@@ -9,7 +9,9 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
9
  from ..core.jsonable_encoder import jsonable_encoder
10
10
  from ..core.remove_none_from_dict import remove_none_from_dict
11
11
  from ..core.request_options import RequestOptions
12
+ from ..errors.unprocessable_entity_error import UnprocessableEntityError
12
13
  from ..types.get_datasets_response import GetDatasetsResponse
14
+ from ..types.http_validation_error import HttpValidationError
13
15
 
14
16
  try:
15
17
  import pydantic.v1 as pydantic # type: ignore
@@ -21,9 +23,19 @@ class DatasetClient:
21
23
  def __init__(self, *, client_wrapper: SyncClientWrapper):
22
24
  self._client_wrapper = client_wrapper
23
25
 
24
- def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetDatasetsResponse:
26
+ def get(
27
+ self,
28
+ *,
29
+ page: typing.Optional[int] = None,
30
+ page_size: typing.Optional[int] = None,
31
+ request_options: typing.Optional[RequestOptions] = None,
32
+ ) -> GetDatasetsResponse:
25
33
  """
26
34
  Parameters:
35
+ - page: typing.Optional[int]. Page number starting from 1
36
+
37
+ - page_size: typing.Optional[int]. Number of items per page
38
+
27
39
  - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
28
40
  ---
29
41
  from athena.client import Athena
@@ -37,7 +49,17 @@ class DatasetClient:
37
49
  "GET",
38
50
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/datasets"),
39
51
  params=jsonable_encoder(
40
- request_options.get("additional_query_parameters") if request_options is not None else None
52
+ remove_none_from_dict(
53
+ {
54
+ "page": page,
55
+ "page_size": page_size,
56
+ **(
57
+ request_options.get("additional_query_parameters", {})
58
+ if request_options is not None
59
+ else {}
60
+ ),
61
+ }
62
+ )
41
63
  ),
42
64
  headers=jsonable_encoder(
43
65
  remove_none_from_dict(
@@ -55,6 +77,8 @@ class DatasetClient:
55
77
  )
56
78
  if 200 <= _response.status_code < 300:
57
79
  return pydantic.parse_obj_as(GetDatasetsResponse, _response.json()) # type: ignore
80
+ if _response.status_code == 422:
81
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
58
82
  try:
59
83
  _response_json = _response.json()
60
84
  except JSONDecodeError:
@@ -66,9 +90,19 @@ class AsyncDatasetClient:
66
90
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
67
91
  self._client_wrapper = client_wrapper
68
92
 
69
- async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetDatasetsResponse:
93
+ async def get(
94
+ self,
95
+ *,
96
+ page: typing.Optional[int] = None,
97
+ page_size: typing.Optional[int] = None,
98
+ request_options: typing.Optional[RequestOptions] = None,
99
+ ) -> GetDatasetsResponse:
70
100
  """
71
101
  Parameters:
102
+ - page: typing.Optional[int]. Page number starting from 1
103
+
104
+ - page_size: typing.Optional[int]. Number of items per page
105
+
72
106
  - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
73
107
  ---
74
108
  from athena.client import AsyncAthena
@@ -82,7 +116,17 @@ class AsyncDatasetClient:
82
116
  "GET",
83
117
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/datasets"),
84
118
  params=jsonable_encoder(
85
- request_options.get("additional_query_parameters") if request_options is not None else None
119
+ remove_none_from_dict(
120
+ {
121
+ "page": page,
122
+ "page_size": page_size,
123
+ **(
124
+ request_options.get("additional_query_parameters", {})
125
+ if request_options is not None
126
+ else {}
127
+ ),
128
+ }
129
+ )
86
130
  ),
87
131
  headers=jsonable_encoder(
88
132
  remove_none_from_dict(
@@ -100,6 +144,8 @@ class AsyncDatasetClient:
100
144
  )
101
145
  if 200 <= _response.status_code < 300:
102
146
  return pydantic.parse_obj_as(GetDatasetsResponse, _response.json()) # type: ignore
147
+ if _response.status_code == 422:
148
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
103
149
  try:
104
150
  _response_json = _response.json()
105
151
  except JSONDecodeError:
@@ -9,7 +9,9 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
9
  from ..core.jsonable_encoder import jsonable_encoder
10
10
  from ..core.remove_none_from_dict import remove_none_from_dict
11
11
  from ..core.request_options import RequestOptions
12
+ from ..errors.unprocessable_entity_error import UnprocessableEntityError
12
13
  from ..types.get_snippets_response import GetSnippetsResponse
14
+ from ..types.http_validation_error import HttpValidationError
13
15
 
14
16
  try:
15
17
  import pydantic.v1 as pydantic # type: ignore
@@ -21,9 +23,19 @@ class SnippetClient:
21
23
  def __init__(self, *, client_wrapper: SyncClientWrapper):
22
24
  self._client_wrapper = client_wrapper
23
25
 
24
- def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetSnippetsResponse:
26
+ def get(
27
+ self,
28
+ *,
29
+ page: typing.Optional[int] = None,
30
+ page_size: typing.Optional[int] = None,
31
+ request_options: typing.Optional[RequestOptions] = None,
32
+ ) -> GetSnippetsResponse:
25
33
  """
26
34
  Parameters:
35
+ - page: typing.Optional[int]. Page number starting from 1
36
+
37
+ - page_size: typing.Optional[int]. Number of items per page
38
+
27
39
  - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
28
40
  ---
29
41
  from athena.client import Athena
@@ -37,7 +49,17 @@ class SnippetClient:
37
49
  "GET",
38
50
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/snippets"),
39
51
  params=jsonable_encoder(
40
- request_options.get("additional_query_parameters") if request_options is not None else None
52
+ remove_none_from_dict(
53
+ {
54
+ "page": page,
55
+ "page_size": page_size,
56
+ **(
57
+ request_options.get("additional_query_parameters", {})
58
+ if request_options is not None
59
+ else {}
60
+ ),
61
+ }
62
+ )
41
63
  ),
42
64
  headers=jsonable_encoder(
43
65
  remove_none_from_dict(
@@ -55,6 +77,8 @@ class SnippetClient:
55
77
  )
56
78
  if 200 <= _response.status_code < 300:
57
79
  return pydantic.parse_obj_as(GetSnippetsResponse, _response.json()) # type: ignore
80
+ if _response.status_code == 422:
81
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
58
82
  try:
59
83
  _response_json = _response.json()
60
84
  except JSONDecodeError:
@@ -66,9 +90,19 @@ class AsyncSnippetClient:
66
90
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
67
91
  self._client_wrapper = client_wrapper
68
92
 
69
- async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetSnippetsResponse:
93
+ async def get(
94
+ self,
95
+ *,
96
+ page: typing.Optional[int] = None,
97
+ page_size: typing.Optional[int] = None,
98
+ request_options: typing.Optional[RequestOptions] = None,
99
+ ) -> GetSnippetsResponse:
70
100
  """
71
101
  Parameters:
102
+ - page: typing.Optional[int]. Page number starting from 1
103
+
104
+ - page_size: typing.Optional[int]. Number of items per page
105
+
72
106
  - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
73
107
  ---
74
108
  from athena.client import AsyncAthena
@@ -82,7 +116,17 @@ class AsyncSnippetClient:
82
116
  "GET",
83
117
  urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/snippets"),
84
118
  params=jsonable_encoder(
85
- request_options.get("additional_query_parameters") if request_options is not None else None
119
+ remove_none_from_dict(
120
+ {
121
+ "page": page,
122
+ "page_size": page_size,
123
+ **(
124
+ request_options.get("additional_query_parameters", {})
125
+ if request_options is not None
126
+ else {}
127
+ ),
128
+ }
129
+ )
86
130
  ),
87
131
  headers=jsonable_encoder(
88
132
  remove_none_from_dict(
@@ -100,6 +144,8 @@ class AsyncSnippetClient:
100
144
  )
101
145
  if 200 <= _response.status_code < 300:
102
146
  return pydantic.parse_obj_as(GetSnippetsResponse, _response.json()) # type: ignore
147
+ if _response.status_code == 422:
148
+ raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
103
149
  try:
104
150
  _response_json = _response.json()
105
151
  except JSONDecodeError:
@@ -16,6 +16,7 @@ class Dataset(pydantic.BaseModel):
16
16
  name: typing.Optional[str] = None
17
17
  description: typing.Optional[str] = None
18
18
  database_id: int
19
+ schema_details: typing.Optional[str] = None
19
20
 
20
21
  def json(self, **kwargs: typing.Any) -> str:
21
22
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -14,6 +14,10 @@ except ImportError:
14
14
 
15
15
  class GetDatasetsResponse(pydantic.BaseModel):
16
16
  datasets: typing.List[Dataset]
17
+ total: int
18
+ page: int
19
+ page_size: int
20
+ pages: int
17
21
 
18
22
  def json(self, **kwargs: typing.Any) -> str:
19
23
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -14,6 +14,10 @@ except ImportError:
14
14
 
15
15
  class GetSnippetsResponse(pydantic.BaseModel):
16
16
  snippets: typing.List[Snippet]
17
+ total: int
18
+ page: int
19
+ page_size: int
20
+ pages: int
17
21
 
18
22
  def json(self, **kwargs: typing.Any) -> str:
19
23
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -13,6 +13,8 @@ class Model(str, enum.Enum):
13
13
 
14
14
  GPT_35_TURBO = "gpt-3.5-turbo"
15
15
  GPT_4_TURBO_PREVIEW = "gpt-4-turbo-preview"
16
+ GPT_4 = "gpt-4"
17
+ GPT_432_K = "gpt-4-32k"
16
18
  MIXTRAL_SMALL_8_X_7_B_0211 = "mixtral-small-8x7b-0211"
17
19
  MISTRAL_LARGE_0224 = "mistral-large-0224"
18
20
 
@@ -20,6 +22,8 @@ class Model(str, enum.Enum):
20
22
  self,
21
23
  gpt_35_turbo: typing.Callable[[], T_Result],
22
24
  gpt_4_turbo_preview: typing.Callable[[], T_Result],
25
+ gpt_4: typing.Callable[[], T_Result],
26
+ gpt_432_k: typing.Callable[[], T_Result],
23
27
  mixtral_small_8_x_7_b_0211: typing.Callable[[], T_Result],
24
28
  mistral_large_0224: typing.Callable[[], T_Result],
25
29
  ) -> T_Result:
@@ -27,6 +31,10 @@ class Model(str, enum.Enum):
27
31
  return gpt_35_turbo()
28
32
  if self is Model.GPT_4_TURBO_PREVIEW:
29
33
  return gpt_4_turbo_preview()
34
+ if self is Model.GPT_4:
35
+ return gpt_4()
36
+ if self is Model.GPT_432_K:
37
+ return gpt_432_k()
30
38
  if self is Model.MIXTRAL_SMALL_8_X_7_B_0211:
31
39
  return mixtral_small_8_x_7_b_0211()
32
40
  if self is Model.MISTRAL_LARGE_0224: