-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 chat completion json_response any #643
Labels
enhancement
New feature or request
Comments
yang-wei
changed the title
make chat completion json_response any any
make chat completion json_response any
Jan 25, 2024
This is not needed due to the new JSON mode: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Many OpenAI alternatives (such as anyscale) currently support
response_format.schema
in ChatCompletion request. The syntax looks likeunder the hood, the library that supports this validates the response and re-prompt the LLM if it doesn't follow the schema response. I understand that this library only implements what OpenAI support that's why my request is to use any for
response_format
type rather thanChatCompletionResponseFormat
Describe the solution you'd like
use any for ResponseFormat type instead of
ChatCompletionResponseFormat
which follows openAI spec (which is object)https://github.com/sashabaranov/go-openai/blob/eff8dc1118ea82a1b50ee316608e24d83df74d6b/chat.go#L196C20-L196C48
Additional context
Happy to send a PR if this is something @sashabaranov think it makes sense
The text was updated successfully, but these errors were encountered: