|
|
|
@ -123,7 +123,7 @@ async def create_chat_completion(request: ChatCompletionRequest):
|
|
|
|
|
generate = predict(query, history, request.model)
|
|
|
|
|
return EventSourceResponse(generate, media_type="text/event-stream")
|
|
|
|
|
|
|
|
|
|
response, _ = model.chat_stream(tokenizer, query, history=history)
|
|
|
|
|
response, _ = model.chat(tokenizer, query, history=history)
|
|
|
|
|
choice_data = ChatCompletionResponseChoice(
|
|
|
|
|
index=0,
|
|
|
|
|
message=ChatMessage(role="assistant", content=response),
|
|
|
|
|