Merge pull request #201 from ArtificialZeng/main

Update openai_api.py
main
Yang An 1 year ago committed by GitHub
commit 718c7f2ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save