Spaces:
Running
Running
Update web_search.py
Browse files- web_search.py +2 -0
web_search.py
CHANGED
|
@@ -75,7 +75,9 @@ def _call_tavily(api_key: Optional[str], query: str):
|
|
| 75 |
return {"ok": False, "error": "tavily package not installed."}
|
| 76 |
try:
|
| 77 |
client = TavilyClient(key)
|
|
|
|
| 78 |
resp = client.search(query=query, country="india")
|
|
|
|
| 79 |
return {"ok": True, "data": resp}
|
| 80 |
except Exception as e:
|
| 81 |
return {"ok": False, "error": str(e)}
|
|
|
|
| 75 |
return {"ok": False, "error": "tavily package not installed."}
|
| 76 |
try:
|
| 77 |
client = TavilyClient(key)
|
| 78 |
+
print(query)
|
| 79 |
resp = client.search(query=query, country="india")
|
| 80 |
+
print(resp)
|
| 81 |
return {"ok": True, "data": resp}
|
| 82 |
except Exception as e:
|
| 83 |
return {"ok": False, "error": str(e)}
|