Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,7 @@ llm = ChatGroq(
|
|
| 18 |
model="llama3-groq-70b-8192-tool-use-preview",
|
| 19 |
max_tokens=8000,
|
| 20 |
temperature=0.5,
|
|
|
|
| 21 |
)
|
| 22 |
|
| 23 |
|
|
@@ -25,7 +26,7 @@ llm = ChatGroq(
|
|
| 25 |
def web_search_tool(query: str) -> str:
|
| 26 |
"""This tool performs web search to gather relevant data."""
|
| 27 |
# client = TavilyClient(api_key="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")
|
| 28 |
-
websearch = TavilySearchResults(max_results=5, search_depth="advanced", )
|
| 29 |
response = websearch.invoke({"query": query})
|
| 30 |
return response
|
| 31 |
|
|
|
|
| 18 |
model="llama3-groq-70b-8192-tool-use-preview",
|
| 19 |
max_tokens=8000,
|
| 20 |
temperature=0.5,
|
| 21 |
+
api_key=GROQ_API_KEY,
|
| 22 |
)
|
| 23 |
|
| 24 |
|
|
|
|
| 26 |
def web_search_tool(query: str) -> str:
|
| 27 |
"""This tool performs web search to gather relevant data."""
|
| 28 |
# client = TavilyClient(api_key="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")
|
| 29 |
+
websearch = TavilySearchResults(max_results=5, search_depth="advanced",api_key=TAVILY_API_KEY )
|
| 30 |
response = websearch.invoke({"query": query})
|
| 31 |
return response
|
| 32 |
|