graphrag
graphrag copied to clipboard
[Feature Request]: Structured output
Do you need to file an issue?
- [x] I have searched the existing issues and this feature is not already filed.
- [ ] My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
- [x] I believe this is a legitimate feature request, not just a question. If this is a question, please use the Discussions area.
Is your feature request related to a problem? Please describe.
The problem at least using local models is:
openai.BadRequestError: Error code: 400 - {'error': "'response_format.type' must be 'json_schema'"}
Describe the solution you'd like
I consider the implementation of structured output via pydantic and omitting examples in the prompts to be highly interesting and important. The result tends to be extremely superior.
More info: https://openai.com/index/introducing-structured-outputs-in-the-api/
Additional context
No response
I agree and what this fixed