athena-intelligence 0.1.43__tar.gz → 0.1.45__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 (61) hide show
  1. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/PKG-INFO +1 -1
  2. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/pyproject.toml +1 -1
  3. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/__init__.py +0 -4
  4. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/core/client_wrapper.py +1 -1
  5. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/tools/client.py +0 -141
  6. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/__init__.py +0 -4
  7. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/model.py +12 -4
  8. athena_intelligence-0.1.43/src/athena/types/document.py +0 -34
  9. athena_intelligence-0.1.43/src/athena/types/langchain_documents_request_out.py +0 -29
  10. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/README.md +0 -0
  11. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/base_client.py +0 -0
  12. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/chain/__init__.py +0 -0
  13. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/chain/client.py +0 -0
  14. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/chain/types/__init__.py +0 -0
  15. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/chain/types/structured_parse_in_parsing_model.py +0 -0
  16. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/client.py +0 -0
  17. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/core/__init__.py +0 -0
  18. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/core/api_error.py +0 -0
  19. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/core/datetime_utils.py +0 -0
  20. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/core/file.py +0 -0
  21. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/core/http_client.py +0 -0
  22. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/core/jsonable_encoder.py +0 -0
  23. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/core/remove_none_from_dict.py +0 -0
  24. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/core/request_options.py +0 -0
  25. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/dataset/__init__.py +0 -0
  26. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/dataset/client.py +0 -0
  27. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/environment.py +0 -0
  28. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/errors/__init__.py +0 -0
  29. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/errors/unprocessable_entity_error.py +0 -0
  30. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/message/__init__.py +0 -0
  31. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/message/client.py +0 -0
  32. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/polling_message_client.py +0 -0
  33. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/py.typed +0 -0
  34. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/query/__init__.py +0 -0
  35. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/query/client.py +0 -0
  36. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/report/__init__.py +0 -0
  37. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/report/client.py +0 -0
  38. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/search/__init__.py +0 -0
  39. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/search/client.py +0 -0
  40. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/snippet/__init__.py +0 -0
  41. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/snippet/client.py +0 -0
  42. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/tools/__init__.py +0 -0
  43. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/dataset.py +0 -0
  44. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/excecute_tool_first_workflow_out.py +0 -0
  45. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/firecrawl_scrape_url_data_reponse_dto.py +0 -0
  46. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/firecrawl_scrape_url_metadata.py +0 -0
  47. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/get_datasets_response.py +0 -0
  48. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/get_snippets_response.py +0 -0
  49. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/http_validation_error.py +0 -0
  50. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/message_out.py +0 -0
  51. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/message_out_dto.py +0 -0
  52. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/report.py +0 -0
  53. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/snippet.py +0 -0
  54. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/sql_results.py +0 -0
  55. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/status_enum.py +0 -0
  56. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/structured_parse_result.py +0 -0
  57. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/tool_models.py +0 -0
  58. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/tools.py +0 -0
  59. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/url_result.py +0 -0
  60. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/src/athena/types/validation_error.py +0 -0
  61. {athena_intelligence-0.1.43 → athena_intelligence-0.1.45}/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.43
3
+ Version: 0.1.45
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.43"
3
+ version = "0.1.45"
4
4
  description = ""
5
5
  readme = "README.md"
6
6
  authors = []
@@ -2,14 +2,12 @@
2
2
 
3
3
  from .types import (
4
4
  Dataset,
5
- Document,
6
5
  ExcecuteToolFirstWorkflowOut,
7
6
  FirecrawlScrapeUrlDataReponseDto,
8
7
  FirecrawlScrapeUrlMetadata,
9
8
  GetDatasetsResponse,
10
9
  GetSnippetsResponse,
11
10
  HttpValidationError,
12
- LangchainDocumentsRequestOut,
13
11
  MessageOut,
14
12
  MessageOutDto,
15
13
  Model,
@@ -32,14 +30,12 @@ from .environment import AthenaEnvironment
32
30
  __all__ = [
33
31
  "AthenaEnvironment",
34
32
  "Dataset",
35
- "Document",
36
33
  "ExcecuteToolFirstWorkflowOut",
37
34
  "FirecrawlScrapeUrlDataReponseDto",
38
35
  "FirecrawlScrapeUrlMetadata",
39
36
  "GetDatasetsResponse",
40
37
  "GetSnippetsResponse",
41
38
  "HttpValidationError",
42
- "LangchainDocumentsRequestOut",
43
39
  "MessageOut",
44
40
  "MessageOutDto",
45
41
  "Model",
@@ -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.43",
19
+ "X-Fern-SDK-Version": "0.1.45",
20
20
  }
21
21
  headers["X-API-KEY"] = self.api_key
22
22
  return headers
@@ -13,7 +13,6 @@ from ..errors.unprocessable_entity_error import UnprocessableEntityError
13
13
  from ..types.excecute_tool_first_workflow_out import ExcecuteToolFirstWorkflowOut
14
14
  from ..types.firecrawl_scrape_url_data_reponse_dto import FirecrawlScrapeUrlDataReponseDto
15
15
  from ..types.http_validation_error import HttpValidationError
16
- from ..types.langchain_documents_request_out import LangchainDocumentsRequestOut
17
16
  from ..types.tool_models import ToolModels
18
17
 
19
18
  try:
@@ -92,76 +91,6 @@ class ToolsClient:
92
91
  raise ApiError(status_code=_response.status_code, body=_response.text)
93
92
  raise ApiError(status_code=_response.status_code, body=_response_json)
94
93
 
95
- def langchain_documents(
96
- self,
97
- *,
98
- document_id: str,
99
- pagination_limit: typing.Optional[int] = OMIT,
100
- pagination_offset: typing.Optional[int] = OMIT,
101
- request_options: typing.Optional[RequestOptions] = None,
102
- ) -> LangchainDocumentsRequestOut:
103
- """
104
- Parameters:
105
- - document_id: str.
106
-
107
- - pagination_limit: typing.Optional[int].
108
-
109
- - pagination_offset: typing.Optional[int].
110
-
111
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
112
- ---
113
- from athena.client import Athena
114
-
115
- client = Athena(
116
- api_key="YOUR_API_KEY",
117
- )
118
- client.tools.langchain_documents(
119
- document_id="doc_9249292-d118-42d3-95b4-00eccfe0754f",
120
- pagination_limit=250,
121
- pagination_offset=0,
122
- )
123
- """
124
- _request: typing.Dict[str, typing.Any] = {"document_id": document_id}
125
- if pagination_limit is not OMIT:
126
- _request["pagination_limit"] = pagination_limit
127
- if pagination_offset is not OMIT:
128
- _request["pagination_offset"] = pagination_offset
129
- _response = self._client_wrapper.httpx_client.request(
130
- "POST",
131
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/langchain-documents"),
132
- params=jsonable_encoder(
133
- request_options.get("additional_query_parameters") if request_options is not None else None
134
- ),
135
- json=jsonable_encoder(_request)
136
- if request_options is None or request_options.get("additional_body_parameters") is None
137
- else {
138
- **jsonable_encoder(_request),
139
- **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
140
- },
141
- headers=jsonable_encoder(
142
- remove_none_from_dict(
143
- {
144
- **self._client_wrapper.get_headers(),
145
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
146
- }
147
- )
148
- ),
149
- timeout=request_options.get("timeout_in_seconds")
150
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
151
- else 60,
152
- retries=0,
153
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
154
- )
155
- if 200 <= _response.status_code < 300:
156
- return pydantic.parse_obj_as(LangchainDocumentsRequestOut, _response.json()) # type: ignore
157
- if _response.status_code == 422:
158
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
159
- try:
160
- _response_json = _response.json()
161
- except JSONDecodeError:
162
- raise ApiError(status_code=_response.status_code, body=_response.text)
163
- raise ApiError(status_code=_response.status_code, body=_response_json)
164
-
165
94
  def tool_first_workflow(
166
95
  self,
167
96
  *,
@@ -305,76 +234,6 @@ class AsyncToolsClient:
305
234
  raise ApiError(status_code=_response.status_code, body=_response.text)
306
235
  raise ApiError(status_code=_response.status_code, body=_response_json)
307
236
 
308
- async def langchain_documents(
309
- self,
310
- *,
311
- document_id: str,
312
- pagination_limit: typing.Optional[int] = OMIT,
313
- pagination_offset: typing.Optional[int] = OMIT,
314
- request_options: typing.Optional[RequestOptions] = None,
315
- ) -> LangchainDocumentsRequestOut:
316
- """
317
- Parameters:
318
- - document_id: str.
319
-
320
- - pagination_limit: typing.Optional[int].
321
-
322
- - pagination_offset: typing.Optional[int].
323
-
324
- - request_options: typing.Optional[RequestOptions]. Request-specific configuration.
325
- ---
326
- from athena.client import AsyncAthena
327
-
328
- client = AsyncAthena(
329
- api_key="YOUR_API_KEY",
330
- )
331
- await client.tools.langchain_documents(
332
- document_id="doc_9249292-d118-42d3-95b4-00eccfe0754f",
333
- pagination_limit=250,
334
- pagination_offset=0,
335
- )
336
- """
337
- _request: typing.Dict[str, typing.Any] = {"document_id": document_id}
338
- if pagination_limit is not OMIT:
339
- _request["pagination_limit"] = pagination_limit
340
- if pagination_offset is not OMIT:
341
- _request["pagination_offset"] = pagination_offset
342
- _response = await self._client_wrapper.httpx_client.request(
343
- "POST",
344
- urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "api/v0/tools/file/langchain-documents"),
345
- params=jsonable_encoder(
346
- request_options.get("additional_query_parameters") if request_options is not None else None
347
- ),
348
- json=jsonable_encoder(_request)
349
- if request_options is None or request_options.get("additional_body_parameters") is None
350
- else {
351
- **jsonable_encoder(_request),
352
- **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))),
353
- },
354
- headers=jsonable_encoder(
355
- remove_none_from_dict(
356
- {
357
- **self._client_wrapper.get_headers(),
358
- **(request_options.get("additional_headers", {}) if request_options is not None else {}),
359
- }
360
- )
361
- ),
362
- timeout=request_options.get("timeout_in_seconds")
363
- if request_options is not None and request_options.get("timeout_in_seconds") is not None
364
- else 60,
365
- retries=0,
366
- max_retries=request_options.get("max_retries") if request_options is not None else 0, # type: ignore
367
- )
368
- if 200 <= _response.status_code < 300:
369
- return pydantic.parse_obj_as(LangchainDocumentsRequestOut, _response.json()) # type: ignore
370
- if _response.status_code == 422:
371
- raise UnprocessableEntityError(pydantic.parse_obj_as(HttpValidationError, _response.json())) # type: ignore
372
- try:
373
- _response_json = _response.json()
374
- except JSONDecodeError:
375
- raise ApiError(status_code=_response.status_code, body=_response.text)
376
- raise ApiError(status_code=_response.status_code, body=_response_json)
377
-
378
237
  async def tool_first_workflow(
379
238
  self,
380
239
  *,
@@ -1,14 +1,12 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from .dataset import Dataset
4
- from .document import Document
5
4
  from .excecute_tool_first_workflow_out import ExcecuteToolFirstWorkflowOut
6
5
  from .firecrawl_scrape_url_data_reponse_dto import FirecrawlScrapeUrlDataReponseDto
7
6
  from .firecrawl_scrape_url_metadata import FirecrawlScrapeUrlMetadata
8
7
  from .get_datasets_response import GetDatasetsResponse
9
8
  from .get_snippets_response import GetSnippetsResponse
10
9
  from .http_validation_error import HttpValidationError
11
- from .langchain_documents_request_out import LangchainDocumentsRequestOut
12
10
  from .message_out import MessageOut
13
11
  from .message_out_dto import MessageOutDto
14
12
  from .model import Model
@@ -25,14 +23,12 @@ from .validation_error_loc_item import ValidationErrorLocItem
25
23
 
26
24
  __all__ = [
27
25
  "Dataset",
28
- "Document",
29
26
  "ExcecuteToolFirstWorkflowOut",
30
27
  "FirecrawlScrapeUrlDataReponseDto",
31
28
  "FirecrawlScrapeUrlMetadata",
32
29
  "GetDatasetsResponse",
33
30
  "GetSnippetsResponse",
34
31
  "HttpValidationError",
35
- "LangchainDocumentsRequestOut",
36
32
  "MessageOut",
37
33
  "MessageOutDto",
38
34
  "Model",
@@ -17,8 +17,10 @@ class Model(str, enum.Enum):
17
17
  GPT_4 = "gpt-4"
18
18
  MIXTRAL_SMALL_8_X_7_B_0211 = "mixtral-small-8x7b-0211"
19
19
  MISTRAL_LARGE_0224 = "mistral-large-0224"
20
- MIXTRAL_8_X_22_B_INSTRUCT_HF = "mixtral-8x22b-instruct-hf"
20
+ MIXTRAL_8_X_22_B_INSTRUCT = "mixtral-8x22b-instruct"
21
21
  LLAMA_V_270_B_CHAT = "llama-v2-70b-chat"
22
+ LLAMA_V_370_B_INSTRUCT = "llama-v3-70b-instruct"
23
+ LLAMA_V_38_B_INSTRUCT = "llama-v3-8b-instruct"
22
24
  CLAUDE_3_OPUS_20240229 = "claude-3-opus-20240229"
23
25
  CLAUDE_3_SONNET_20240229 = "claude-3-sonnet-20240229"
24
26
  CLAUDE_3_HAIKU_20240307 = "claude-3-haiku-20240307"
@@ -33,8 +35,10 @@ class Model(str, enum.Enum):
33
35
  gpt_4: typing.Callable[[], T_Result],
34
36
  mixtral_small_8_x_7_b_0211: typing.Callable[[], T_Result],
35
37
  mistral_large_0224: typing.Callable[[], T_Result],
36
- mixtral_8_x_22_b_instruct_hf: typing.Callable[[], T_Result],
38
+ mixtral_8_x_22_b_instruct: typing.Callable[[], T_Result],
37
39
  llama_v_270_b_chat: typing.Callable[[], T_Result],
40
+ llama_v_370_b_instruct: typing.Callable[[], T_Result],
41
+ llama_v_38_b_instruct: typing.Callable[[], T_Result],
38
42
  claude_3_opus_20240229: typing.Callable[[], T_Result],
39
43
  claude_3_sonnet_20240229: typing.Callable[[], T_Result],
40
44
  claude_3_haiku_20240307: typing.Callable[[], T_Result],
@@ -53,10 +57,14 @@ class Model(str, enum.Enum):
53
57
  return mixtral_small_8_x_7_b_0211()
54
58
  if self is Model.MISTRAL_LARGE_0224:
55
59
  return mistral_large_0224()
56
- if self is Model.MIXTRAL_8_X_22_B_INSTRUCT_HF:
57
- return mixtral_8_x_22_b_instruct_hf()
60
+ if self is Model.MIXTRAL_8_X_22_B_INSTRUCT:
61
+ return mixtral_8_x_22_b_instruct()
58
62
  if self is Model.LLAMA_V_270_B_CHAT:
59
63
  return llama_v_270_b_chat()
64
+ if self is Model.LLAMA_V_370_B_INSTRUCT:
65
+ return llama_v_370_b_instruct()
66
+ if self is Model.LLAMA_V_38_B_INSTRUCT:
67
+ return llama_v_38_b_instruct()
60
68
  if self is Model.CLAUDE_3_OPUS_20240229:
61
69
  return claude_3_opus_20240229()
62
70
  if self is Model.CLAUDE_3_SONNET_20240229:
@@ -1,34 +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
-
8
- try:
9
- import pydantic.v1 as pydantic # type: ignore
10
- except ImportError:
11
- import pydantic # type: ignore
12
-
13
-
14
- class Document(pydantic.BaseModel):
15
- """
16
- Class for storing a piece of text and associated metadata.
17
- """
18
-
19
- page_content: str
20
- metadata: typing.Optional[typing.Dict[str, typing.Any]] = None
21
- type: typing.Optional[typing.Literal["Document"]] = None
22
-
23
- def json(self, **kwargs: typing.Any) -> str:
24
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
- return super().json(**kwargs_with_defaults)
26
-
27
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
29
- return super().dict(**kwargs_with_defaults)
30
-
31
- class Config:
32
- frozen = True
33
- smart_union = True
34
- json_encoders = {dt.datetime: serialize_datetime}
@@ -1,29 +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 .document import Document
8
-
9
- try:
10
- import pydantic.v1 as pydantic # type: ignore
11
- except ImportError:
12
- import pydantic # type: ignore
13
-
14
-
15
- class LangchainDocumentsRequestOut(pydantic.BaseModel):
16
- documents: typing.List[Document]
17
-
18
- def json(self, **kwargs: typing.Any) -> str:
19
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
- return super().json(**kwargs_with_defaults)
21
-
22
- def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23
- kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
- return super().dict(**kwargs_with_defaults)
25
-
26
- class Config:
27
- frozen = True
28
- smart_union = True
29
- json_encoders = {dt.datetime: serialize_datetime}