Content-Length: 254068 | pFad | http://github.com/huggingface/hub-docs/issues/1642

14 Chat Templating - Missing info on `Tools and RAG` · Issue #1642 · huggingface/hub-docs · GitHub
Skip to content

Chat Templating - Missing info on Tools and RAG #1642

Open
@JosephLeyva

Description

@JosephLeyva

Doc request
On the chat template documentation, on the Tools section, there is missing information of how to trigger the function.

Tools and RAG
Here, before calling the model to read the chat template:

tool_call = {"name": "get_current_temperature", "arguments": {"location": "Paris, France", "unit": "celsius"}}
messages.append({"role": "assistant", "tool_calls": [{"type": "function", "function": tool_call}]})
# missing line:
messages.append({"role": "tool", "name": "get_current_temperature", "content": "22.0"})

I had to go to the Hermes 2 model in order to make the "call" of the function.

Additional context
They have a Jupyter Notebook on their Github that uses Function Calling implementation. Link

Here, they don't hardcode the tool_call and message.append(), instead they do it dynamically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/huggingface/hub-docs/issues/1642

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy