Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# agent.py
|
| 2 |
import os
|
| 3 |
#from supabase import create_client
|
| 4 |
-
from sentence_transformers import
|
| 5 |
from serpapi import GoogleSearch
|
| 6 |
import pandas as pd
|
| 7 |
import faiss
|
|
@@ -80,7 +80,7 @@ def retrieve_docs(query: str, k: int = 3) -> str:
|
|
| 80 |
return "\n\n---\n\n".join(hits)
|
| 81 |
|
| 82 |
|
| 83 |
-
SERPAPI_KEY = os.getenv("
|
| 84 |
# ---- web_search tool
|
| 85 |
@tool
|
| 86 |
def web_search(query: str, num_results: int = 5) -> str:
|
|
|
|
| 1 |
# agent.py
|
| 2 |
import os
|
| 3 |
#from supabase import create_client
|
| 4 |
+
from sentence_transformers import SentenceTransformer
|
| 5 |
from serpapi import GoogleSearch
|
| 6 |
import pandas as pd
|
| 7 |
import faiss
|
|
|
|
| 80 |
return "\n\n---\n\n".join(hits)
|
| 81 |
|
| 82 |
|
| 83 |
+
SERPAPI_KEY = os.getenv("SERPAPI_KEY")
|
| 84 |
# ---- web_search tool
|
| 85 |
@tool
|
| 86 |
def web_search(query: str, num_results: int = 5) -> str:
|