Integrate OpenAI functions with Pydantic
What behavior of the library made you think about the improvement?
OpenAI functions are not available via Outlines. However, we could use it for comparison purposes.
How would you like it to behave?
We would like an API that is similar to the current text.generate.json API or the same.
The main constraint with using the same function is that OpenAI’s response is not always parseable JSON. We could implement it in a separate text.generate.openai.json module.
@rlouf We may need to change the implementation logic here https://github.com/outlines-dev/outlines/blob/main/outlines/generate/json.py#L71 and https://github.com/outlines-dev/outlines/blob/main/outlines/models/openai.py#L253 right?
These are the two entry points indeed.
Thanks for the feedback, I will work on it ASAP