From 8b9013b8adc990d752ee773d015e34933b0ebc34 Mon Sep 17 00:00:00 2001 From: orangeclk Date: Fri, 23 Aug 2024 10:55:35 +0800 Subject: [PATCH] feat: forward zhipu finish_reason --- api/core/model_runtime/model_providers/zhipuai/llm/llm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/core/model_runtime/model_providers/zhipuai/llm/llm.py b/api/core/model_runtime/model_providers/zhipuai/llm/llm.py index ff971964a8603e..13d8f5e5c32102 100644 --- a/api/core/model_runtime/model_providers/zhipuai/llm/llm.py +++ b/api/core/model_runtime/model_providers/zhipuai/llm/llm.py @@ -444,6 +444,7 @@ def _handle_generate_stream_response(self, model: str, delta=LLMResultChunkDelta( index=delta.index, message=assistant_prompt_message, + finish_reason=delta.finish_reason ) )