mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[PR #738] [MERGED] feat: add structured output support to openai_api_compatible #1522
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/738
Author: @mountln
Created: 4/16/2025
Status: ✅ Merged
Merged: 5/6/2025
Merged by: @crazywoola
Base:
main← Head:feat/oai-compat-structured-output📝 Commits (4)
4758eeefeat: add structured output support to openai_api_compatible0461c49style(openai_api_compatible): replace string with enum value190e590Merge branch 'langgenius:main' into feat/oai-compat-structured-output6cc0eb4Merge branch 'main' into feat/oai-compat-structured-output📊 Changes
3 files changed (+49 additions, -1 deletions)
View changed files
📝
models/openai_api_compatible/manifest.yaml(+1 -1)📝
models/openai_api_compatible/models/llm/llm.py(+30 -0)📝
models/openai_api_compatible/provider/openai_api_compatible.yaml(+18 -0)📄 Description
Related Issues or Context
Added structured output support to OpenAI-compatible LLMs.
The parameter rule settings were based on gpt-4o.yaml.
Related Issue and PR
Test Result
If "Structured Output" was set to "Support" in model settings:

Then

json_schemacan be configured in PARAMETERS:Here is an output example:

This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Environment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.