exa-py 1.14.16__tar.gz → 1.14.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.14.16 → exa_py-1.14.18}/PKG-INFO +1 -1
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/client.py +19 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/types.py +196 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/pyproject.toml +1 -1
- {exa_py-1.14.16 → exa_py-1.14.18}/README.md +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/api.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/py.typed +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/research/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/research/client.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/research/models.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/utils.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/_generator/pydantic/BaseModel.jinja2 +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/core/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/core/base.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/enrichments/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/enrichments/client.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/events/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/events/client.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/imports/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/imports/client.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/items/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/items/client.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/monitors/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/monitors/client.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/monitors/runs/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/monitors/runs/client.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/searches/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/searches/client.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/webhooks/__init__.py +0 -0
- {exa_py-1.14.16 → exa_py-1.14.18}/exa_py/websets/webhooks/client.py +0 -0
|
@@ -10,6 +10,8 @@ from .types import (
|
|
|
10
10
|
UpdateWebsetRequest,
|
|
11
11
|
WebsetStatus,
|
|
12
12
|
CreateWebsetParameters,
|
|
13
|
+
PreviewWebsetParameters,
|
|
14
|
+
PreviewWebsetResponse,
|
|
13
15
|
)
|
|
14
16
|
from .core.base import WebsetsBaseClient
|
|
15
17
|
from .items import WebsetItemsClient
|
|
@@ -45,6 +47,23 @@ class WebsetsClient(WebsetsBaseClient):
|
|
|
45
47
|
response = self.request("/v0/websets", data=params)
|
|
46
48
|
return Webset.model_validate(response)
|
|
47
49
|
|
|
50
|
+
def preview(self, params: Union[Dict[str, Any], PreviewWebsetParameters]) -> PreviewWebsetResponse:
|
|
51
|
+
"""Preview a webset query.
|
|
52
|
+
|
|
53
|
+
Preview how a search query will be decomposed before creating a webset.
|
|
54
|
+
This endpoint performs the same query analysis that happens during webset creation,
|
|
55
|
+
allowing you to see the detected entity type, generated search criteria, and
|
|
56
|
+
available enrichment columns in advance.
|
|
57
|
+
|
|
58
|
+
Args:
|
|
59
|
+
params (PreviewWebsetParameters): The parameters for previewing a webset.
|
|
60
|
+
|
|
61
|
+
Returns:
|
|
62
|
+
PreviewWebsetResponse: The preview response showing how the query will be decomposed.
|
|
63
|
+
"""
|
|
64
|
+
response = self.request("/v0/websets/preview", data=params)
|
|
65
|
+
return PreviewWebsetResponse.model_validate(response)
|
|
66
|
+
|
|
48
67
|
def get(self, id: str, *, expand: Optional[List[Literal["items"]]] = None) -> GetWebsetResponse:
|
|
49
68
|
"""Get a Webset by ID.
|
|
50
69
|
|
|
@@ -171,6 +171,10 @@ class CreateWebsetSearchParameters(ExaBaseModel):
|
|
|
171
171
|
"""
|
|
172
172
|
Sources (existing imports or websets) to exclude from search results. Any results found within these sources will be omitted to prevent finding them during search.
|
|
173
173
|
"""
|
|
174
|
+
scope: Optional[List[ScopeItem]] = None
|
|
175
|
+
"""
|
|
176
|
+
Limit the search to specific sources (existing imports or websets). Any results found within these sources matching the search criteria will be included in the Webset.
|
|
177
|
+
"""
|
|
174
178
|
behavior: Optional[WebsetSearchBehavior] = WebsetSearchBehavior.override
|
|
175
179
|
"""
|
|
176
180
|
The behavior of the Search when it is added to a Webset.
|
|
@@ -296,6 +300,26 @@ class ImportSource(Enum):
|
|
|
296
300
|
webset = 'webset'
|
|
297
301
|
|
|
298
302
|
|
|
303
|
+
class ScopeSourceType(Enum):
|
|
304
|
+
"""
|
|
305
|
+
The source type for scope filtering.
|
|
306
|
+
"""
|
|
307
|
+
import_ = 'import'
|
|
308
|
+
webset = 'webset'
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
class PreviewWebsetResponseEnrichmentsFormat(Enum):
|
|
312
|
+
"""
|
|
313
|
+
Format of the enrichment in preview response.
|
|
314
|
+
"""
|
|
315
|
+
text = 'text'
|
|
316
|
+
date = 'date'
|
|
317
|
+
number = 'number'
|
|
318
|
+
options = 'options'
|
|
319
|
+
email = 'email'
|
|
320
|
+
phone = 'phone'
|
|
321
|
+
|
|
322
|
+
|
|
299
323
|
class ListEventsResponse(ExaBaseModel):
|
|
300
324
|
data: List[Annotated[
|
|
301
325
|
Union[
|
|
@@ -443,6 +467,121 @@ class ExcludeItem(ExaBaseModel):
|
|
|
443
467
|
"""
|
|
444
468
|
|
|
445
469
|
|
|
470
|
+
class ScopeRelationship(ExaBaseModel):
|
|
471
|
+
"""
|
|
472
|
+
Represents the relationship between entities for scoped searches.
|
|
473
|
+
"""
|
|
474
|
+
definition: str
|
|
475
|
+
"""
|
|
476
|
+
What the relationship of the entities you hope to find is relative to the entities contained in the provided source
|
|
477
|
+
"""
|
|
478
|
+
limit: Optional[PositiveInt] = None
|
|
479
|
+
"""
|
|
480
|
+
Optional limit on the number of related entities to find
|
|
481
|
+
"""
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
class ScopeItem(ExaBaseModel):
|
|
485
|
+
"""
|
|
486
|
+
Represents a source to limit search scope to.
|
|
487
|
+
"""
|
|
488
|
+
source: ScopeSourceType
|
|
489
|
+
"""
|
|
490
|
+
The type of source (import)
|
|
491
|
+
"""
|
|
492
|
+
id: str
|
|
493
|
+
"""
|
|
494
|
+
The ID of the source to search within
|
|
495
|
+
"""
|
|
496
|
+
relationship: Optional[ScopeRelationship] = None
|
|
497
|
+
"""
|
|
498
|
+
Optional relationship definition for hop searches
|
|
499
|
+
"""
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
class PreviewWebsetParameters(ExaBaseModel):
|
|
503
|
+
"""
|
|
504
|
+
Parameters for previewing a webset query.
|
|
505
|
+
"""
|
|
506
|
+
query: str
|
|
507
|
+
"""
|
|
508
|
+
Natural language search query describing what you are looking for.
|
|
509
|
+
"""
|
|
510
|
+
entity: Optional[Union[
|
|
511
|
+
WebsetCompanyEntity,
|
|
512
|
+
WebsetPersonEntity,
|
|
513
|
+
WebsetArticleEntity,
|
|
514
|
+
WebsetResearchPaperEntity,
|
|
515
|
+
WebsetCustomEntity,
|
|
516
|
+
]] = None
|
|
517
|
+
"""
|
|
518
|
+
Entity used to inform the decomposition. Not required - we automatically detect
|
|
519
|
+
the entity from the query. Only use when you need more fine control.
|
|
520
|
+
"""
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
class PreviewWebsetResponseEnrichment(ExaBaseModel):
|
|
524
|
+
"""
|
|
525
|
+
Detected enrichment in preview response.
|
|
526
|
+
"""
|
|
527
|
+
description: str
|
|
528
|
+
"""
|
|
529
|
+
Description of the enrichment.
|
|
530
|
+
"""
|
|
531
|
+
format: PreviewWebsetResponseEnrichmentsFormat
|
|
532
|
+
"""
|
|
533
|
+
Format of the enrichment.
|
|
534
|
+
"""
|
|
535
|
+
options: Optional[List[Option]] = None
|
|
536
|
+
"""
|
|
537
|
+
When format is options, the options detected from the query.
|
|
538
|
+
"""
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
class PreviewWebsetResponseSearchCriterion(ExaBaseModel):
|
|
542
|
+
"""
|
|
543
|
+
Detected search criterion in preview response.
|
|
544
|
+
"""
|
|
545
|
+
description: str
|
|
546
|
+
"""
|
|
547
|
+
Description of the criterion.
|
|
548
|
+
"""
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
class PreviewWebsetResponseSearch(ExaBaseModel):
|
|
552
|
+
"""
|
|
553
|
+
Search information in preview response.
|
|
554
|
+
"""
|
|
555
|
+
entity: Union[
|
|
556
|
+
WebsetCompanyEntity,
|
|
557
|
+
WebsetPersonEntity,
|
|
558
|
+
WebsetArticleEntity,
|
|
559
|
+
WebsetResearchPaperEntity,
|
|
560
|
+
WebsetCustomEntity,
|
|
561
|
+
]
|
|
562
|
+
"""
|
|
563
|
+
Detected entity from the query.
|
|
564
|
+
"""
|
|
565
|
+
criteria: List[PreviewWebsetResponseSearchCriterion]
|
|
566
|
+
"""
|
|
567
|
+
Detected criteria from the query.
|
|
568
|
+
"""
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
class PreviewWebsetResponse(ExaBaseModel):
|
|
572
|
+
"""
|
|
573
|
+
Response from previewing a webset query.
|
|
574
|
+
"""
|
|
575
|
+
search: PreviewWebsetResponseSearch
|
|
576
|
+
"""
|
|
577
|
+
Search analysis from the query.
|
|
578
|
+
"""
|
|
579
|
+
enrichments: List[PreviewWebsetResponseEnrichment]
|
|
580
|
+
"""
|
|
581
|
+
Detected enrichments from the query.
|
|
582
|
+
"""
|
|
583
|
+
|
|
584
|
+
|
|
446
585
|
class CsvImportConfig(ExaBaseModel):
|
|
447
586
|
"""
|
|
448
587
|
Configuration for CSV imports.
|
|
@@ -758,6 +897,10 @@ class CreateWebsetParametersSearch(ExaBaseModel):
|
|
|
758
897
|
"""
|
|
759
898
|
Sources (existing imports or websets) to exclude from search results. Any results found within these sources will be omitted to prevent finding them during search.
|
|
760
899
|
"""
|
|
900
|
+
scope: Optional[List[ScopeItem]] = None
|
|
901
|
+
"""
|
|
902
|
+
Limit the search to specific sources (existing imports or websets). Any results found within these sources matching the search criteria will be included in the Webset.
|
|
903
|
+
"""
|
|
761
904
|
|
|
762
905
|
|
|
763
906
|
class Source(Enum):
|
|
@@ -1538,12 +1681,53 @@ class WebsetResearchPaperEntity(ExaBaseModel):
|
|
|
1538
1681
|
type: Literal['research_paper']
|
|
1539
1682
|
|
|
1540
1683
|
|
|
1684
|
+
class WebsetSearchRecallConfidence(Enum):
|
|
1685
|
+
"""
|
|
1686
|
+
Confidence level for search recall estimates.
|
|
1687
|
+
"""
|
|
1688
|
+
high = 'high'
|
|
1689
|
+
medium = 'medium'
|
|
1690
|
+
low = 'low'
|
|
1691
|
+
|
|
1692
|
+
|
|
1693
|
+
class WebsetSearchRecallExpected(ExaBaseModel):
|
|
1694
|
+
"""
|
|
1695
|
+
Expected search recall information.
|
|
1696
|
+
"""
|
|
1697
|
+
total: int
|
|
1698
|
+
"""
|
|
1699
|
+
Total expected matches
|
|
1700
|
+
"""
|
|
1701
|
+
confidence: WebsetSearchRecallConfidence
|
|
1702
|
+
"""
|
|
1703
|
+
Confidence level of the estimate
|
|
1704
|
+
"""
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
class WebsetSearchRecall(ExaBaseModel):
|
|
1708
|
+
"""
|
|
1709
|
+
Search recall estimate information.
|
|
1710
|
+
"""
|
|
1711
|
+
expected: WebsetSearchRecallExpected
|
|
1712
|
+
"""
|
|
1713
|
+
Expected recall information
|
|
1714
|
+
"""
|
|
1715
|
+
reasoning: str
|
|
1716
|
+
"""
|
|
1717
|
+
Reasoning for the recall estimate
|
|
1718
|
+
"""
|
|
1719
|
+
|
|
1720
|
+
|
|
1541
1721
|
class WebsetSearch(ExaBaseModel):
|
|
1542
1722
|
id: str
|
|
1543
1723
|
"""
|
|
1544
1724
|
The unique identifier for the search
|
|
1545
1725
|
"""
|
|
1546
1726
|
object: Literal['webset_search']
|
|
1727
|
+
webset_id: Annotated[str, Field(alias='websetId')]
|
|
1728
|
+
"""
|
|
1729
|
+
The unique identifier for the Webset this search belongs to
|
|
1730
|
+
"""
|
|
1547
1731
|
status: WebsetSearchStatus = Field(..., title='WebsetSearchStatus')
|
|
1548
1732
|
"""
|
|
1549
1733
|
The status of the search
|
|
@@ -1579,10 +1763,22 @@ class WebsetSearch(ExaBaseModel):
|
|
|
1579
1763
|
- `override`: the search will replace the existing Items found in the Webset and evaluate them against the new criteria. Any Items that don't match the new criteria will be discarded.
|
|
1580
1764
|
- `append`: the search will add the new Items found to the existing Webset. Any Items that don't match the new criteria will be discarded.
|
|
1581
1765
|
"""
|
|
1766
|
+
exclude: Optional[List[ExcludeItem]] = None
|
|
1767
|
+
"""
|
|
1768
|
+
Sources (existing imports or websets) used to omit certain results to be found during the search.
|
|
1769
|
+
"""
|
|
1770
|
+
scope: Optional[List[ScopeItem]] = None
|
|
1771
|
+
"""
|
|
1772
|
+
The scope of the search. By default, there is no scope - thus searching the web. If provided during creation, the search will only be performed on the sources provided.
|
|
1773
|
+
"""
|
|
1582
1774
|
progress: Progress
|
|
1583
1775
|
"""
|
|
1584
1776
|
The progress of the search
|
|
1585
1777
|
"""
|
|
1778
|
+
recall: Optional[WebsetSearchRecall] = None
|
|
1779
|
+
"""
|
|
1780
|
+
Estimate of total potential matches (if requested)
|
|
1781
|
+
"""
|
|
1586
1782
|
metadata: Optional[Dict[str, Any]] = {}
|
|
1587
1783
|
"""
|
|
1588
1784
|
Set of key-value pairs you want to associate with this object.
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|