Skip to content

Commit

Permalink
Merge pull request assafelovic#685 from nikkag/set-default-header-tavily
Browse files Browse the repository at this point in the history
Make header an optional argument in TavilyClient
  • Loading branch information
assafelovic authored Jul 18, 2024
2 parents fb45321 + 5752aad commit 701d1d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gpt_researcher/retrievers/tavily/tavily_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ class TavilySearch():
"""
Tavily API Retriever
"""
def __init__(self, query, headers, topic="general"):
def __init__(self, query, headers=None, topic="general"):
"""
Initializes the TavilySearch object
Args:
query:
"""
self.query = query
self.headers = headers
self.headers = headers or {}
self.api_key = self.get_api_key()
self.client = TavilyClient(self.api_key)
self.topic = topic
Expand Down

0 comments on commit 701d1d6

Please sign in to comment.