From abd9d129379672197efd7009369b5298cc6253c6 Mon Sep 17 00:00:00 2001 From: Sihan Chen <39623753+Spycsh@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:18:42 +0800 Subject: [PATCH] Fix non stream case (#1115) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- ChatQnA/chatqna.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChatQnA/chatqna.py b/ChatQnA/chatqna.py index f48a69dc0..95318e961 100644 --- a/ChatQnA/chatqna.py +++ b/ChatQnA/chatqna.py @@ -148,6 +148,8 @@ def align_outputs(self, data, cur_node, inputs, runtime_graph, llm_parameters_di next_data["inputs"] = prompt + elif self.services[cur_node].service_type == ServiceType.LLM and not llm_parameters_dict["streaming"]: + next_data["text"] = data["choices"][0]["message"]["content"] else: next_data = data