mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
REOPEN azure_openai set json_schema Error: Completions.create() got an unexpected keyword argument 'json_schema' #85
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?
Originally created by @prosessxp on GitHub (Mar 18, 2025).
Self Checks
Dify version
v1.0.0
Cloud or Self Hosted
Self Hosted (Docker), Self Hosted (Source)
Steps to reproduce
Use azure openai service, register model gpt-4o-2024-11-20, and use API version 2024-12-01-preview. Use Azure OpenAI Service Model Plugin version 0.0.8
response_format Select json_schema and fill in JSON Schema:
{
"name":"key_note_response",
"description": "get key note from input",
"strict": true,
"schema":{
"type":"object",
"properties":{
"project":{
"type": ["string","null"]
},
"domain":{
"type": ["string","null"]
},
"rule":{
"type": ["string","null"]
},
"class_or_function":{
"type": ["string","null"]
}
},
"additionalProperties": false,
"required": ["project","domain","rule","class_or_function"]
}
}
Run input: how aftersale bill persisted . Run failed: [azure_openai] Error: Completions.create() got an unexpected keyword argument 'json_schema'
✔️ Expected Behavior
Output json format.
❌ Actual Behavior
Run failed: [azure_openai] Error: Completions.create() got an unexpected keyword argument 'json_schema'
@dosubot[bot] commented on GitHub (Mar 18, 2025):
Hey @prosessxp! 👋 I'm a bot here to help you with bug fixes, troubleshooting, and more. Let's work together to solve this issue.
To resolve the error you're encountering with the
Completions.create()function and the unexpected keyword argument 'json_schema', you should upgrade your OpenAI plugin to the latest version. After upgrading, make sure to reconfigure your settings to ensure compatibility with the latest features [1].To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
@crazywoola commented on GitHub (Mar 18, 2025):
What is your plugin version?
@prosessxp commented on GitHub (Mar 18, 2025):
0.0.8