Spaces:
Runtime error
Runtime error
Add Mutual fund tool
Browse files8 unmodified lines91011121314151617181920212232 unmodified lines555657585960618 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type#Keep this format for the description / args / args description but feel free to modify the tool"""A tool that does nothing yetArgs:arg1: the first argumentarg2: the second argument"""return "What magic will you build ?"@tooldef get_current_time_in_timezone(timezone: str) -> str: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,8 unmodified lines910111213141516171819202132 unmodified lines545556575859608 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef mutualfund_information(scheme_code:str)-> str:"""A tool that calls an API to fetch information regarding a mutual fund scheme codeArgs:scheme_code: A numeric string representing an scheme code of an mutual fund"""response = requests.get(f"https://api.mfapi.in/mf/{scheme_code}/latest").json()return response@tooldef get_current_time_in_timezone(timezone: str) -> str:32 unmodified linesagent = CodeAgent(model=model,tools=[final_answer,mutualfund_information,get_current_time_in_timezone], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,
app.py+6-7