update dashscope stream output

This commit is contained in:
better629 2024-02-18 20:02:42 +08:00
parent cec879f71b
commit 41d6d2be1d
2 changed files with 4 additions and 2 deletions

View file

@ -192,6 +192,8 @@ class DashScopeLLM(BaseLLM):
if self.config.temperature > 0:
# different model has default temperature. only set when it"s specified.
kwargs["temperature"] = self.config.temperature
if stream:
kwargs["incremental_output"] = True
return kwargs
def _check_response(self, resp: GenerationResponse):