Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadding tools to the agent
18 unmodified lines19202122232425262728293032 unmodified lines6364656667686918 unmodified linesreturn "What magic will you build ?"@tooldef search_string_on_web(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)if res:return reselse:32 unmodified linesagent = CodeAgent(model=model,tools=[final_answer], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,18 unmodified lines19202122232425262728293032 unmodified lines6364656667686918 unmodified linesreturn "What magic will you build ?"@tooldef 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().web_search(query)if res:return reselse:32 unmodified linesagent = CodeAgent(model=model,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