exa-py 1.0.17__tar.gz → 1.0.18__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.0.17 → exa_py-1.0.18}/PKG-INFO +1 -1
- {exa_py-1.0.17 → exa_py-1.0.18}/exa_py/api.py +11 -1
- {exa_py-1.0.17 → exa_py-1.0.18}/exa_py.egg-info/PKG-INFO +1 -1
- {exa_py-1.0.17 → exa_py-1.0.18}/setup.py +1 -1
- {exa_py-1.0.17 → exa_py-1.0.18}/README.md +0 -0
- {exa_py-1.0.17 → exa_py-1.0.18}/exa_py/__init__.py +0 -0
- {exa_py-1.0.17 → exa_py-1.0.18}/exa_py/py.typed +0 -0
- {exa_py-1.0.17 → exa_py-1.0.18}/exa_py/utils.py +0 -0
- {exa_py-1.0.17 → exa_py-1.0.18}/exa_py.egg-info/SOURCES.txt +0 -0
- {exa_py-1.0.17 → exa_py-1.0.18}/exa_py.egg-info/dependency_links.txt +0 -0
- {exa_py-1.0.17 → exa_py-1.0.18}/exa_py.egg-info/requires.txt +0 -0
- {exa_py-1.0.17 → exa_py-1.0.18}/exa_py.egg-info/top_level.txt +0 -0
- {exa_py-1.0.17 → exa_py-1.0.18}/setup.cfg +0 -0
|
@@ -399,15 +399,20 @@ class SearchResponse(Generic[T]):
|
|
|
399
399
|
Attributes:
|
|
400
400
|
results (List[Result]): A list of search results.
|
|
401
401
|
autoprompt_string (str, optional): The Exa query created by the autoprompt functionality.
|
|
402
|
+
resolved_search_type (str, optional): What "auto" search resolved to. "neural" or "keyword".
|
|
402
403
|
"""
|
|
403
404
|
|
|
404
405
|
results: List[T]
|
|
405
406
|
autoprompt_string: Optional[str]
|
|
407
|
+
resolved_search_type: Optional[str]
|
|
406
408
|
|
|
407
409
|
def __str__(self):
|
|
408
410
|
output = "\n\n".join(str(result) for result in self.results)
|
|
409
411
|
if self.autoprompt_string:
|
|
410
412
|
output += f"\n\nAutoprompt String: {self.autoprompt_string}"
|
|
413
|
+
if self.resolved_search_type:
|
|
414
|
+
output += f"\nResolved Search Type: {self.resolved_search_type}"
|
|
415
|
+
|
|
411
416
|
return output
|
|
412
417
|
|
|
413
418
|
|
|
@@ -435,7 +440,7 @@ class Exa:
|
|
|
435
440
|
self,
|
|
436
441
|
api_key: Optional[str],
|
|
437
442
|
base_url: str = "https://api.exa.ai",
|
|
438
|
-
user_agent: str = "exa-py 1.0.
|
|
443
|
+
user_agent: str = "exa-py 1.0.18",
|
|
439
444
|
):
|
|
440
445
|
"""Initialize the Exa client with the provided API key and optional base URL and user agent.
|
|
441
446
|
|
|
@@ -505,6 +510,7 @@ class Exa:
|
|
|
505
510
|
return SearchResponse(
|
|
506
511
|
[Result(**to_snake_case(result)) for result in data["results"]],
|
|
507
512
|
data["autopromptString"] if "autopromptString" in data else None,
|
|
513
|
+
data["resolvedSearchType"] if "resolvedSearchType" in data else None,
|
|
508
514
|
)
|
|
509
515
|
|
|
510
516
|
@overload
|
|
@@ -696,6 +702,7 @@ class Exa:
|
|
|
696
702
|
return SearchResponse(
|
|
697
703
|
[Result(**to_snake_case(result)) for result in data["results"]],
|
|
698
704
|
data["autopromptString"] if "autopromptString" in data else None,
|
|
705
|
+
data["resolvedSearchType"] if "resolvedSearchType" in data else None,
|
|
699
706
|
)
|
|
700
707
|
|
|
701
708
|
@overload
|
|
@@ -787,6 +794,7 @@ class Exa:
|
|
|
787
794
|
return SearchResponse(
|
|
788
795
|
[Result(**to_snake_case(result)) for result in data["results"]],
|
|
789
796
|
data["autopromptString"] if "autopromptString" in data else None,
|
|
797
|
+
data["resolvedSearchType"] if "resolvedSearchType" in data else None,
|
|
790
798
|
)
|
|
791
799
|
|
|
792
800
|
def find_similar(
|
|
@@ -812,6 +820,7 @@ class Exa:
|
|
|
812
820
|
return SearchResponse(
|
|
813
821
|
[Result(**to_snake_case(result)) for result in data["results"]],
|
|
814
822
|
data["autopromptString"] if "autopromptString" in data else None,
|
|
823
|
+
data["resolvedSearchType"] if "resolvedSearchType" in data else None,
|
|
815
824
|
)
|
|
816
825
|
|
|
817
826
|
@overload
|
|
@@ -995,6 +1004,7 @@ class Exa:
|
|
|
995
1004
|
return SearchResponse(
|
|
996
1005
|
[Result(**to_snake_case(result)) for result in data["results"]],
|
|
997
1006
|
data["autopromptString"] if "autopromptString" in data else None,
|
|
1007
|
+
data["resolvedSearchType"] if "resolvedSearchType" in data else None,
|
|
998
1008
|
)
|
|
999
1009
|
|
|
1000
1010
|
def wrap(self, client: OpenAI):
|
|
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
|