diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py index 479f6fe6d1..11956ad81a 100644 --- a/rag/llm/chat_model.py +++ b/rag/llm/chat_model.py @@ -1340,7 +1340,7 @@ def chat(self, system, history, gen_conf): + response["usage"]["output_tokens"], ) except Exception as e: - return ans + "\n**ERROR**: " + str(e), 0 + return "\n**ERROR**: " + str(e), 0 else: self.client._system_instruction = self.system if "max_tokens" in gen_conf: