athena-intelligence 0.1.53__tar.gz → 0.1.55__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.53 → athena_intelligence-0.1.55}/PKG-INFO +1 -1
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/pyproject.toml +1 -1
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/__init__.py +3 -6
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/base_client.py +0 -3
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/client_wrapper.py +1 -1
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/snippet/client.py +112 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/tools/client.py +9 -9
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/__init__.py +2 -4
- athena_intelligence-0.1.55/src/athena/types/get_snippet_out.py +25 -0
- athena_intelligence-0.1.53/src/athena/tasks/client.py +0 -191
- athena_intelligence-0.1.53/src/athena/tools/__init__.py +0 -2
- athena_intelligence-0.1.53/src/athena/types/plan_execute_out.py +0 -32
- athena_intelligence-0.1.53/src/athena/types/tool_models.py +0 -49
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/README.md +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/chain/__init__.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/chain/client.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/client.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/__init__.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/api_error.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/datetime_utils.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/file.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/http_client.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/jsonable_encoder.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/pydantic_utilities.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/remove_none_from_dict.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/request_options.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/dataset/__init__.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/dataset/client.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/environment.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/errors/__init__.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/errors/unprocessable_entity_error.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/message/__init__.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/message/client.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/polling_message_client.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/py.typed +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/query/__init__.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/query/client.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/report/__init__.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/report/client.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/search/__init__.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/search/client.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/snippet/__init__.py +0 -0
- {athena_intelligence-0.1.53/src/athena/tasks → athena_intelligence-0.1.55/src/athena/tools}/__init__.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/dataset.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/document.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/excecute_tool_first_workflow_out.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/firecrawl_scrape_url_data_reponse_dto.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/firecrawl_scrape_url_metadata.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/get_datasets_response.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/get_snippets_response.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/http_validation_error.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/langchain_documents_request_out.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/llm_model.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/map_reduce_chain_out.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/message_out.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/message_out_dto.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/model.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/report.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/snippet.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/sql_results.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/status_enum.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/structured_parse_result.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/tools.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/url_result.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/validation_error.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/validation_error_loc_item.py +0 -0
- {athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/version.py +0 -0
@@ -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,
|
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
|
]
|
@@ -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.
|
20
|
+
"X-Fern-SDK-Version": "0.1.55",
|
21
21
|
}
|
22
22
|
headers["X-API-KEY"] = self.api_key
|
23
23
|
return headers
|
@@ -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)
|
@@ -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.
|
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[
|
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[
|
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
|
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=
|
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[
|
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[
|
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
|
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=
|
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"},
|
@@ -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",
|
@@ -0,0 +1,25 @@
|
|
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 GetSnippetOut(pydantic_v1.BaseModel):
|
11
|
+
response: 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: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
19
|
+
return super().dict(**kwargs_with_defaults)
|
20
|
+
|
21
|
+
class Config:
|
22
|
+
frozen = True
|
23
|
+
smart_union = True
|
24
|
+
extra = pydantic_v1.Extra.allow
|
25
|
+
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -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,32 +0,0 @@
|
|
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 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
|
19
|
-
|
20
|
-
def json(self, **kwargs: typing.Any) -> str:
|
21
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
22
|
-
return super().json(**kwargs_with_defaults)
|
23
|
-
|
24
|
-
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
|
25
|
-
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
|
26
|
-
return super().dict(**kwargs_with_defaults)
|
27
|
-
|
28
|
-
class Config:
|
29
|
-
frozen = True
|
30
|
-
smart_union = True
|
31
|
-
extra = pydantic_v1.Extra.allow
|
32
|
-
json_encoders = {dt.datetime: serialize_datetime}
|
@@ -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()
|
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.53 → athena_intelligence-0.1.55}/src/athena/core/jsonable_encoder.py
RENAMED
File without changes
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/pydantic_utilities.py
RENAMED
File without changes
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/remove_none_from_dict.py
RENAMED
File without changes
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/core/request_options.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
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/get_datasets_response.py
RENAMED
File without changes
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/get_snippets_response.py
RENAMED
File without changes
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/http_validation_error.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/map_reduce_chain_out.py
RENAMED
File without changes
|
File without changes
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/message_out_dto.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
|
{athena_intelligence-0.1.53 → athena_intelligence-0.1.55}/src/athena/types/validation_error.py
RENAMED
File without changes
|
File without changes
|
File without changes
|