RalphThings commited on
Commit
383133c
·
verified ·
1 Parent(s): 3d6f977

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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: