From a008b38cf5b91bf560f088afc1c42d74b65a2ec2 Mon Sep 17 00:00:00 2001 From: Yongteng Lei Date: Wed, 9 Apr 2025 20:29:12 +0800 Subject: [PATCH] Fix: local variable referenced before assignment (#6909) ### What problem does this PR solve? Fix: local variable referenced before assignment. #6803 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- rag/llm/chat_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py index 1cc94ab1e..783faf59a 100644 --- a/rag/llm/chat_model.py +++ b/rag/llm/chat_model.py @@ -211,7 +211,7 @@ class Base(ABC): # For non-rate limit errors or the last attempt, return an error message if attempt == self.max_retries - 1: error_code = ERROR_MAX_RETRIES - return f"{ERROR_PREFIX}: {error_code} - {str(e)}. response: {response}", 0 + return f"{ERROR_PREFIX}: {error_code} - {str(e)}", 0 def _wrap_toolcall_message(self, stream): final_tool_calls = {}