UndefinedError: 'function object' has no attribute 'name'
tools = [get_current_temperature, get_current_wind_speed]
messages = [
{"role": "user", "content": "Hey, what's the temperature in Paris right now?"}
]
inputs = tokenizer.apply_chat_template(messages, chat_template="tool_use", tools=tools, add_generation_prompt=True, return_dict=True, return_tensors="pt")
When applying chat template I am getting undefined error
I dont think its perfect now but give it a try updated tokenizer etc
I am able to use dictnary as tool
example:
tools = [[{'name': 'record_notes', 'description': 'Record and save notes', 'parameters': {'type': 'object', 'properties': {'title': {'type': 'string', 'description': 'The title of the note', 'default': None}, 'content': {'type': 'string', 'description': 'The content of the note', 'default': None}}, 'required': ['title', 'content']}}]]
Little late, but this probably means you need to update your version of transformers