Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadding tools to the agent
18 unmodified lines192021222223242526272728293032 unmodified lines636465666667686918 unmodified lines return "What magic will you build ?"
@tooldef search_string_on_web(query: str) -> str:def web_search(query: str) -> str: """A tool that searches for a given string on the web and returns relevant information. Args: query: A string representing the search query. """ res = DuckDuckGoSearchTool().search.invoke(query) res = DuckDuckGoSearchTool().web_search(query) if res: return res else:32 unmodified lines agent = CodeAgent( model=model, tools=[final_answer], ## add your tools here (don't remove final answer) tools=[final_answer, web_search, get_current_time_in_timezone, image_generation_tool], ## add your tools here (don't remove final answer) max_steps=6, verbosity_level=1, grammar=None,app.py+3-3