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

feat: add json_schema option to parameter rules for o1 & o3-mini #13527

Conversation

Aries0d0f
Copy link

Summary

This PR introduces JSON schema support for three model variants: o1, o3-mini, and o3-mini-2025-01-31. OpenAI already supports the JSON schema for the response format of these models (reference).

Screenshots

Before After
... ...

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Since [OpenAI already support JSON schema for response format](https://platform.openai.com/docs/guides/structured-outputs?example=chain-of-thought#supported-models),
I think it should be update to the corresponding parameter rules.
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. ⚙️ feat:model-runtime labels Feb 11, 2025
@crazywoola
Copy link
Member

Please be aware that we are going to roll out the v1.0.0 changes related to models runtimes and tools will not take effect above v1.0, please make sure adapt the changes to https://github.com/langgenius/dify-official-plugins as well. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ feat:model-runtime size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants