Calling the interface for choosing the tongyi model results in an error when selecting blocking mode.
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
0.15.3
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
✔️ Expected Behavior
When selecting the tongyi series model, blocking output is supported.
❌ Actual Behavior
{ "code": "completion_request_error", "message": "[tongyi] Server Unavailable Error, parameter incremental_output only support stream call", "status": 400 }
The error you're encountering with the Tongyi model in blocking mode is due to the incremental_output parameter, which only supports stream calls. This is a known issue where the _generate method in the TongyiLargeLanguageModel class is designed to handle responses with incremental_output=True only when stream=True. When invoked in blocking mode (stream=False), this parameter is not supported, leading to the error [1].
There are similar discussions on this topic that might provide additional insights:
- When using the API, the blocking mode is not working [2].
- Help:agent not support blocking mode in restful api,why? [3].
These discussions are still open and might not have a definitive solution yet. You might want to follow them for updates or potential workarounds.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other
I'm unable to configure the tongyi API key.
I met the same problem, how solve it?
I met the same problem too
I'm unable to configure the tongyi API key.
I met the same problem in 1.0.0,older verisons didn't have this problem
This issue should be fixed in https://github.com/langgenius/dify-official-plugins/pull/377, Please update the plugin to the 0.0.6 version and try again.