Spaces:
Sleeping
Sleeping
Update app.py
Browse files10 unmodified lines111213141516171819202122232425262728293045 unmodified lines7677787980818210 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef show_to_do_list(token:str)-> str:"""A tool that shows all the taks available in todoist accountArgs:token: the token for the account of user that we want to show the tasks."""api = TodoistAPI(token)try:projects = api.get_projects()return projectsexcept Exception as error:return error@tool45 unmodified linesagent = CodeAgent(model=model,tools=[final_answer, get_current_time_in_timezone,image_generation_tool,search_web,show_to_do_list], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,10 unmodified lines11121314151617181920212223242526272829303132333435363738394041424344454645 unmodified lines9293949596979810 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef show_projects(token:str)-> str:"""A tool that shows all the projects available in todoist accountArgs:token: the token for the account of user that we want to show the projects."""api = TodoistAPI(token)try:projects = api.get_projects()projects = [project.name for project in projects]return projectsexcept Exception as error:return error@tooldef add_project(token:str, name:str)-> obj:"""A tool that adds projects in todoist account and then shows the info for projrct.Args:token: the token for the account of user that we want to add the project to.name: the name of the project that we want to add."""api = TodoistAPI(token)try:project = api.add_project(name)return projectexcept Exception as error:return error@tool45 unmodified linesagent = CodeAgent(model=model,tools=[final_answer, get_current_time_in_timezone,image_generation_tool,search_web,show_projects, add_project], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,
app.py+20-4