Cheangys commited on
Commit
6b036c5
·
verified ·
1 Parent(s): 2cd3bbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -60,15 +60,17 @@ def get_stock_price(stock: str) -> str:
60
  return f"Error fetching price for stock '{stock}': {str(e)}"
61
 
62
 
 
63
  @tool
64
  def web_search(query: str) -> dict:
65
- """Fetches the result from a web search using DuckDuckGo.
 
66
 
67
  Args:
68
- query (str): The search query or question to look up online.
69
 
70
  Returns:
71
- dict: A dictionary containing the query and the top search result or an error message.
72
  """
73
  try:
74
  # Initialize the search tool
 
60
  return f"Error fetching price for stock '{stock}': {str(e)}"
61
 
62
 
63
+
64
  @tool
65
  def web_search(query: str) -> dict:
66
+ """
67
+ Fetches the result from a web search using DuckDuckGo.
68
 
69
  Args:
70
+ query (str): A search query or question.
71
 
72
  Returns:
73
+ dict: A dictionary containing the search query and the top result.
74
  """
75
  try:
76
  # Initialize the search tool