[FEATURE] Tools

#470
by victor HF staff - opened
Hugging Chat org
β€’
edited 1 day ago

Tools on HuggingChat

Learn more about available tools in this youtube video: https://www.youtube.com/watch?v=jRcheebdU5U

Today, we are excited to announce the beta release of Tools on HuggingChat! Tools open up a wide range of new possibilities, allowing the model to determine when a tool is needed, which tool to use, and what arguments to pass (via function calling).

  • For now, tools are only available on the default HuggingChat model: Cohere Command R+ because it's optimized for using tools and has performed well in our tests.
  • Tools use ZeroGPU spaces as endpoints, making it super convenient to add and test new tools!

Available tools

Tool name Description Host
Web Search Query the web and do some RAG on retrieved content against the user query HuggingChat internal tool
URL Fetcher Fetch text content from a given URL HuggingChat internal tool
Document Parser Parse content from PDF, text, csv, json and more ZeroGPU Space
Image Generation Generate images based on a given text prompt ZeroGPU Space
Image Editing Edit images based on a given text prompt ZeroGPU Space
Calculator A simple calculator for evaluating mathematical expressions HuggingChat internal tool

How we choose tools

  • A tool must be a ZeroGPU Space that comes by default with exposed API endpoints.
  • Tools need to be fast (~25 seconds max) to ensure a good user experience.
  • In general, we prefer simple and fun tools (like a new model) over complex workflows that are harder to test and more likely to fail.

Do you have an idea for a tool to add or to update one directly on HuggingChat? Share your thoughts in this πŸ‘₯ community discussion.

Next Steps

  • Use previously generated files with tools (probably)
  • Add tools to Community Assistants: Making it possible for users to add their own ZeroGPU Spaces as tools in their Assistants.
  • Add more official tools on a regular basis.
  • Improve existing tools.
  • Support more models (maybe starting with Llama-3)
  • Add multi-step Tool Use (aka Agents)
  • Add ability to reference previous files from the conversation.
  • Add extra tools at runtime via OpenAPI specification.
victor changed discussion title from [FEATURE Tools] to [FEATURE] Tools

chat ui pauses

julien-c pinned discussion

chat ui pauses

https://huggingface.co/chat/ access it from here

Tried to do a Web search many times but I'm stuck with the loading icon and other tools seem to have different problems
Screenshot_2024-05-28-22-02-53-401_com.android.chrome.jpg

Screenshot_2024-05-28-22-07-29-152_com.android.chrome.jpg

Hugging Chat org

@Stefan171 Thanks for the report! Both issues should be fixed now, thanks to your screenshots!

@nsarrazin Pleasure. It's working now. Thanks for developing these tools.

How do we use the PDF parser?

Figured out how to use it, but PDF upload fails with error 413

Hugging Chat org

I think there's an issue with PDFs which are too big, will try to fix it but try to keep it under 1MB for now otherwise it might fail.

Error 413 even with PDFs under 500kb!

I think there's an issue with PDFs which are too big, will try to fix it but try to keep it under 1MB for now otherwise it might fail.

My smallest PDF on my phone is 4.5MB πŸ˜…

Editing an image conversation: https://hf.co/chat/r/zGGHUYc

Is the Calculator tool able to do Randomness? Like say, help to generate random numbers on a range, likes 1-6?

Screenshot-com.android.chrome-20240529115826.jpg

The image visualization tool is not displayed. Unable to create an image.

great tools and a lot of potential ,where or how we can get this as an API ?

Suggestion: Add "memories" to tools. "Memories" is just a function call which will be called by the model if it decides to save some memory which can be preserved across chats similar to chatgpt's memory feature.

Thank you for these tools, I personally appreciate them a lot. I wanted to say that I struggled with the document parser till I unchecked the other tools from the list of six. I don't know if it's a coincidence or if it's actually a fix though.

Screenshot_20240529-105219.png

Hugging Chat org
β€’
edited 20 days ago

Thank you for these tools, I personally appreciate them a lot. I wanted to say that I struggled with the document parser till I unchecked the other tools from the list of six. I don't know if it's a coincidence or if it's actually a fix though.

Weird we'll look at it with @Saghen

Kudos to @victor and the whole team! Great way to start adding Tools and Function Calling to HuggingChat.

One question: I love Download prompt and parameters feature in HuggingChat. It gives transparency as what was the actual prompt in text going to the LLM. However, I see the available tools (all the 6 functions, schema, description, etc.) are missing from the prompt. It seems this is not a complete prompt which doesn't have System Preamble or Available Tools parts.

If we can see the entire results from tokenizer.apply_tool_use_template would be amazing!

image.png

Hugging Chat org

I see the available tools (all the 6 functions, schema, description, etc.) are missing from the prompt.

Yes we are going to add a better debug cc @Saghen

Also add private prompt settings to make it safer

Hi HuggingChat. Are there any plans to create detailed documentation covering the full range of functions (documentation including descriptions of various functions, parameters, limitations and use cases)?

Congrats! This is a great step, specially find the document parser feature really useful .
As you suggested I would love to see llama3 support for these tools since the licensing of command-r+ can be a bit restrictive.

One suggestion I would like to make, is to give users the flexibility to plug in their own document parser, similar to how you can configure your own LLM endpoints.

This comment has been hidden

I'm having an issue where I can't upload a document from my iPhone for the parser. Images will still upload, but no .txt .pdf or .docx

It still works fine from my laptop, but I use my phone far more frequently.

Also, none of the tools appear when using the Huggingchat app from the Apple App Store.

Update: .rtf also not selectable.

Hugging Chat org

We recently upgraded our image generation tool to use Stable Diffusion 3! Feel free to try it out and let us know how it works for you.

I check in here from time to time, and it's good to see that the service is developing. However, its usefulness is still almost negligible. Searching often doesn't work, errors appear, and the chat stops frequently, etc. At the moment, when it comes to free services it's better to use the free Copilot than HuggingChat (or Command R+ directly from the Cohere website). However, I'm keeping my fingers crossed.

Sign up or log in to comment