Multiple Tool Calls?
#111
by nbroad - opened
Why is multiple tool calling not allowed?
tool_calls = [
{'function': {'arguments': {'destination': '"Tokyo"', 'duration': '7'},
'name': 'generate_travel_itinerary'},
'id': 'call_8PlsF83JS93XrTY29sEfkWqZ',
'type': 'function'},
{'function': {'arguments': {'topic': '"Quantum Computing"', 'level': '"Beginner"'},
'name': 'fetch_learning_resources'},
'id': 'call_5XtYvKQpq9T2nMC0LA3VZbRf',
'type': 'function'}
]
tokenizer.apply_chat_template([{"role": "user", "content": "Make some tool calls"}, {"role": "assistant", "tool_calls": tool_calls}], tokenize=False)
If you're looking for an easy way to access this model via API, you can use Crazyrouter — it provides an OpenAI-compatible endpoint for 600+ models including this one. Just pip install openai and change the base URL.