exa-py 1.14.0__tar.gz → 1.14.1__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.14.0 → exa_py-1.14.1}/PKG-INFO +1 -1
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/research/client.py +15 -12
- {exa_py-1.14.0 → exa_py-1.14.1}/pyproject.toml +2 -2
- {exa_py-1.14.0 → exa_py-1.14.1}/README.md +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/api.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/py.typed +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/research/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/research/models.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/utils.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/_generator/pydantic/BaseModel.jinja2 +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/client.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/core/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/core/base.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/enrichments/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/enrichments/client.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/items/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/items/client.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/searches/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/searches/client.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/streams/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/streams/client.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/streams/runs/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/streams/runs/client.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/types.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/webhooks/__init__.py +0 -0
- {exa_py-1.14.0 → exa_py-1.14.1}/exa_py/websets/webhooks/client.py +0 -0
|
@@ -9,7 +9,7 @@ block, but at runtime we only pay the cost if/when a helper is actually used.
|
|
|
9
9
|
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
12
|
-
from typing import TYPE_CHECKING, Any, Dict, Optional
|
|
12
|
+
from typing import TYPE_CHECKING, Any, Dict, Optional, Literal
|
|
13
13
|
|
|
14
14
|
if TYPE_CHECKING: # pragma: no cover – only for static analysers
|
|
15
15
|
# Import with full type info when static type-checking. `_Result` still
|
|
@@ -39,15 +39,20 @@ class ResearchClient:
|
|
|
39
39
|
self,
|
|
40
40
|
*,
|
|
41
41
|
instructions: str,
|
|
42
|
-
model:
|
|
43
|
-
|
|
42
|
+
model: Literal["exa-research", "exa-research-pro"] = "exa-research",
|
|
43
|
+
output_infer_schema: bool = None,
|
|
44
|
+
output_schema: Dict[str, Any] = None,
|
|
44
45
|
) -> "ResearchTaskId":
|
|
45
46
|
"""Submit a research request and return the *task identifier*."""
|
|
46
|
-
payload = {
|
|
47
|
-
|
|
48
|
-
"model"
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
payload = {"instructions": instructions}
|
|
48
|
+
if model is not None:
|
|
49
|
+
payload["model"] = model
|
|
50
|
+
if output_schema is not None or output_infer_schema is not None:
|
|
51
|
+
payload["output"] = {}
|
|
52
|
+
if output_schema is not None:
|
|
53
|
+
payload["output"]["schema"] = output_schema
|
|
54
|
+
if output_infer_schema is not None:
|
|
55
|
+
payload["output"]["inferSchema"] = output_infer_schema
|
|
51
56
|
|
|
52
57
|
raw_response: Dict[str, Any] = self._client.request(
|
|
53
58
|
"/research/v0/tasks", payload
|
|
@@ -64,9 +69,7 @@ class ResearchClient:
|
|
|
64
69
|
|
|
65
70
|
return ResearchTaskId(id=raw_response["id"])
|
|
66
71
|
|
|
67
|
-
def get_task(
|
|
68
|
-
self, id: str
|
|
69
|
-
) -> "ResearchTask": # noqa: D401 – imperative mood is fine
|
|
72
|
+
def get_task(self, id: str) -> "ResearchTask": # noqa: D401 – imperative mood is fine
|
|
70
73
|
"""Fetch the current status / result for a research task."""
|
|
71
74
|
endpoint = f"/research/v0/tasks/{id}"
|
|
72
75
|
|
|
@@ -175,7 +178,7 @@ class AsyncResearchClient:
|
|
|
175
178
|
self,
|
|
176
179
|
*,
|
|
177
180
|
instructions: str,
|
|
178
|
-
model:
|
|
181
|
+
model: Literal["exa-research", "exa-research-pro"] = "exa-research",
|
|
179
182
|
output_schema: Dict[str, Any],
|
|
180
183
|
) -> "ResearchTaskId":
|
|
181
184
|
"""Submit a research request and return the *task identifier* (async)."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "exa-py"
|
|
3
|
-
version = "1.14.
|
|
3
|
+
version = "1.14.1"
|
|
4
4
|
description = "Python SDK for Exa API."
|
|
5
5
|
authors = ["Exa AI <hello@exa.ai>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -32,7 +32,7 @@ in-project = true
|
|
|
32
32
|
|
|
33
33
|
[project]
|
|
34
34
|
name = "exa-py"
|
|
35
|
-
version = "1.14.
|
|
35
|
+
version = "1.14.1"
|
|
36
36
|
description = "Python SDK for Exa API."
|
|
37
37
|
readme = "README.md"
|
|
38
38
|
requires-python = ">=3.9"
|
|
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
|
|
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
|