-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support for Structured Outputs #814
Comments
I am looking to add support for the instructor-go currently gives a similar experience as the python API provides, and in place for Pydantic it use Go struct tags and jsonschema. Adding the API support will improve the performance of the model generating the correct format. |
Great news. I'm not sure how you will approach implementing the actual json schema definition within the request but consider allowing for different implementations of the actual json schema creation. I started with field tags, as in instructor-go, but have since moved away from that approach and think field tags are too limiting. |
For instructor, JSON tags has been sufficient. I have been struggling to convert the json schema to the currently defined struct here. I think it would be great to optionally pass a raw schema to For example, the current struct does not support defs, which are crucial, especially with complex data types. The OpenAI API supports this: https://platform.openai.com/docs/guides/structured-outputs/supported-schemas. |
This enhancement would be great! |
Looks like this issue is resolved? #813 |
My issue above is resolved: for those wanting to use their own schema string, and not use the JSONSchema: &openai.ChatCompletionResponseFormatJSONSchema{
Name: "my-name",
Schema: json.RawMessage(schemaJSONString),
Strict: true,
} |
Support added for Structured Output. #813 |
I was wondering if there will support in the future for Structured Outputs. Open AI released this feature on August 6th.
Python example from the Open API docs:
The text was updated successfully, but these errors were encountered: