From ada0e536c926fd0196d127c89cc817da1008c017 Mon Sep 17 00:00:00 2001 From: hiyouga Date: Tue, 12 Dec 2023 19:58:34 +0800 Subject: [PATCH] fix #1795 --- src/llmtuner/api/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llmtuner/api/app.py b/src/llmtuner/api/app.py index 856b936e..4ac08608 100644 --- a/src/llmtuner/api/app.py +++ b/src/llmtuner/api/app.py @@ -128,7 +128,7 @@ def create_app(chat_model: "ChatModel") -> "FastAPI": async def predict(query: str, history: List[Tuple[str, str]], system: str, request: ChatCompletionRequest): choice_data = ChatCompletionResponseStreamChoice( index=0, - delta=DeltaMessage(role=Role.ASSISTANT), + delta=DeltaMessage(role=Role.ASSISTANT, content=""), finish_reason=None ) chunk = ChatCompletionStreamResponse(model=request.model, choices=[choice_data])