Skip to content
New issue

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

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

Already on GitHub? # to your account

Incompatibility between OpenAI and HF's Chat Completion response_format #932

Open
sadra-barikbin opened this issue Sep 27, 2024 · 1 comment

Comments

@sadra-barikbin
Copy link

Hi there!

OpenAI and HF api seem to have diverged on chat_completion response_format. That of the OpenAI has a type attribute which takes one of three values text, json_object (free-form JSON generation which isn't in TGI yet) and json_schema, and for the last one it has another json_schema attribute which itself contains name, schema, description and strict attributes.

On the other hand, HF's response_format: ChatCompletionInputGrammarType contains type and value attributes.

This might break the OpenAI api usability on HF models. Could we have compatibility between these two on this matter? Or does it need probably breaking changes in TGI and huggingface_hub?

@Wauplin

@Wauplin
Copy link
Contributor

Wauplin commented Sep 27, 2024

Cc @drbh @Narsil @OlivierDehaene on the TGI side

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants