Skip to content
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

allow json values as function call arguments #274

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

linusbierhoff
Copy link

Currently, only strings (which can be in JSON format) are allowed.

Models like LLAMA, deployed with the Hugging Face Text Generation API, are accessible with the same API as OpenAI, but generate a JSON object instead of a string.

@linusbierhoff
Copy link
Author

Changed from enum to function, which always deserialize in string

@64bit
Copy link
Owner

64bit commented Oct 7, 2024

Thank you for the PR, it is always welcome!

I'd recommend to add this in community crates dedicated to LLAMA instead, unfortunately for async-openai this is out of scope. For more information please see https://github.com/64bit/async-openai?tab=readme-ov-file#contributing

@64bit 64bit added the out of scope Requests which are not related to OpenAI API label Oct 7, 2024
@linusbierhoff
Copy link
Author

@64bit, thank you for your kind reply.
I understand that it's out of scope. Anyway, since it's only a small change that does not affect the OpenAI compatibility, it would be perfect if we could merge it. I think many developers use the langchain-rust crate, which relies on this package, and the parsing issue of the function calls makes it difficult to use.

@64bit
Copy link
Owner

64bit commented Oct 13, 2024

There's an idea on how to support it while keeping the scope limited to OpenAI: #280 (comment)

Please consider it for contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
out of scope Requests which are not related to OpenAI API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants