athena-intelligence 0.1.53__py3-none-any.whl → 0.1.55__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
@@ -7,6 +7,7 @@ from .types import (
7
7
  FirecrawlScrapeUrlDataReponseDto,
8
8
  FirecrawlScrapeUrlMetadata,
9
9
  GetDatasetsResponse,
10
+ GetSnippetOut,
10
11
  GetSnippetsResponse,
11
12
  HttpValidationError,
12
13
  LangchainDocumentsRequestOut,
@@ -15,20 +16,18 @@ from .types import (
15
16
  MessageOut,
16
17
  MessageOutDto,
17
18
  Model,
18
- PlanExecuteOut,
19
19
  Report,
20
20
  Snippet,
21
21
  SqlResults,
22
22
  StatusEnum,
23
23
  StructuredParseResult,
24
- ToolModels,
25
24
  Tools,
26
25
  UrlResult,
27
26
  ValidationError,
28
27
  ValidationErrorLocItem,
29
28
  )
30
29
  from .errors import UnprocessableEntityError
31
- from . import chain, dataset, message, query, report, search, snippet, tasks, tools
30
+ from . import chain, dataset, message, query, report, search, snippet, tools
32
31
  from .environment import AthenaEnvironment
33
32
  from .version import __version__
34
33
 
@@ -40,6 +39,7 @@ __all__ = [
40
39
  "FirecrawlScrapeUrlDataReponseDto",
41
40
  "FirecrawlScrapeUrlMetadata",
42
41
  "GetDatasetsResponse",
42
+ "GetSnippetOut",
43
43
  "GetSnippetsResponse",
44
44
  "HttpValidationError",
45
45
  "LangchainDocumentsRequestOut",
@@ -48,13 +48,11 @@ __all__ = [
48
48
  "MessageOut",
49
49
  "MessageOutDto",
50
50
  "Model",
51
- "PlanExecuteOut",
52
51
  "Report",
53
52
  "Snippet",
54
53
  "SqlResults",
55
54
  "StatusEnum",
56
55
  "StructuredParseResult",
57
- "ToolModels",
58
56
  "Tools",
59
57
  "UnprocessableEntityError",
60
58
  "UrlResult",
@@ -68,6 +66,5 @@ __all__ = [
68
66
  "report",
69
67
  "search",
70
68
  "snippet",
71
- "tasks",
72
69
  "tools",
73
70
  ]
athena/base_client.py CHANGED
@@ -13,7 +13,6 @@ from .query.client import AsyncQueryClient, QueryClient
13
13
  from .report.client import AsyncReportClient, ReportClient
14
14
  from .search.client import AsyncSearchClient, SearchClient
15
15
  from .snippet.client import AsyncSnippetClient, SnippetClient
16
- from .tasks.client import AsyncTasksClient, TasksClient
17
16
  from .tools.client import AsyncToolsClient, ToolsClient
18
17
 
19
18
 
@@ -72,7 +71,6 @@ class BaseAthena:
72
71
  self.search = SearchClient(client_wrapper=self._client_wrapper)
73
72
  self.chain = ChainClient(client_wrapper=self._client_wrapper)
74
73
  self.tools = ToolsClient(client_wrapper=self._client_wrapper)
75
- self.tasks = TasksClient(client_wrapper=self._client_wrapper)
76
74
 
77
75
 
78
76
  class AsyncBaseAthena:
@@ -130,7 +128,6 @@ class AsyncBaseAthena:
130
128
  self.search = AsyncSearchClient(client_wrapper=self._client_wrapper)
131
129
  self.chain = AsyncChainClient(client_wrapper=self._client_wrapper)
132
130
  self.tools = AsyncToolsClient(client_wrapper=self._client_wrapper)
133
- self.tasks = AsyncTasksClient(client_wrapper=self._client_wrapper)
134
131
 
135
132
 
136
133
  def _get_base_url(*, base_url: typing.Optional[str] = None, environment: AthenaEnvironment) -> str:
@@ -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.53",
20
+ "X-Fern-SDK-Version": "0.1.55",
21
21
  }
22
22
  headers["X-API-KEY"] = self.api_key
23
23
  return headers
athena/snippet/client.py CHANGED
@@ -11,9 +11,13 @@ from ..core.pydantic_utilities import pydantic_v1
11
11
  from ..core.remove_none_from_dict import remove_none_from_dict
12
12
  from ..core.request_options import RequestOptions
13
13
  from ..errors.unprocessable_entity_error import UnprocessableEntityError
14
+ from ..types.get_snippet_out import GetSnippetOut
14
15
  from ..types.get_snippets_response import GetSnippetsResponse
15
16
  from ..types.http_validation_error import HttpValidationError
16
17
 
18
+ # this is used as the default value for optional parameters
19
+ OMIT = typing.cast(typing.Any, ...)
20
+
17
21
 
18
22
  class SnippetClient:
19
23
  def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -83,6 +87,60 @@ class SnippetClient:
83
87
  raise ApiError(status_code=_response.status_code, body=_response.text)
84
88
  raise ApiError(status_code=_response.status_code, body=_response_json)
85
89
 
90
+ def get_by_id(self, *, id: str, request_options: typing.Optional[RequestOptions] = None) -> GetSnippetOut:
91
+ """
92
+ Parameters:
93
+ - id: str.
94
+
95
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
96
+ ---
97
+ from athena.client import Athena
98
+
99
+ client = Athena(
100
+ api_key="YOUR_API_KEY",
101
+ )
102
+ client.snippet.get_by_id(
103
+ id="snippet_02329f1b-f6ad-4e93-be84-355c33202024b",
104
+ )
105
+ """
106
+ _response = self._client_wrapper.httpx_client.request(
107
+ method="POST",
108
+ url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/snippet"),
109
+ params=jsonable_encoder(
110
+ request_options.get("additional_query_parameters") if request_options is not None else None
111
+ ),
112
+ json=jsonable_encoder({"id": id})
113
+ if request_options is None or request_options.get("additional_body_parameters") is None
114
+ else {
115
+ **jsonable_encoder({"id": id}),
116
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
117
+ },
118
+ headers=jsonable_encoder(
119
+ remove_none_from_dict(
120
+ {
121
+ **self._client_wrapper.get_headers(),
122
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
123
+ }
124
+ )
125
+ ),
126
+ timeout=request_options.get("timeout_in_seconds")
127
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
128
+ else self._client_wrapper.get_timeout(),
129
+ retries=0,
130
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
131
+ )
132
+ if 200 <= _response.status_code < 300:
133
+ return pydantic_v1.parse_obj_as(GetSnippetOut, _response.json()) # type: ignore
134
+ if _response.status_code == 422:
135
+ raise UnprocessableEntityError(
136
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
137
+ )
138
+ try:
139
+ _response_json = _response.json()
140
+ except JSONDecodeError:
141
+ raise ApiError(status_code=_response.status_code, body=_response.text)
142
+ raise ApiError(status_code=_response.status_code, body=_response_json)
143
+
86
144
 
87
145
  class AsyncSnippetClient:
88
146
  def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -151,3 +209,57 @@ class AsyncSnippetClient:
151
209
  except JSONDecodeError:
152
210
  raise ApiError(status_code=_response.status_code, body=_response.text)
153
211
  raise ApiError(status_code=_response.status_code, body=_response_json)
212
+
213
+ async def get_by_id(self, *, id: str, request_options: typing.Optional[RequestOptions] = None) -> GetSnippetOut:
214
+ """
215
+ Parameters:
216
+ - id: str.
217
+
218
+ - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
219
+ ---
220
+ from athena.client import AsyncAthena
221
+
222
+ client = AsyncAthena(
223
+ api_key="YOUR_API_KEY",
224
+ )
225
+ await client.snippet.get_by_id(
226
+ id="snippet_02329f1b-f6ad-4e93-be84-355c33202024b",
227
+ )
228
+ """
229
+ _response = await self._client_wrapper.httpx_client.request(
230
+ method="POST",
231
+ url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/snippet"),
232
+ params=jsonable_encoder(
233
+ request_options.get("additional_query_parameters") if request_options is not None else None
234
+ ),
235
+ json=jsonable_encoder({"id": id})
236
+ if request_options is None or request_options.get("additional_body_parameters") is None
237
+ else {
238
+ **jsonable_encoder({"id": id}),
239
+ **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
240
+ },
241
+ headers=jsonable_encoder(
242
+ remove_none_from_dict(
243
+ {
244
+ **self._client_wrapper.get_headers(),
245
+ **(request_options.get("additional_headers", {}) if request_options is not None else {}),
246
+ }
247
+ )
248
+ ),
249
+ timeout=request_options.get("timeout_in_seconds")
250
+ if request_options is not None and request_options.get("timeout_in_seconds") is not None
251
+ else self._client_wrapper.get_timeout(),
252
+ retries=0,
253
+ max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
254
+ )
255
+ if 200 <= _response.status_code < 300:
256
+ return pydantic_v1.parse_obj_as(GetSnippetOut, _response.json()) # type: ignore
257
+ if _response.status_code == 422:
258
+ raise UnprocessableEntityError(
259
+ pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
260
+ )
261
+ try:
262
+ _response_json = _response.json()
263
+ except JSONDecodeError:
264
+ raise ApiError(status_code=_response.status_code, body=_response.text)
265
+ raise ApiError(status_code=_response.status_code, body=_response_json)
athena/tools/client.py CHANGED
@@ -15,7 +15,7 @@ from ..types.excecute_tool_first_workflow_out import ExcecuteToolFirstWorkflowOu
15
15
  from ..types.firecrawl_scrape_url_data_reponse_dto import FirecrawlScrapeUrlDataReponseDto
16
16
  from ..types.http_validation_error import HttpValidationError
17
17
  from ..types.langchain_documents_request_out import LangchainDocumentsRequestOut
18
- from ..types.tool_models import ToolModels
18
+ from ..types.llm_model import LlmModel
19
19
 
20
20
  # this is used as the default value for optional parameters
21
21
  OMIT = typing.cast(typing.Any, ...)
@@ -167,7 +167,7 @@ class ToolsClient:
167
167
  def tool_first_workflow(
168
168
  self,
169
169
  *,
170
- model: typing.Optional[ToolModels] = OMIT,
170
+ model: typing.Optional[LlmModel] = OMIT,
171
171
  tool_name: str,
172
172
  content: str,
173
173
  tool_kwargs: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
@@ -175,7 +175,7 @@ class ToolsClient:
175
175
  ) -> ExcecuteToolFirstWorkflowOut:
176
176
  """
177
177
  Parameters:
178
- - model: typing.Optional[ToolModels].
178
+ - model: typing.Optional[LlmModel].
179
179
 
180
180
  - tool_name: str.
181
181
 
@@ -185,14 +185,14 @@ class ToolsClient:
185
185
 
186
186
  - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
187
187
  ---
188
- from athena import ToolModels
188
+ from athena import LlmModel
189
189
  from athena.client import Athena
190
190
 
191
191
  client = Athena(
192
192
  api_key="YOUR_API_KEY",
193
193
  )
194
194
  client.tools.tool_first_workflow(
195
- model=ToolModels.MISTRAL_LARGE_0224,
195
+ model=LlmModel.MISTRAL_LARGE_0224,
196
196
  tool_name="tavily_search",
197
197
  content="summarize the website in one paragraph",
198
198
  tool_kwargs={"query": "website: www.athenaintelligence.ai"},
@@ -388,7 +388,7 @@ class AsyncToolsClient:
388
388
  async def tool_first_workflow(
389
389
  self,
390
390
  *,
391
- model: typing.Optional[ToolModels] = OMIT,
391
+ model: typing.Optional[LlmModel] = OMIT,
392
392
  tool_name: str,
393
393
  content: str,
394
394
  tool_kwargs: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
@@ -396,7 +396,7 @@ class AsyncToolsClient:
396
396
  ) -> ExcecuteToolFirstWorkflowOut:
397
397
  """
398
398
  Parameters:
399
- - model: typing.Optional[ToolModels].
399
+ - model: typing.Optional[LlmModel].
400
400
 
401
401
  - tool_name: str.
402
402
 
@@ -406,14 +406,14 @@ class AsyncToolsClient:
406
406
 
407
407
  - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
408
408
  ---
409
- from athena import ToolModels
409
+ from athena import LlmModel
410
410
  from athena.client import AsyncAthena
411
411
 
412
412
  client = AsyncAthena(
413
413
  api_key="YOUR_API_KEY",
414
414
  )
415
415
  await client.tools.tool_first_workflow(
416
- model=ToolModels.MISTRAL_LARGE_0224,
416
+ model=LlmModel.MISTRAL_LARGE_0224,
417
417
  tool_name="tavily_search",
418
418
  content="summarize the website in one paragraph",
419
419
  tool_kwargs={"query": "website: www.athenaintelligence.ai"},
athena/types/__init__.py CHANGED
@@ -6,6 +6,7 @@ from .excecute_tool_first_workflow_out import ExcecuteToolFirstWorkflowOut
6
6
  from .firecrawl_scrape_url_data_reponse_dto import FirecrawlScrapeUrlDataReponseDto
7
7
  from .firecrawl_scrape_url_metadata import FirecrawlScrapeUrlMetadata
8
8
  from .get_datasets_response import GetDatasetsResponse
9
+ from .get_snippet_out import GetSnippetOut
9
10
  from .get_snippets_response import GetSnippetsResponse
10
11
  from .http_validation_error import HttpValidationError
11
12
  from .langchain_documents_request_out import LangchainDocumentsRequestOut
@@ -14,13 +15,11 @@ from .map_reduce_chain_out import MapReduceChainOut
14
15
  from .message_out import MessageOut
15
16
  from .message_out_dto import MessageOutDto
16
17
  from .model import Model
17
- from .plan_execute_out import PlanExecuteOut
18
18
  from .report import Report
19
19
  from .snippet import Snippet
20
20
  from .sql_results import SqlResults
21
21
  from .status_enum import StatusEnum
22
22
  from .structured_parse_result import StructuredParseResult
23
- from .tool_models import ToolModels
24
23
  from .tools import Tools
25
24
  from .url_result import UrlResult
26
25
  from .validation_error import ValidationError
@@ -33,6 +32,7 @@ __all__ = [
33
32
  "FirecrawlScrapeUrlDataReponseDto",
34
33
  "FirecrawlScrapeUrlMetadata",
35
34
  "GetDatasetsResponse",
35
+ "GetSnippetOut",
36
36
  "GetSnippetsResponse",
37
37
  "HttpValidationError",
38
38
  "LangchainDocumentsRequestOut",
@@ -41,13 +41,11 @@ __all__ = [
41
41
  "MessageOut",
42
42
  "MessageOutDto",
43
43
  "Model",
44
- "PlanExecuteOut",
45
44
  "Report",
46
45
  "Snippet",
47
46
  "SqlResults",
48
47
  "StatusEnum",
49
48
  "StructuredParseResult",
50
- "ToolModels",
51
49
  "Tools",
52
50
  "UrlResult",
53
51
  "ValidationError",
@@ -7,15 +7,8 @@ from ..core.datetime_utils import serialize_datetime
7
7
  from ..core.pydantic_utilities import pydantic_v1
8
8
 
9
9
 
10
- class PlanExecuteOut(pydantic_v1.BaseModel):
11
- input: str
12
- instructions: str
13
- input_data: str
14
- output_format: str
15
- plan: typing.List[str]
16
- past_steps: typing.List[typing.List[typing.Any]]
17
- final_output: str
18
- done: bool
10
+ class GetSnippetOut(pydantic_v1.BaseModel):
11
+ response: typing.Dict[str, typing.Any]
19
12
 
20
13
  def json(self, **kwargs: typing.Any) -> str:
21
14
  kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: athena-intelligence
3
- Version: 0.1.53
3
+ Version: 0.1.55
4
4
  Summary:
5
5
  Requires-Python: >=3.8,<4.0
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,11 +1,11 @@
1
- athena/__init__.py,sha256=PC9w42UGxMaPyahJJmpdqFI2bHiO_UCwKzb3qDp-eNA,1595
2
- athena/base_client.py,sha256=aniFuLr3wzh9PChzWZrkKV3ivSjOnS58p9g11dMXzgI,6860
1
+ athena/__init__.py,sha256=Zbr-pFLQvl_-yQBOb4j7BJGZi0wLMqIJIz0j8pxMLYU,1539
2
+ athena/base_client.py,sha256=fvX5_TUXA5iDSVojGglWQNSvXM3u22BaMtOJH2XyKEA,6659
3
3
  athena/chain/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
4
4
  athena/chain/client.py,sha256=2vSu7d4RvgbGc7jbWpKkCs5dU-ryCIJ1i0I1EsoCEdQ,16177
5
5
  athena/client.py,sha256=8QypiDlbZ0C1YsJh6GzhylLVCZXDQc1MCJTURo2_vvI,3576
6
6
  athena/core/__init__.py,sha256=1pNSKkwyQvMl_F0wohBqmoQAITptg3zlvCwsoSSzy7c,853
7
7
  athena/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
8
- athena/core/client_wrapper.py,sha256=k1GLaDbWSvPxjvxJi4BAD9ik3hGxVf0o_vAI0F7AozM,1495
8
+ athena/core/client_wrapper.py,sha256=HXPlUaczsH8KBCyCpO9Bs19vu3eOEz3Shucm9LT_ZEE,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
@@ -29,18 +29,17 @@ athena/report/client.py,sha256=rSNGKHf2wImbOmY06jXClMK3S5B4sQPCvQOPxrb9lXk,6623
29
29
  athena/search/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
30
30
  athena/search/client.py,sha256=8ukNlqy1Wv-uci1tJ7uz-lhOF6OK7_kF31kNO1MGpok,7610
31
31
  athena/snippet/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
32
- athena/snippet/client.py,sha256=7wVWdr4Ox6e5dAyEZIxuP0FUO4GHYOHMjJzwHvkyhcU,6182
33
- athena/tasks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
34
- athena/tasks/client.py,sha256=v9URzz_gWK25J0StAOdutLAm653W_mu5LfBBDAD6rwg,8234
32
+ athena/snippet/client.py,sha256=EE2ADdtSvk_c3-NkVMfwS1r29-y7YhozPoqXc4DPj8k,11323
35
33
  athena/tools/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
36
- athena/tools/client.py,sha256=Dv_XRrhnkmaqfhs1oon31gJl0UvSjMQ3Sy5o7QqH1ac,20114
37
- athena/types/__init__.py,sha256=gGzhE-aTRP85ByuzgB_EeqOPVYW4GBciDc7fghsXbLo,1799
34
+ athena/tools/client.py,sha256=eD5_pLFcWfeP4ECYHlsbnS_eyEz2vQgNZHnxIzXdeI8,20094
35
+ athena/types/__init__.py,sha256=oKVInlV6KCa5h-IUcxF66N0lDUQmb96DrUiceOhYSA4,1742
38
36
  athena/types/dataset.py,sha256=ShFYop4Pj-pscWrjWZQFboUmK5TDX3NzP0xNRZimpp8,994
39
37
  athena/types/document.py,sha256=evK_-wGk07kB8y5xyPMFCgqDbItuxCAawdUN20b6zFg,1061
40
38
  athena/types/excecute_tool_first_workflow_out.py,sha256=T4GxP3yzTY3XkumdpUdXbn8Tx_iNc1exed8N2SnwV2w,875
41
39
  athena/types/firecrawl_scrape_url_data_reponse_dto.py,sha256=-MkjjhzRTpuyoypLmiGtvH01TjeoVQxpX-HsALUSFUM,1001
42
40
  athena/types/firecrawl_scrape_url_metadata.py,sha256=kIKb0mMGxw7-49GSsagfx6AperguHDKOvODGPjFtOxU,1143
43
41
  athena/types/get_datasets_response.py,sha256=kbv8BI2nEo34-HJZV33dPhKWKrA1FiIS_OUkUYJj1ZQ,969
42
+ athena/types/get_snippet_out.py,sha256=AkkF6YJcYysiQVnOvhRerHMsHkBTu1BP9tYZC8wETmM,879
44
43
  athena/types/get_snippets_response.py,sha256=pgwYqmddU5shKeVaE4RQSFN9SLsVAeQp3sqIkQlvzoU,969
45
44
  athena/types/http_validation_error.py,sha256=u4t-1U0DI0u3Zj_Oz7AmGmpL4sqBzoS_5nZHImWQbmM,953
46
45
  athena/types/langchain_documents_request_out.py,sha256=O1v7mcgt0ryaY4e8YODpAHYJKyUY7jYFBc0s93A1sgo,892
@@ -49,18 +48,16 @@ athena/types/map_reduce_chain_out.py,sha256=6R-fuxHaww60dhUAuwrdZPp5lV-DyFZh9SGL
49
48
  athena/types/message_out.py,sha256=HJZizmFH7crD3OHm0fdTy3189F2gv5qR8aaUbTTfWFI,845
50
49
  athena/types/message_out_dto.py,sha256=1G8srlYaIYmoYRstLKm97xZGxK87DK57CiO9hYnt3gQ,1031
51
50
  athena/types/model.py,sha256=73jxfZPxAtK0iFex4bluPRrfpF5sY3Y6VFa9iALykBw,2991
52
- athena/types/plan_execute_out.py,sha256=g9RrUTu32KYm-r8acfZ8Gl4-jTOvFJ_Du1Rxv3YokcE,1034
53
51
  athena/types/report.py,sha256=km2CgCbHBXQQbPai1y5sGlsQpO7WAlUVvdsRC_7f4KI,926
54
52
  athena/types/snippet.py,sha256=Mrc92_hBABJQjCSToAA-FgwhvO-Jn8Kjm-lYI6aMlUY,1106
55
53
  athena/types/sql_results.py,sha256=ExPFds4vZ425AxGt0jhykbPhOjkplZPGQwVKb0LHg_g,880
56
54
  athena/types/status_enum.py,sha256=0UZbhdAx215GHC-U53RS98mYHtn1N3On4VBe4j02Qtc,672
57
55
  athena/types/structured_parse_result.py,sha256=fph7KrT_X_2BKDCOFN1UEufeaMmpSEvT0Oi6aM-e3kU,885
58
- athena/types/tool_models.py,sha256=ltl4RX0QhFIj_wsKLZMDip72_Ko7P-7v0aL9HACXVFo,1829
59
56
  athena/types/tools.py,sha256=mhRkKAwlsDud-fFOhsx2T3hBD-FAtuCnGHyU9cLPcGU,1422
60
57
  athena/types/url_result.py,sha256=lIgnQeyKy_UfFFPe7HMrrRzb-SK089RxcKcKN9Q3DNQ,873
61
58
  athena/types/validation_error.py,sha256=yqombbKLBSzTPFn6CJH_hbo7tpS68T3JvMdd7kBtO1g,972
62
59
  athena/types/validation_error_loc_item.py,sha256=LAtjCHIllWRBFXvAZ5QZpp7CPXjdtN9EB7HrLVo6EP0,128
63
60
  athena/version.py,sha256=8aYAOJtVLaJLpRp6mTiEIhnl8gXA7yE0aDtZ-3mKQ4k,87
64
- athena_intelligence-0.1.53.dist-info/METADATA,sha256=OcBG4Yy1co-2Em2MrnPWmfG4JYhkehndzWyVmHTr-m4,4738
65
- athena_intelligence-0.1.53.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
66
- athena_intelligence-0.1.53.dist-info/RECORD,,
61
+ athena_intelligence-0.1.55.dist-info/METADATA,sha256=iOTgR5BOzRsnlcw5jl4IJYerYEz5f_bdg1qCT7zHDJI,4738
62
+ athena_intelligence-0.1.55.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
63
+ athena_intelligence-0.1.55.dist-info/RECORD,,
athena/tasks/__init__.py DELETED
@@ -1,2 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
athena/tasks/client.py DELETED
@@ -1,191 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import typing
4
- import urllib.parse
5
- from json.decoder import JSONDecodeError
6
-
7
- from ..core.api_error import ApiError
8
- from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
9
- from ..core.jsonable_encoder import jsonable_encoder
10
- from ..core.pydantic_utilities import pydantic_v1
11
- from ..core.remove_none_from_dict import remove_none_from_dict
12
- from ..core.request_options import RequestOptions
13
- from ..errors.unprocessable_entity_error import UnprocessableEntityError
14
- from ..types.http_validation_error import HttpValidationError
15
- from ..types.plan_execute_out import PlanExecuteOut
16
- from ..types.tool_models import ToolModels
17
-
18
- # this is used as the default value for optional parameters
19
- OMIT = typing.cast(typing.Any, ...)
20
-
21
-
22
- class TasksClient:
23
- def __init__(self, *, client_wrapper: SyncClientWrapper):
24
- self._client_wrapper = client_wrapper
25
-
26
- def planned_task(
27
- self,
28
- *,
29
- model: ToolModels,
30
- instructions: str,
31
- input_data: str,
32
- output_format: str,
33
- request_options: typing.Optional[RequestOptions] = None,
34
- ) -> PlanExecuteOut:
35
- """
36
- Parameters:
37
- - model: ToolModels.
38
-
39
- - instructions: str.
40
-
41
- - input_data: str.
42
-
43
- - output_format: str.
44
-
45
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
46
- ---
47
- from athena import ToolModels
48
- from athena.client import Athena
49
-
50
- client = Athena(
51
- api_key="YOUR_API_KEY",
52
- )
53
- client.tasks.planned_task(
54
- model=ToolModels.MISTRAL_LARGE_0224,
55
- instructions="summarize the content",
56
- input_data="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.",
57
- output_format="return a summary in a single sentence",
58
- )
59
- """
60
- _response = self._client_wrapper.httpx_client.request(
61
- method="POST",
62
- url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tasks/planned-task"),
63
- params=jsonable_encoder(
64
- request_options.get("additional_query_parameters") if request_options is not None else None
65
- ),
66
- json=jsonable_encoder(
67
- {"model": model, "instructions": instructions, "input_data": input_data, "output_format": output_format}
68
- )
69
- if request_options is None or request_options.get("additional_body_parameters") is None
70
- else {
71
- **jsonable_encoder(
72
- {
73
- "model": model,
74
- "instructions": instructions,
75
- "input_data": input_data,
76
- "output_format": output_format,
77
- }
78
- ),
79
- **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
80
- },
81
- headers=jsonable_encoder(
82
- remove_none_from_dict(
83
- {
84
- **self._client_wrapper.get_headers(),
85
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
86
- }
87
- )
88
- ),
89
- timeout=request_options.get("timeout_in_seconds")
90
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
91
- else self._client_wrapper.get_timeout(),
92
- retries=0,
93
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
94
- )
95
- if 200 <= _response.status_code < 300:
96
- return pydantic_v1.parse_obj_as(PlanExecuteOut, _response.json()) # type: ignore
97
- if _response.status_code == 422:
98
- raise UnprocessableEntityError(
99
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
100
- )
101
- try:
102
- _response_json = _response.json()
103
- except JSONDecodeError:
104
- raise ApiError(status_code=_response.status_code, body=_response.text)
105
- raise ApiError(status_code=_response.status_code, body=_response_json)
106
-
107
-
108
- class AsyncTasksClient:
109
- def __init__(self, *, client_wrapper: AsyncClientWrapper):
110
- self._client_wrapper = client_wrapper
111
-
112
- async def planned_task(
113
- self,
114
- *,
115
- model: ToolModels,
116
- instructions: str,
117
- input_data: str,
118
- output_format: str,
119
- request_options: typing.Optional[RequestOptions] = None,
120
- ) -> PlanExecuteOut:
121
- """
122
- Parameters:
123
- - model: ToolModels.
124
-
125
- - instructions: str.
126
-
127
- - input_data: str.
128
-
129
- - output_format: str.
130
-
131
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
132
- ---
133
- from athena import ToolModels
134
- from athena.client import AsyncAthena
135
-
136
- client = AsyncAthena(
137
- api_key="YOUR_API_KEY",
138
- )
139
- await client.tasks.planned_task(
140
- model=ToolModels.MISTRAL_LARGE_0224,
141
- instructions="summarize the content",
142
- input_data="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.",
143
- output_format="return a summary in a single sentence",
144
- )
145
- """
146
- _response = await self._client_wrapper.httpx_client.request(
147
- method="POST",
148
- url=urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tasks/planned-task"),
149
- params=jsonable_encoder(
150
- request_options.get("additional_query_parameters") if request_options is not None else None
151
- ),
152
- json=jsonable_encoder(
153
- {"model": model, "instructions": instructions, "input_data": input_data, "output_format": output_format}
154
- )
155
- if request_options is None or request_options.get("additional_body_parameters") is None
156
- else {
157
- **jsonable_encoder(
158
- {
159
- "model": model,
160
- "instructions": instructions,
161
- "input_data": input_data,
162
- "output_format": output_format,
163
- }
164
- ),
165
- **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
166
- },
167
- headers=jsonable_encoder(
168
- remove_none_from_dict(
169
- {
170
- **self._client_wrapper.get_headers(),
171
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
172
- }
173
- )
174
- ),
175
- timeout=request_options.get("timeout_in_seconds")
176
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
177
- else self._client_wrapper.get_timeout(),
178
- retries=0,
179
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
180
- )
181
- if 200 <= _response.status_code < 300:
182
- return pydantic_v1.parse_obj_as(PlanExecuteOut, _response.json()) # type: ignore
183
- if _response.status_code == 422:
184
- raise UnprocessableEntityError(
185
- pydantic_v1.parse_obj_as(HttpValidationError, _response.json()) # type: ignore
186
- )
187
- try:
188
- _response_json = _response.json()
189
- except JSONDecodeError:
190
- raise ApiError(status_code=_response.status_code, body=_response.text)
191
- raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -1,49 +0,0 @@
1
- # This file was auto-generated by Fern from our API Definition.
2
-
3
- import enum
4
- import typing
5
-
6
- T_Result = typing.TypeVar("T_Result")
7
-
8
-
9
- class ToolModels(str, enum.Enum):
10
- """
11
- An enumeration.
12
- """
13
-
14
- GPT_4_TURBO = "gpt-4-turbo"
15
- GPT_4_TURBO_PREVIEW = "gpt-4-turbo-preview"
16
- GPT_4 = "gpt-4"
17
- MIXTRAL_SMALL_8_X_7_B_0211 = "mixtral-small-8x7b-0211"
18
- MISTRAL_LARGE_0224 = "mistral-large-0224"
19
- CLAUDE_3_OPUS_20240229 = "claude-3-opus-20240229"
20
- CLAUDE_3_SONNET_20240229 = "claude-3-sonnet-20240229"
21
- CLAUDE_3_HAIKU_20240307 = "claude-3-haiku-20240307"
22
-
23
- def visit(
24
- self,
25
- gpt_4_turbo: typing.Callable[[], T_Result],
26
- gpt_4_turbo_preview: typing.Callable[[], T_Result],
27
- gpt_4: typing.Callable[[], T_Result],
28
- mixtral_small_8_x_7_b_0211: typing.Callable[[], T_Result],
29
- mistral_large_0224: typing.Callable[[], T_Result],
30
- claude_3_opus_20240229: typing.Callable[[], T_Result],
31
- claude_3_sonnet_20240229: typing.Callable[[], T_Result],
32
- claude_3_haiku_20240307: typing.Callable[[], T_Result],
33
- ) -> T_Result:
34
- if self is ToolModels.GPT_4_TURBO:
35
- return gpt_4_turbo()
36
- if self is ToolModels.GPT_4_TURBO_PREVIEW:
37
- return gpt_4_turbo_preview()
38
- if self is ToolModels.GPT_4:
39
- return gpt_4()
40
- if self is ToolModels.MIXTRAL_SMALL_8_X_7_B_0211:
41
- return mixtral_small_8_x_7_b_0211()
42
- if self is ToolModels.MISTRAL_LARGE_0224:
43
- return mistral_large_0224()
44
- if self is ToolModels.CLAUDE_3_OPUS_20240229:
45
- return claude_3_opus_20240229()
46
- if self is ToolModels.CLAUDE_3_SONNET_20240229:
47
- return claude_3_sonnet_20240229()
48
- if self is ToolModels.CLAUDE_3_HAIKU_20240307:
49
- return claude_3_haiku_20240307()