Skip to content

Commit

Permalink
Add tip to clarify tool calling (#32883)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocketknight1 committed Aug 19, 2024
1 parent 3720484 commit 85345bb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/source/en/chat_templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,15 @@ The model has called the function with valid arguments, in the format requested
inferred that we're most likely referring to the Paris in France, and it remembered that, as the home of SI units,
the temperature in France should certainly be displayed in Celsius.

<Tip>

The output format above is specific to the `Hermes-2-Pro` model we're using in this example. Other models may emit different
tool call formats, and you may need to do some manual parsing at this step. For example, `Llama-3.1` models will emit
slightly different JSON, with `parameters` instead of `arguments`. Regardless of the format the model outputs, you
should add the tool call to the conversation in the format below, with `tool_calls`, `function` and `arguments` keys.

</Tip>

Next, let's append the model's tool call to the conversation.

```python
Expand Down

0 comments on commit 85345bb

Please sign in to comment.