Skip to content

Commit 04dde67

Browse files
authored
Merge pull request #146 from tavily-ai/feat/add-client-source-param
Deprecation warnings
2 parents d7afd3a + 65d242c commit 04dde67

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tavily/tavily.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import requests
22
import json
3-
import warnings
43
import os
4+
import warnings
55
from typing import Literal, Sequence, Optional, List, Union, Generator
66
from concurrent.futures import ThreadPoolExecutor, as_completed
77
from .utils import get_max_items_from_list
@@ -502,6 +502,8 @@ def get_search_context(self,
502502
503503
Returns a string of JSON containing the search context up to context limit.
504504
"""
505+
warnings.warn("get_search_context is deprecated and will be removed in future versions.",
506+
DeprecationWarning, stacklevel=2)
505507

506508
response_dict = self._search(query,
507509
search_depth=search_depth,
@@ -539,6 +541,8 @@ def qna_search(self,
539541
"""
540542
Q&A search method. Search depth is advanced by default to get the best answer.
541543
"""
544+
warnings.warn("qna_search is deprecated and will be removed in future versions.",
545+
DeprecationWarning, stacklevel=2)
542546
response_dict = self._search(query,
543547
search_depth=search_depth,
544548
topic=topic,
@@ -565,6 +569,8 @@ def get_company_info(self,
565569
country: str = None,
566570
) -> Sequence[dict]:
567571
""" Company information search method. Search depth is advanced by default to get the best answer. """
572+
warnings.warn("get_company_info is deprecated and will be removed in future versions.",
573+
DeprecationWarning, stacklevel=2)
568574
def _perform_search(topic):
569575
return self._search(query,
570576
search_depth=search_depth,

0 commit comments

Comments
 (0)