adding tools
Browse files32 unmodified lines3334353637383915 unmodified lines5556575859606132 unmodified linesexcept Exception as e:return f"Error fetching time for timezone '{timezone}': {str(e)}"final_answer = FinalAnswerTool()# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:15 unmodified linesagent = CodeAgent(model=model,tools=[final_answer], ## add your tools here (don't remove final answer)max_steps=6, # number of reasoning + action steps allowedverbosity_level=1, # internal reasoning exposedgrammar=None, # optional output schema constraint32 unmodified lines333435363738394015 unmodified lines5657585960616232 unmodified linesexcept Exception as e:return f"Error fetching time for timezone '{timezone}': {str(e)}"get_context = GetRuntimeContextTool()web_search = DuckDuckGoSearchTool()final_answer = FinalAnswerTool()# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:15 unmodified linesagent = CodeAgent(model=model,tools=[final_answer,get_context,web_search,image_generation_tool], ## add your tools here (don't remove final answer)max_steps=6, # number of reasoning + action steps allowedverbosity_level=1, # internal reasoning exposedgrammar=None, # optional output schema constraint
app.py+3-2