Chrunos commited on
Commit
a2b62db
·
verified ·
1 Parent(s): 3d6ca7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -83,7 +83,7 @@ When you don't have current information about recent events or changing data, ac
83
  **Current Context**: Today's date is {current_date}, but your knowledge has a cutoff date and may not include the most recent information."""
84
 
85
  # --- Enhanced Web Search Tool Implementation ---
86
- def Google Search_tool(queries: List[str], num_results: int = 5) -> List[Dict]:
87
  """
88
  Enhanced Google Custom Search with better error handling and result formatting
89
  """
@@ -393,7 +393,7 @@ async def chat_endpoint(request: Request, _: None = Depends(verify_origin)):
393
  search_query = function_args.get("query", "").strip()
394
 
395
  if search_query:
396
- search_results = Google Search_tool([search_query], num_results=5)
397
  for result in search_results:
398
  source_links.append({
399
  "title": result["source_title"],
 
83
  **Current Context**: Today's date is {current_date}, but your knowledge has a cutoff date and may not include the most recent information."""
84
 
85
  # --- Enhanced Web Search Tool Implementation ---
86
+ def Google_Search_tool(queries: List[str], num_results: int = 5) -> List[Dict]:
87
  """
88
  Enhanced Google Custom Search with better error handling and result formatting
89
  """
 
393
  search_query = function_args.get("query", "").strip()
394
 
395
  if search_query:
396
+ search_results = Google_Search_tool([search_query], num_results=5)
397
  for result in search_results:
398
  source_links.append({
399
  "title": result["source_title"],