Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,8 @@ from SPARQLWrapper import SPARQLWrapper, JSON
|
|
| 18 |
# --- Constants ---
|
| 19 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 20 |
HF_TOKEN = os.getenv("HF_TOKEN", None)
|
|
|
|
|
|
|
| 21 |
|
| 22 |
@tool
|
| 23 |
def web_search(query: str) -> str:
|
|
|
|
| 18 |
# --- Constants ---
|
| 19 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 20 |
HF_TOKEN = os.getenv("HF_TOKEN", None)
|
| 21 |
+
REQUESTS_TIMEOUT = 15 # Define a standard timeout for requests
|
| 22 |
+
HEADERS = {'User-Agent': 'GAIAgent/1.0 (Langchain Agent; +http://example.com/info)'} # Be a good citizen
|
| 23 |
|
| 24 |
@tool
|
| 25 |
def web_search(query: str) -> str:
|