exa-py 1.1.7__py3-none-any.whl → 1.2.0__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.
Potentially problematic release.
This version of exa-py might be problematic. Click here for more details.
- exa_py/__init__.py +1 -3
- exa_py/api.py +4 -8
- {exa_py-1.1.7.dist-info → exa_py-1.2.0.dist-info}/METADATA +3 -7
- exa_py-1.2.0.dist-info/RECORD +8 -0
- {exa_py-1.1.7.dist-info → exa_py-1.2.0.dist-info}/WHEEL +1 -1
- exa_py-1.1.7.dist-info/RECORD +0 -8
- {exa_py-1.1.7.dist-info → exa_py-1.2.0.dist-info}/top_level.txt +0 -0
exa_py/__init__.py
CHANGED
exa_py/api.py
CHANGED
|
@@ -148,7 +148,7 @@ CONTENTS_OPTIONS_TYPES = {
|
|
|
148
148
|
|
|
149
149
|
# FOR BETA OPTIONS
|
|
150
150
|
# if is_beta:
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
|
|
153
153
|
def validate_search_options(
|
|
154
154
|
options: Dict[str, Optional[object]], expected: dict
|
|
@@ -233,6 +233,7 @@ class _Result:
|
|
|
233
233
|
score: Optional[float] = None
|
|
234
234
|
published_date: Optional[str] = None
|
|
235
235
|
author: Optional[str] = None
|
|
236
|
+
image: Optional[str] = None
|
|
236
237
|
|
|
237
238
|
def __str__(self):
|
|
238
239
|
return (
|
|
@@ -242,6 +243,7 @@ class _Result:
|
|
|
242
243
|
f"Score: {self.score}\n"
|
|
243
244
|
f"Published Date: {self.published_date}\n"
|
|
244
245
|
f"Author: {self.author}\n"
|
|
246
|
+
f"Image: {self.image}\n"
|
|
245
247
|
)
|
|
246
248
|
|
|
247
249
|
|
|
@@ -466,7 +468,7 @@ class Exa:
|
|
|
466
468
|
self,
|
|
467
469
|
api_key: Optional[str],
|
|
468
470
|
base_url: str = "https://api.exa.ai",
|
|
469
|
-
user_agent: str = "exa-py 1.0
|
|
471
|
+
user_agent: str = "exa-py 1.2.0",
|
|
470
472
|
):
|
|
471
473
|
"""Initialize the Exa client with the provided API key and optional base URL and user agent.
|
|
472
474
|
|
|
@@ -1171,10 +1173,6 @@ class Exa:
|
|
|
1171
1173
|
**openai_kwargs,
|
|
1172
1174
|
}
|
|
1173
1175
|
|
|
1174
|
-
if use_exa != "none":
|
|
1175
|
-
assert "tools" not in create_kwargs, "Tool use is not supported with Exa"
|
|
1176
|
-
create_kwargs["tool_choice"] = use_exa
|
|
1177
|
-
|
|
1178
1176
|
return self._create_with_tool(
|
|
1179
1177
|
create_fn=func,
|
|
1180
1178
|
messages=list(messages),
|
|
@@ -1228,8 +1226,6 @@ class Exa:
|
|
|
1228
1226
|
exa_result = self.search_and_contents(query, **exa_kwargs)
|
|
1229
1227
|
exa_str = format_exa_result(exa_result, max_len=max_len)
|
|
1230
1228
|
new_messages = add_message_to_messages(completion, messages, exa_str)
|
|
1231
|
-
# For now, don't allow recursive tool calls
|
|
1232
|
-
create_kwargs["tool_choice"] = "none"
|
|
1233
1229
|
completion = create_fn(messages=new_messages, **create_kwargs)
|
|
1234
1230
|
|
|
1235
1231
|
exa_completion = ExaOpenAICompletion.from_completion(
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
|
-
Name:
|
|
3
|
-
Version: 1.
|
|
2
|
+
Name: exa_py
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Python SDK for Exa API.
|
|
5
5
|
Home-page: https://github.com/exa-labs/exa-py
|
|
6
6
|
Author: Exa
|
|
7
7
|
Author-email: hello@exa.ai
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Platform: UNKNOWN
|
|
10
8
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
9
|
Classifier: Intended Audience :: Developers
|
|
12
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -19,7 +17,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
19
17
|
Description-Content-Type: text/markdown
|
|
20
18
|
Requires-Dist: requests
|
|
21
19
|
Requires-Dist: typing-extensions
|
|
22
|
-
Requires-Dist: openai
|
|
20
|
+
Requires-Dist: openai >=1.10.0
|
|
23
21
|
|
|
24
22
|
# Exa
|
|
25
23
|
|
|
@@ -94,5 +92,3 @@ exa = Exa(api_key="your-api-key")
|
|
|
94
92
|
highlights={"highlights_per_url": 2, "num_sentences": 1, "query": "This is the highlight query:"})
|
|
95
93
|
```
|
|
96
94
|
|
|
97
|
-
|
|
98
|
-
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
exa_py/__init__.py,sha256=1selemczpRm1y8V9cWNm90LARnU1jbtyp-Qpx3c7cTw,28
|
|
2
|
+
exa_py/api.py,sha256=u3F8ni1B83G8_TMMMGGslCYggXMshcvcnO-z8fIP_kQ,46431
|
|
3
|
+
exa_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
|
|
5
|
+
exa_py-1.2.0.dist-info/METADATA,sha256=r0mIsIp2Tx8O4mtYxvuQfH4QaiQa3YaURzQp6nl_xXw,3030
|
|
6
|
+
exa_py-1.2.0.dist-info/WHEEL,sha256=pL8R0wFFS65tNSRnaOVrsw9EOkOqxLrlUPenUYnJKNo,91
|
|
7
|
+
exa_py-1.2.0.dist-info/top_level.txt,sha256=Mfkmscdw9HWR1PtVhU1gAiVo6DHu_tyiVdb89gfZBVI,7
|
|
8
|
+
exa_py-1.2.0.dist-info/RECORD,,
|
exa_py-1.1.7.dist-info/RECORD
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
exa_py/__init__.py,sha256=aVF1zB_UV3dagJ5Vn2WrdcInzibdIW61M89sjwRCU_g,29
|
|
2
|
-
exa_py/api.py,sha256=Ew0bqFsCVC5NyD7BJ9fVT292v3z3Axz7cbi_ci-om1k,46645
|
|
3
|
-
exa_py/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
exa_py/utils.py,sha256=Rc1FJjoR9LQ7L_OJM91Sd1GNkbHjcLyEvJENhRix6gc,2405
|
|
5
|
-
exa_py-1.1.7.dist-info/METADATA,sha256=FCuU11OAguAvMwWQEbEOtWvRDx3cn93aS9QFeZS1MNg,3069
|
|
6
|
-
exa_py-1.1.7.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
|
7
|
-
exa_py-1.1.7.dist-info/top_level.txt,sha256=Mfkmscdw9HWR1PtVhU1gAiVo6DHu_tyiVdb89gfZBVI,7
|
|
8
|
-
exa_py-1.1.7.dist-info/RECORD,,
|
|
File without changes
|