exa-py 1.8.7__tar.gz → 1.8.8__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.
Potentially problematic release.
This version of exa-py might be problematic. Click here for more details.
- {exa_py-1.8.7 → exa_py-1.8.8}/PKG-INFO +3 -3
- {exa_py-1.8.7 → exa_py-1.8.8}/README.md +2 -2
- {exa_py-1.8.7 → exa_py-1.8.8}/exa_py/api.py +12 -2
- {exa_py-1.8.7 → exa_py-1.8.8}/pyproject.toml +1 -1
- exa_py-1.8.7/exa_py/example.py +0 -11
- {exa_py-1.8.7 → exa_py-1.8.8}/exa_py/__init__.py +0 -0
- {exa_py-1.8.7 → exa_py-1.8.8}/exa_py/py.typed +0 -0
- {exa_py-1.8.7 → exa_py-1.8.8}/exa_py/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: exa-py
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.8
|
|
4
4
|
Summary: Python SDK for Exa API.
|
|
5
5
|
Author: Exa AI
|
|
6
6
|
Author-email: hello@exa.ai
|
|
@@ -91,8 +91,8 @@ exa = Exa(api_key="your-api-key")
|
|
|
91
91
|
# basic answer
|
|
92
92
|
response = exa.answer("This is a query to answer a question")
|
|
93
93
|
|
|
94
|
-
# answer with full text
|
|
95
|
-
response = exa.answer("This is a query to answer a question", text=True)
|
|
94
|
+
# answer with full text, using the exa-pro model (sends 2 expanded quries to exa search)
|
|
95
|
+
response = exa.answer("This is a query to answer a question", text=True, model="exa-pro")
|
|
96
96
|
|
|
97
97
|
# answer with streaming
|
|
98
98
|
response = exa.stream_answer("This is a query to answer:")
|
|
@@ -73,8 +73,8 @@ exa = Exa(api_key="your-api-key")
|
|
|
73
73
|
# basic answer
|
|
74
74
|
response = exa.answer("This is a query to answer a question")
|
|
75
75
|
|
|
76
|
-
# answer with full text
|
|
77
|
-
response = exa.answer("This is a query to answer a question", text=True)
|
|
76
|
+
# answer with full text, using the exa-pro model (sends 2 expanded quries to exa search)
|
|
77
|
+
response = exa.answer("This is a query to answer a question", text=True, model="exa-pro")
|
|
78
78
|
|
|
79
79
|
# answer with streaming
|
|
80
80
|
response = exa.stream_answer("This is a query to answer:")
|
|
@@ -686,7 +686,7 @@ class Exa:
|
|
|
686
686
|
self,
|
|
687
687
|
api_key: Optional[str],
|
|
688
688
|
base_url: str = "https://api.exa.ai",
|
|
689
|
-
user_agent: str = "exa-py 1.8.
|
|
689
|
+
user_agent: str = "exa-py 1.8.8",
|
|
690
690
|
):
|
|
691
691
|
"""Initialize the Exa client with the provided API key and optional base URL and user agent.
|
|
692
692
|
|
|
@@ -826,6 +826,8 @@ class Exa:
|
|
|
826
826
|
use_autoprompt: Optional[bool] = None,
|
|
827
827
|
type: Optional[str] = None,
|
|
828
828
|
category: Optional[str] = None,
|
|
829
|
+
flags: Optional[List[str]] = None,
|
|
830
|
+
moderation: Optional[bool] = None,
|
|
829
831
|
subpages: Optional[int] = None,
|
|
830
832
|
livecrawl_timeout: Optional[int] = None,
|
|
831
833
|
livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
|
|
@@ -974,6 +976,8 @@ class Exa:
|
|
|
974
976
|
category: Optional[str] = None,
|
|
975
977
|
subpages: Optional[int] = None,
|
|
976
978
|
subpage_target: Optional[Union[str, List[str]]] = None,
|
|
979
|
+
flags: Optional[List[str]] = None,
|
|
980
|
+
moderation: Optional[bool] = None,
|
|
977
981
|
livecrawl_timeout: Optional[int] = None,
|
|
978
982
|
livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
|
|
979
983
|
filter_empty_results: Optional[bool] = None,
|
|
@@ -1002,11 +1006,12 @@ class Exa:
|
|
|
1002
1006
|
type: Optional[str] = None,
|
|
1003
1007
|
category: Optional[str] = None,
|
|
1004
1008
|
flags: Optional[List[str]] = None,
|
|
1009
|
+
moderation: Optional[bool] = None,
|
|
1005
1010
|
livecrawl_timeout: Optional[int] = None,
|
|
1006
1011
|
livecrawl: Optional[LIVECRAWL_OPTIONS] = None,
|
|
1007
|
-
filter_empty_results: Optional[bool] = None,
|
|
1008
1012
|
subpages: Optional[int] = None,
|
|
1009
1013
|
subpage_target: Optional[Union[str, List[str]]] = None,
|
|
1014
|
+
filter_empty_results: Optional[bool] = None,
|
|
1010
1015
|
extras: Optional[ExtrasOptions] = None,
|
|
1011
1016
|
) -> SearchResponse[ResultWithTextAndHighlightsAndSummary]:
|
|
1012
1017
|
...
|
|
@@ -1656,6 +1661,7 @@ class Exa:
|
|
|
1656
1661
|
*,
|
|
1657
1662
|
stream: Optional[bool] = False,
|
|
1658
1663
|
text: Optional[bool] = False,
|
|
1664
|
+
model: Optional[Literal["exa", "exa-pro"]] = None,
|
|
1659
1665
|
) -> Union[AnswerResponse, StreamAnswerResponse]:
|
|
1660
1666
|
...
|
|
1661
1667
|
|
|
@@ -1665,12 +1671,14 @@ class Exa:
|
|
|
1665
1671
|
*,
|
|
1666
1672
|
stream: Optional[bool] = False,
|
|
1667
1673
|
text: Optional[bool] = False,
|
|
1674
|
+
model: Optional[Literal["exa", "exa-pro"]] = None,
|
|
1668
1675
|
) -> Union[AnswerResponse, StreamAnswerResponse]:
|
|
1669
1676
|
"""Generate an answer to a query using Exa's search and LLM capabilities.
|
|
1670
1677
|
|
|
1671
1678
|
Args:
|
|
1672
1679
|
query (str): The query to answer.
|
|
1673
1680
|
text (bool, optional): Whether to include full text in the results. Defaults to False.
|
|
1681
|
+
model (str, optional): The model to use for answering. Either "exa" or "exa-pro". Defaults to None.
|
|
1674
1682
|
|
|
1675
1683
|
Returns:
|
|
1676
1684
|
AnswerResponse: An object containing the answer and citations.
|
|
@@ -1702,12 +1710,14 @@ class Exa:
|
|
|
1702
1710
|
query: str,
|
|
1703
1711
|
*,
|
|
1704
1712
|
text: bool = False,
|
|
1713
|
+
model: Optional[Literal["exa", "exa-pro"]] = None,
|
|
1705
1714
|
) -> StreamAnswerResponse:
|
|
1706
1715
|
"""Generate a streaming answer response.
|
|
1707
1716
|
|
|
1708
1717
|
Args:
|
|
1709
1718
|
query (str): The query to answer.
|
|
1710
1719
|
text (bool): Whether to include full text in the results. Defaults to False.
|
|
1720
|
+
model (str, optional): The model to use for answering. Either "exa" or "exa-pro". Defaults to None.
|
|
1711
1721
|
|
|
1712
1722
|
Returns:
|
|
1713
1723
|
StreamAnswerResponse: An object that can be iterated over to retrieve (partial text, partial citations).
|
exa_py-1.8.7/exa_py/example.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|