mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-22 22:02:51 +08:00
remove empty stream response
Former-commit-id: e984ba3167d765837cff1030acf59528bcde2f85
This commit is contained in:
parent
6672ad7a83
commit
87b9f70ab4
@ -156,6 +156,7 @@ async def create_stream_chat_completion_response(
|
||||
top_p=request.top_p,
|
||||
max_new_tokens=request.max_tokens,
|
||||
):
|
||||
if len(new_token) != 0:
|
||||
yield _create_stream_chat_completion_chunk(
|
||||
completion_id=completion_id, model=request.model, delta=ChatCompletionMessage(content=new_token)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user