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

Add support for OpenAI's JSON-mode (response_format) #995

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

its-emile
Copy link

This PR contains:

  • New features
  • Changes to dev-tools e.g. CI config / github tooling
  • Docs
  • Bug fixes
  • Code refactor

What is the current behavior? (You can also link to an open issue here)

None, we currently cannot pass response_format to force json responses with openAI

What is the new behavior?

Evals can use openAI's json mode by passing the response_format parameter in GenerateConfig to pass a simple dict: {"type":"json_object"}

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

No, the response_format parameter is optional and openAI requests are unchanged if omitted

Other information:

@its-emile its-emile marked this pull request as ready for review December 15, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant