Commit
·
f1cb55d
1
Parent(s):
8417a25
+ solved search issues with travily
Browse files
__pycache__/langraph_agent.cpython-313.pyc
CHANGED
|
Binary files a/__pycache__/langraph_agent.cpython-313.pyc and b/__pycache__/langraph_agent.cpython-313.pyc differ
|
|
|
langraph_agent.py
CHANGED
|
@@ -111,7 +111,9 @@ def web_search(input: str) -> str:
|
|
| 111 |
Args:
|
| 112 |
input: The search query."""
|
| 113 |
try:
|
| 114 |
-
|
|
|
|
|
|
|
| 115 |
if not search_docs:
|
| 116 |
return {"web_results": "No web search results found for the query."}
|
| 117 |
formatted_search_docs = "\n\n---\n\n".join(
|
|
|
|
| 111 |
Args:
|
| 112 |
input: The search query."""
|
| 113 |
try:
|
| 114 |
+
# TavilySearchResults.invoke expects the query string as its first ("input") argument.
|
| 115 |
+
# Passing it positionally avoids the earlier `missing 1 required positional argument: 'input'` error.
|
| 116 |
+
search_docs = TavilySearchResults(max_results=3).invoke(input)
|
| 117 |
if not search_docs:
|
| 118 |
return {"web_results": "No web search results found for the query."}
|
| 119 |
formatted_search_docs = "\n\n---\n\n".join(
|