Spaces:
Sleeping
Sleeping
Update app.py
Browse files3 unmodified lines4567898 unmodified lines18192021222331 unmodified lines555657585960613 unmodified linesimport pytzimport yamlfrom tools.final_answer import FinalAnswerToolfrom Gradio_UI import GradioUI8 unmodified lines# """# return "What magic will you build ?"@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.31 unmodified linesagent = CodeAgent(model=model,tools=[final_answer, get_current_time_in_timezone], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,3 unmodified lines45678910118 unmodified lines20212223242526272829303131 unmodified lines636465666768693 unmodified linesimport pytzimport yamlfrom tools.final_answer import FinalAnswerToolfrom llama_index.tools.wikipedia import WikipediaToolSpecfrom llama_index.agent.openai import OpenAIAgentfrom Gradio_UI import GradioUI8 unmodified lines# """# return "What magic will you build ?"tool_spec = WikipediaToolSpec()agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())agent.chat("Who is Ben Afflecks spouse?")@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.31 unmodified linesagent = CodeAgent(model=model,tools=[final_answer, get_current_time_in_timezone, tool_spec], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,
app.py+9-1