diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py index 3612cc55d..48dc29ba0 100644 --- a/rag/llm/chat_model.py +++ b/rag/llm/chat_model.py @@ -62,6 +62,8 @@ class Base(ABC): **gen_conf) for resp in response: if not resp.choices:continue + if not resp.choices[0].delta.content: + resp.choices[0].delta.content = "" ans += resp.choices[0].delta.content total_tokens = ( (