dify icon indicating copy to clipboard operation
dify copied to clipboard

Calling the interface for choosing the tongyi model results in an error when selecting blocking mode.

Open wangiii opened this issue 10 months ago • 6 comments

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

Image

✔️ 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 }

wangiii avatar Feb 11 '25 02:02 wangiii

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:

  1. When using the API, the blocking mode is not working [2].
  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

dosubot[bot] avatar Feb 11 '25 02:02 dosubot[bot]

I'm unable to configure the tongyi API key.

Image

dc-vin avatar Feb 17 '25 08:02 dc-vin

I met the same problem, how solve it?

yangjunlei12 avatar Mar 03 '25 17:03 yangjunlei12

I met the same problem too

woaiso avatar Mar 04 '25 06:03 woaiso

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

zzzdajb avatar Mar 04 '25 11:03 zzzdajb

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.

laipz8200 avatar Mar 05 '25 07:03 laipz8200