tavily-python 0.7.6__tar.gz → 0.7.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.
- {tavily_python-0.7.6 → tavily_python-0.7.8}/PKG-INFO +1 -1
- {tavily_python-0.7.6 → tavily_python-0.7.8}/setup.py +1 -1
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/async_tavily.py +29 -20
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/tavily.py +29 -20
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/PKG-INFO +1 -1
- {tavily_python-0.7.6 → tavily_python-0.7.8}/LICENSE +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/README.md +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/setup.cfg +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/__init__.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/config.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/errors.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/hybrid_rag/__init__.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/hybrid_rag/hybrid_rag.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/utils.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/SOURCES.txt +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/dependency_links.txt +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/requires.txt +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/top_level.txt +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_async_search.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_crawl.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_errors.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_map.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_search.py +0 -0
- {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_sync_search.py +0 -0
|
@@ -53,18 +53,19 @@ class AsyncTavilyClient:
|
|
|
53
53
|
async def _search(
|
|
54
54
|
self,
|
|
55
55
|
query: str,
|
|
56
|
-
search_depth: Literal["basic", "advanced"] =
|
|
57
|
-
topic: Literal["general", "news", "finance"] =
|
|
56
|
+
search_depth: Literal["basic", "advanced"] = None,
|
|
57
|
+
topic: Literal["general", "news", "finance"] = None,
|
|
58
58
|
time_range: Literal["day", "week", "month", "year"] = None,
|
|
59
|
-
days: int =
|
|
60
|
-
max_results: int =
|
|
59
|
+
days: int = None,
|
|
60
|
+
max_results: int = None,
|
|
61
61
|
include_domains: Sequence[str] = None,
|
|
62
62
|
exclude_domains: Sequence[str] = None,
|
|
63
|
-
include_answer: Union[bool, Literal["basic", "advanced"]] =
|
|
64
|
-
include_raw_content: Union[bool, Literal["markdown", "text"]] =
|
|
65
|
-
include_images: bool =
|
|
63
|
+
include_answer: Union[bool, Literal["basic", "advanced"]] = None,
|
|
64
|
+
include_raw_content: Union[bool, Literal["markdown", "text"]] = None,
|
|
65
|
+
include_images: bool = None,
|
|
66
66
|
timeout: int = 60,
|
|
67
67
|
country: str = None,
|
|
68
|
+
auto_parameters: bool = None,
|
|
68
69
|
**kwargs,
|
|
69
70
|
) -> dict:
|
|
70
71
|
"""
|
|
@@ -83,8 +84,11 @@ class AsyncTavilyClient:
|
|
|
83
84
|
"exclude_domains": exclude_domains,
|
|
84
85
|
"include_images": include_images,
|
|
85
86
|
"country": country,
|
|
87
|
+
"auto_parameters": auto_parameters,
|
|
86
88
|
}
|
|
87
89
|
|
|
90
|
+
data = {k: v for k, v in data.items() if v is not None}
|
|
91
|
+
|
|
88
92
|
if kwargs:
|
|
89
93
|
data.update(kwargs)
|
|
90
94
|
|
|
@@ -118,18 +122,19 @@ class AsyncTavilyClient:
|
|
|
118
122
|
|
|
119
123
|
async def search(self,
|
|
120
124
|
query: str,
|
|
121
|
-
search_depth: Literal["basic", "advanced"] =
|
|
122
|
-
topic: Literal["general", "news", "finance"] =
|
|
125
|
+
search_depth: Literal["basic", "advanced"] = None,
|
|
126
|
+
topic: Literal["general", "news", "finance"] = None,
|
|
123
127
|
time_range: Literal["day", "week", "month", "year"] = None,
|
|
124
|
-
days: int =
|
|
125
|
-
max_results: int =
|
|
128
|
+
days: int = None,
|
|
129
|
+
max_results: int = None,
|
|
126
130
|
include_domains: Sequence[str] = None,
|
|
127
131
|
exclude_domains: Sequence[str] = None,
|
|
128
|
-
include_answer: Union[bool, Literal["basic", "advanced"]] =
|
|
129
|
-
include_raw_content: Union[bool, Literal["markdown", "text"]] =
|
|
130
|
-
include_images: bool =
|
|
132
|
+
include_answer: Union[bool, Literal["basic", "advanced"]] = None,
|
|
133
|
+
include_raw_content: Union[bool, Literal["markdown", "text"]] = None,
|
|
134
|
+
include_images: bool = None,
|
|
131
135
|
timeout: int = 60,
|
|
132
136
|
country: str = None,
|
|
137
|
+
auto_parameters: bool = None,
|
|
133
138
|
**kwargs, # Accept custom arguments
|
|
134
139
|
) -> dict:
|
|
135
140
|
"""
|
|
@@ -149,6 +154,7 @@ class AsyncTavilyClient:
|
|
|
149
154
|
include_images=include_images,
|
|
150
155
|
timeout=timeout,
|
|
151
156
|
country=country,
|
|
157
|
+
auto_parameters=auto_parameters,
|
|
152
158
|
**kwargs,
|
|
153
159
|
)
|
|
154
160
|
|
|
@@ -161,9 +167,9 @@ class AsyncTavilyClient:
|
|
|
161
167
|
async def _extract(
|
|
162
168
|
self,
|
|
163
169
|
urls: Union[List[str], str],
|
|
164
|
-
include_images: bool =
|
|
165
|
-
extract_depth: Literal["basic", "advanced"] =
|
|
166
|
-
format: Literal["markdown", "text"] =
|
|
170
|
+
include_images: bool = None,
|
|
171
|
+
extract_depth: Literal["basic", "advanced"] = None,
|
|
172
|
+
format: Literal["markdown", "text"] = None,
|
|
167
173
|
timeout: int = 60,
|
|
168
174
|
**kwargs
|
|
169
175
|
) -> dict:
|
|
@@ -176,6 +182,9 @@ class AsyncTavilyClient:
|
|
|
176
182
|
"extract_depth": extract_depth,
|
|
177
183
|
"format": format,
|
|
178
184
|
}
|
|
185
|
+
|
|
186
|
+
data = {k: v for k, v in data.items() if v is not None}
|
|
187
|
+
|
|
179
188
|
if kwargs:
|
|
180
189
|
data.update(kwargs)
|
|
181
190
|
|
|
@@ -210,9 +219,9 @@ class AsyncTavilyClient:
|
|
|
210
219
|
|
|
211
220
|
async def extract(self,
|
|
212
221
|
urls: Union[List[str], str], # Accept a list of URLs or a single URL
|
|
213
|
-
include_images: bool =
|
|
214
|
-
extract_depth: Literal["basic", "advanced"] =
|
|
215
|
-
format: Literal["markdown", "text"] =
|
|
222
|
+
include_images: bool = None,
|
|
223
|
+
extract_depth: Literal["basic", "advanced"] = None,
|
|
224
|
+
format: Literal["markdown", "text"] = None,
|
|
216
225
|
timeout: int = 60,
|
|
217
226
|
**kwargs, # Accept custom arguments
|
|
218
227
|
) -> dict:
|
|
@@ -38,18 +38,19 @@ class TavilyClient:
|
|
|
38
38
|
|
|
39
39
|
def _search(self,
|
|
40
40
|
query: str,
|
|
41
|
-
search_depth: Literal["basic", "advanced"] =
|
|
42
|
-
topic: Literal["general", "news", "finance"] =
|
|
41
|
+
search_depth: Literal["basic", "advanced"] = None,
|
|
42
|
+
topic: Literal["general", "news", "finance"] = None,
|
|
43
43
|
time_range: Literal["day", "week", "month", "year"] = None,
|
|
44
|
-
days: int =
|
|
45
|
-
max_results: int =
|
|
44
|
+
days: int = None,
|
|
45
|
+
max_results: int = None,
|
|
46
46
|
include_domains: Sequence[str] = None,
|
|
47
47
|
exclude_domains: Sequence[str] = None,
|
|
48
|
-
include_answer: Union[bool, Literal["basic", "advanced"]] =
|
|
49
|
-
include_raw_content: Union[bool, Literal["markdown", "text"]] =
|
|
50
|
-
include_images: bool =
|
|
48
|
+
include_answer: Union[bool, Literal["basic", "advanced"]] = None,
|
|
49
|
+
include_raw_content: Union[bool, Literal["markdown", "text"]] = None,
|
|
50
|
+
include_images: bool = None,
|
|
51
51
|
timeout: int = 60,
|
|
52
52
|
country: str = None,
|
|
53
|
+
auto_parameters: bool = None,
|
|
53
54
|
**kwargs
|
|
54
55
|
) -> dict:
|
|
55
56
|
"""
|
|
@@ -69,8 +70,11 @@ class TavilyClient:
|
|
|
69
70
|
"exclude_domains": exclude_domains,
|
|
70
71
|
"include_images": include_images,
|
|
71
72
|
"country": country,
|
|
73
|
+
"auto_parameters": auto_parameters,
|
|
72
74
|
}
|
|
73
75
|
|
|
76
|
+
data = {k: v for k, v in data.items() if v is not None}
|
|
77
|
+
|
|
74
78
|
if kwargs:
|
|
75
79
|
data.update(kwargs)
|
|
76
80
|
|
|
@@ -105,18 +109,19 @@ class TavilyClient:
|
|
|
105
109
|
|
|
106
110
|
def search(self,
|
|
107
111
|
query: str,
|
|
108
|
-
search_depth: Literal["basic", "advanced"] =
|
|
109
|
-
topic: Literal["general", "news", "finance" ] =
|
|
112
|
+
search_depth: Literal["basic", "advanced"] = None,
|
|
113
|
+
topic: Literal["general", "news", "finance" ] = None,
|
|
110
114
|
time_range: Literal["day", "week", "month", "year"] = None,
|
|
111
|
-
days: int =
|
|
112
|
-
max_results: int =
|
|
115
|
+
days: int = None,
|
|
116
|
+
max_results: int = None,
|
|
113
117
|
include_domains: Sequence[str] = None,
|
|
114
118
|
exclude_domains: Sequence[str] = None,
|
|
115
|
-
include_answer: Union[bool, Literal["basic", "advanced"]] =
|
|
116
|
-
include_raw_content: Union[bool, Literal["markdown", "text"]] =
|
|
117
|
-
include_images: bool =
|
|
119
|
+
include_answer: Union[bool, Literal["basic", "advanced"]] = None,
|
|
120
|
+
include_raw_content: Union[bool, Literal["markdown", "text"]] = None,
|
|
121
|
+
include_images: bool = None,
|
|
118
122
|
timeout: int = 60,
|
|
119
123
|
country: str = None,
|
|
124
|
+
auto_parameters: bool = None,
|
|
120
125
|
**kwargs, # Accept custom arguments
|
|
121
126
|
) -> dict:
|
|
122
127
|
"""
|
|
@@ -136,6 +141,7 @@ class TavilyClient:
|
|
|
136
141
|
include_images=include_images,
|
|
137
142
|
timeout=timeout,
|
|
138
143
|
country=country,
|
|
144
|
+
auto_parameters=auto_parameters,
|
|
139
145
|
**kwargs,
|
|
140
146
|
)
|
|
141
147
|
|
|
@@ -147,9 +153,9 @@ class TavilyClient:
|
|
|
147
153
|
|
|
148
154
|
def _extract(self,
|
|
149
155
|
urls: Union[List[str], str],
|
|
150
|
-
include_images: bool =
|
|
151
|
-
extract_depth: Literal["basic", "advanced"] =
|
|
152
|
-
format: Literal["markdown", "text"] =
|
|
156
|
+
include_images: bool = None,
|
|
157
|
+
extract_depth: Literal["basic", "advanced"] = None,
|
|
158
|
+
format: Literal["markdown", "text"] = None,
|
|
153
159
|
timeout: int = 60,
|
|
154
160
|
**kwargs
|
|
155
161
|
) -> dict:
|
|
@@ -162,6 +168,9 @@ class TavilyClient:
|
|
|
162
168
|
"extract_depth": extract_depth,
|
|
163
169
|
"format": format,
|
|
164
170
|
}
|
|
171
|
+
|
|
172
|
+
data = {k: v for k, v in data.items() if v is not None}
|
|
173
|
+
|
|
165
174
|
if kwargs:
|
|
166
175
|
data.update(kwargs)
|
|
167
176
|
|
|
@@ -194,9 +203,9 @@ class TavilyClient:
|
|
|
194
203
|
|
|
195
204
|
def extract(self,
|
|
196
205
|
urls: Union[List[str], str], # Accept a list of URLs or a single URL
|
|
197
|
-
include_images: bool =
|
|
198
|
-
extract_depth: Literal["basic", "advanced"] =
|
|
199
|
-
format: Literal["markdown", "text"] =
|
|
206
|
+
include_images: bool = None,
|
|
207
|
+
extract_depth: Literal["basic", "advanced"] = None,
|
|
208
|
+
format: Literal["markdown", "text"] = None,
|
|
200
209
|
timeout: int = 60,
|
|
201
210
|
**kwargs, # Accept custom arguments
|
|
202
211
|
) -> dict:
|
|
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
|