Agently icon indicating copy to clipboard operation
Agently copied to clipboard

must_call 的入参格式不对

Open Lizhen0628 opened this issue 1 year ago • 3 comments

@must_call_agent.tool(tool_name="get_now") def get_current_datetime_decorated( timezone: ( "str", "[*Required] Timezone string used in pytz.timezone() in Python" ) ): """get current data and time""" tz = pytz.timezone(timezone) return datetime.now().astimezone(tz)

报错内容: 51 if node.arg != "self": 52 tool_info_kwrags["args"].update({ 53 node.arg: ---> 54 (node.annotation.dims[0].value, node.annotation.dims[1].value) 55 if isinstance(node.annotation, ast.Tuple) 56 else (type(node.annotation.value).name, node.annotation.value) 57 }) 58 # get func 59 tool_info_kwrags.update({ "func": func })

AttributeError: 'Tuple' object has no attribute 'dims'

Lizhen0628 avatar May 22 '24 03:05 Lizhen0628