This commit is contained in:
hiyouga 2023-12-12 19:58:34 +08:00
parent 0a9c6e0146
commit ada0e536c9
1 changed files with 1 additions and 1 deletions

View File

@ -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])