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

Make OpenAI models compatible with the general API #374

Closed
rlouf opened this issue Nov 16, 2023 · 2 comments · Fixed by #574
Closed

Make OpenAI models compatible with the general API #374

rlouf opened this issue Nov 16, 2023 · 2 comments · Fixed by #574

Comments

@rlouf
Copy link
Member

rlouf commented Nov 16, 2023

What behavior of the library made you think about the improvement?

The interface with OpenAI models is currently different to that with open source models. This can be confusing, and makes it more complicated to switch between the two that it should be.

How would you like it to behave?

I would like to be able to pass an OpenAIAPI instance to generate.continuation, generate.choice, generate.json. We should raise exceptions and warnings where applicable.

How do we do this?

We can use functools.singledispatch and dispatch on the model type by defining a new LogitsGenerator type.

@jacksonwb
Copy link

Is there currently any way to do json generation from OpenAI models right now?

@rlouf
Copy link
Member Author

rlouf commented Nov 30, 2023

It is being implemented in #373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants