NatalieCheong commited on
Commit
d41e4a4
·
verified ·
1 Parent(s): 5667f25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -23
app.py CHANGED
@@ -16,29 +16,7 @@ def my_custom_tool(search_topic: str, max_results: int) -> str:
16
  search_topic: The topic to search for
17
  max_results: Number of results to return (1-3)
18
  """
19
- try:
20
- search_tool = DuckDuckGoSearchTool()
21
- results = search_tool(search_topic)
22
-
23
- if not results:
24
- return f"No information found about '{search_topic}'"
25
-
26
- # Limit number of results
27
- max_results = min(max(1, max_results), 3)
28
- results = results[:max_results]
29
-
30
- # Format response like the time zone example
31
- formatted_results = []
32
- for result in results:
33
- formatted_results.append(
34
- f"Title: {result['title']}\n"
35
- f"Summary: {result['snippet']}"
36
- )
37
-
38
- return "\n\n".join(formatted_results)
39
-
40
- except Exception as e:
41
- return f"Error searching for '{search_topic}': {str(e)}"
42
 
43
  @tool
44
  def get_current_time_in_timezone(timezone: str) -> str:
 
16
  search_topic: The topic to search for
17
  max_results: Number of results to return (1-3)
18
  """
19
+ return "What magic will you build ?"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  @tool
22
  def get_current_time_in_timezone(timezone: str) -> str: