Skip to content

Function Calling with Hugging Face #2060

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed

Function Calling with Hugging Face #2060

wants to merge 10 commits into from

Conversation

Jofthomas
Copy link
Contributor

Blog Post on how to do Function call with Hugging Face models

To merge:
Wednesday at 6.30 pm

@Jofthomas Jofthomas changed the title Add files via upload Function Calling with Hugging Face May 13, 2024
@Jofthomas
Copy link
Contributor Author

Second PR @philschmid @andrewrreed

hey @drbh I added you here as author as said previously.


## Introduction

A few weeks ago, we introduced to you the brand new [Messages AP](https://huggingface.co/blog/tgi-messages-api)I that provided OpenAI compatibility with Text Generation Inference (TGI) and Inference Endpoints.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete the "I"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also AP --> API


A few weeks ago, we introduced to you the brand new [Messages AP](https://huggingface.co/blog/tgi-messages-api)I that provided OpenAI compatibility with Text Generation Inference (TGI) and Inference Endpoints.

We wrote at the time that “*The Messages API does not currently support function calling” this is a limitation that has now been lifted !*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rewrite suggestion: "Today, the Messages API can now support function calling."

To get you started quickly, we’ve included detailed code examples of how to:

- Create an Inference Endpoint
- Call Function with the InferencClient

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: InferenceClient

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also another typo: "This change has been propogated in the huggingface_hub version 0.23.0., meaning any Hugging Face endpoint can now call some tools if using a newer version."


### With the InferencClient from Hugging Face

Function can directly be called with the serverless API, or with any endpoint by with the enpoint url.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: endpoint URL


## Conclusion

You can now call some tools with Hugging Face models in the different frameworks. We can’t wait to see what use cases you will power with open LLMs and tools !

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a call to action with a link to either docs or place where users can try this out for themselves

Copy link
Contributor

@efriis efriis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename to "Tool Calling" to match the general direction of what this feature is called on other platforms?

Will read through deeper later this afternoon

@Jofthomas
Copy link
Contributor Author

Would make sense indeed.

@Jofthomas Jofthomas closed this May 13, 2024
@Jofthomas Jofthomas deleted the Function_calls branch May 13, 2024 23:49
@Jofthomas Jofthomas mentioned this pull request May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants