Tool Use, Unified

📰 Hugging Face Blog

Hugging Face introduces a unified tool use API across popular model families, enabling portable code and easier tool calling

intermediate Published 12 Aug 2024
Action Steps
  1. Explore the unified tool use API documentation
  2. Try out the API with different model families such as Mistral, Cohere, and Llama
  3. Use the helper functionality in Transformers to simplify tool calling
  4. Review the examples provided in the GitHub repository
Who Needs to Know This

Developers and data scientists on a team can benefit from this unified API as it simplifies the process of integrating tools with various models, making their workflow more efficient

Key Insight

💡 The unified tool use API enables developers to write model-agnostic code, reducing the need for model-specific changes

Share This
🚀 Unified tool use API is here! 🤖 Simplify your workflow with portable code across popular model families #HuggingFace #AI #ToolUse

Key Takeaways

Hugging Face introduces a unified tool use API across popular model families, enabling portable code and easier tool calling

Full Article

Published Time: 2024-08-12T00:00:00.438Z

# Tool Use, Unified

[![Image 1: Hugging Face's logo](https://huggingface.co/front/assets/huggingface_logo-noborder.svg)Hugging Face](https://huggingface.co/)

* [Models](https://huggingface.co/models)
* [Datasets](https://huggingface.co/datasets)
* [Spaces](https://huggingface.co/spaces)
* [Buckets new](https://huggingface.co/storage)
* [Docs](https://huggingface.co/docs)
* [Enterprise](https://huggingface.co/enterprise)
* [Pricing](https://huggingface.co/pricing)
*
*
* * *

* [Log In](https://huggingface.co/login)
* [Sign Up](https://huggingface.co/join)

[Back to Articles](https://huggingface.co/blog)

# [](https://huggingface.co/blog/unified-tool-use#tool-use-unified) Tool Use, Unified

Published August 12, 2024

[Update on GitHub](https://github.com/huggingface/blog/blob/main/unified-tool-use.md)

[- [x] Upvote 120](https://huggingface.co/login?next=%2Fblog%2Funified-tool-use)
* [![Image 2](https://cdn-avatars.huggingface.co/v1/production/uploads/5e3aec01f55e2b62848a5217/PMKS0NNB4MJQlTSFzh918.jpeg)](https://huggingface.co/lysandre "lysandre")
* [![Image 3](https://cdn-avatars.huggingface.co/v1/production/uploads/5e48005437cb5b49818287a5/4uCXGGui-9QifAT4qelxU.png)](https://huggingface.co/lvwerra "lvwerra")
* [![Image 4](https://cdn-avatars.huggingface.co/v1/production/uploads/1594651707950-noauth.jpeg)](https://huggingface.co/lewtun "lewtun")
* [![Image 5](https://cdn-avatars.huggingface.co/v1/production/uploads/5f17f0a0925b9863e28ad517/fXIY5i9RLsIa1v3CCuVtt.jpeg)](https://huggingface.co/victor "victor")
* [![Image 6](https://cdn-avatars.huggingface.co/v1/production/uploads/1613511937628-5fb15d1e84389b139cf3b508.jpeg)](https://huggingface.co/MoritzLaurer "MoritzLaurer")
* [![Image 7](https://cdn-avatars.huggingface.co/v1/production/uploads/1625748458774-5fce0cfeb3dbf216ad31836a.png)](https://huggingface.co/Saibo-creator "Saibo-creator")
* +114

[![Image 8: Matthew Carrigan's avatar](https://cdn-avatars.huggingface.co/v1/production/uploads/1660312628256-60ba519750effef3a58beac3.png)](https://huggingface.co/Rocketknight1)

[Matthew Carrigan Rocketknight1 Follow](https://huggingface.co/Rocketknight1)

* [Introduction](https://huggingface.co/blog/unified-tool-use#introduction "Introduction")

* [Chat Templating](https://huggingface.co/blog/unified-tool-use#chat-templating "Chat Templating")

* [Passing tools to a chat template](https://huggingface.co/blog/unified-tool-use#passing-tools-to-a-chat-template "Passing tools to a chat template")

* [Adding tool calls to the chat](https://huggingface.co/blog/unified-tool-use#adding-tool-calls-to-the-chat "Adding tool calls to the chat")

* [Adding tool responses to the chat](https://huggingface.co/blog/unified-tool-use#adding-tool-responses-to-the-chat "Adding tool responses to the chat")

* [Tool use in action](https://huggingface.co/blog/unified-tool-use#tool-use-in-action "Tool use in action")

* [The regrettable disunity of response formats](https://huggingface.co/blog/unified-tool-use#the-regrettable-disunity-of-response-formats "The regrettable disunity of response formats")

* [Conclusion](https://huggingface.co/blog/unified-tool-use#conclusion "Conclusion")

There is now a **unified tool use API** across several popular families of models. This API means the same code is portable - few or no model-specific changes are needed to use tools in chats with [Mistral](https://huggingface.co/mistralai), [Cohere](https://huggingface.co/CohereForAI), [NousResearch](https://huggingface.co/NousResearch) or [Llama](https://huggingface.co/collections/meta-llama/llama-31-669fc079a0c406a149a5738f) models. In addition, Transformers now includes helper functionality to make tool calling even easier, as well as [complete documentation](https://huggingface.co/docs/transformers/main/chat_templating#advanced-tool-use--function-calling) and [examples](https://github.com/huggingface/blog/blob/main/notebo
Read full article → ← Back to Reads

Related Videos

5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
Kimi K3 by Moonshot AI Surpassed Claude Fable 5
Kimi K3 by Moonshot AI Surpassed Claude Fable 5
Dr Mehrdad Arashpour
Get expert perspectives on any problem with Gemini Gems | Google AI Professional Certificate
Get expert perspectives on any problem with Gemini Gems | Google AI Professional Certificate
Google Career Certificates
Learn to use AI as your strategic thought partner | Google AI Professional Certificate
Learn to use AI as your strategic thought partner | Google AI Professional Certificate
Google Career Certificates
What Are Embeddings in AI? | When to Use Them & Why They Matter
What Are Embeddings in AI? | When to Use Them & Why They Matter
Pavithra’s Podcast
What is LLM? Explained in one minute #karthiksshow #chatgpt #artificialintelligence
What is LLM? Explained in one minute #karthiksshow #chatgpt #artificialintelligence
Karthik's Show