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.
Files changed (24) hide show
  1. {tavily_python-0.7.6 → tavily_python-0.7.8}/PKG-INFO +1 -1
  2. {tavily_python-0.7.6 → tavily_python-0.7.8}/setup.py +1 -1
  3. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/async_tavily.py +29 -20
  4. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/tavily.py +29 -20
  5. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/PKG-INFO +1 -1
  6. {tavily_python-0.7.6 → tavily_python-0.7.8}/LICENSE +0 -0
  7. {tavily_python-0.7.6 → tavily_python-0.7.8}/README.md +0 -0
  8. {tavily_python-0.7.6 → tavily_python-0.7.8}/setup.cfg +0 -0
  9. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/__init__.py +0 -0
  10. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/config.py +0 -0
  11. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/errors.py +0 -0
  12. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/hybrid_rag/__init__.py +0 -0
  13. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/hybrid_rag/hybrid_rag.py +0 -0
  14. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily/utils.py +0 -0
  15. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/SOURCES.txt +0 -0
  16. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/dependency_links.txt +0 -0
  17. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/requires.txt +0 -0
  18. {tavily_python-0.7.6 → tavily_python-0.7.8}/tavily_python.egg-info/top_level.txt +0 -0
  19. {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_async_search.py +0 -0
  20. {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_crawl.py +0 -0
  21. {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_errors.py +0 -0
  22. {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_map.py +0 -0
  23. {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_search.py +0 -0
  24. {tavily_python-0.7.6 → tavily_python-0.7.8}/tests/test_sync_search.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tavily-python
3
- Version: 0.7.6
3
+ Version: 0.7.8
4
4
  Summary: Python wrapper for the Tavily API
5
5
  Home-page: https://github.com/tavily-ai/tavily-python
6
6
  Author: Tavily AI
@@ -5,7 +5,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
5
5
 
6
6
  setup(
7
7
  name='tavily-python',
8
- version='0.7.6',
8
+ version='0.7.8',
9
9
  url='https://github.com/tavily-ai/tavily-python',
10
10
  author='Tavily AI',
11
11
  author_email='support@tavily.com',
@@ -53,18 +53,19 @@ class AsyncTavilyClient:
53
53
  async def _search(
54
54
  self,
55
55
  query: str,
56
- search_depth: Literal["basic", "advanced"] = "basic",
57
- topic: Literal["general", "news", "finance"] = "general",
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 = 7,
60
- max_results: int = 5,
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"]] = False,
64
- include_raw_content: Union[bool, Literal["markdown", "text"]] = False,
65
- include_images: bool = False,
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"] = "basic",
122
- topic: Literal["general", "news", "finance"] = "general",
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 = 7,
125
- max_results: int = 5,
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"]] = False,
129
- include_raw_content: Union[bool, Literal["markdown", "text"]] = False,
130
- include_images: bool = False,
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 = False,
165
- extract_depth: Literal["basic", "advanced"] = "basic",
166
- format: Literal["markdown", "text"] = "markdown",
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 = False,
214
- extract_depth: Literal["basic", "advanced"] = "basic",
215
- format: Literal["markdown", "text"] = "markdown",
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"] = "basic",
42
- topic: Literal["general", "news", "finance"] = "general",
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 = 7,
45
- max_results: int = 5,
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"]] = False,
49
- include_raw_content: Union[bool, Literal["markdown", "text"]] = False,
50
- include_images: bool = False,
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"] = "basic",
109
- topic: Literal["general", "news", "finance" ] = "general",
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 = 7,
112
- max_results: int = 5,
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"]] = False,
116
- include_raw_content: Union[bool, Literal["markdown", "text"]] = False,
117
- include_images: bool = False,
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 = False,
151
- extract_depth: Literal["basic", "advanced"] = "basic",
152
- format: Literal["markdown", "text"] = "markdown",
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 = False,
198
- extract_depth: Literal["basic", "advanced"] = "basic",
199
- format: Literal["markdown", "text"] = "markdown",
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tavily-python
3
- Version: 0.7.6
3
+ Version: 0.7.8
4
4
  Summary: Python wrapper for the Tavily API
5
5
  Home-page: https://github.com/tavily-ai/tavily-python
6
6
  Author: Tavily AI
File without changes
File without changes
File without changes