Tool Calling
You can connect Dynamo to external tools and services using function calling (also known as tool calling). By providing a list of available functions, Dynamo can choose to output function arguments for the relevant function(s) which you can execute to augment the prompt with relevant external information.
Tool calling (AKA function calling) is controlled using the tool_choice and tools request parameters.
Prerequisites
To enable this feature, you should set the following flag while launching the backend worker
--dyn-tool-call-parser: select the parser from the available parsers list using the below command
[!NOTE] If no tool call parser is provided by the user, Dynamo will try to use default tool call parsing based on
<TOOLCALL>and<|python_tag|>tool tags.
[!TIP] If your model’s default chat template doesn’t support tool calling, but the model itself does, you can specify a custom chat template per worker with
python -m dynamo.<backend> --custom-jinja-template </path/to/template.jinja>.
Parser to Model Mapping
Examples
Launch Dynamo Frontend and Backend
Tool Calling Request Examples
- Example 1
- Example 2
- Example 3