bugfix: fix the bug that stream generate not work (#2756)
This commit is contained in:
parent
8a4358ecb5
commit
9e37266420
@ -66,7 +66,7 @@ async def generate(request: Request) -> Response:
|
||||
prompt + output.text for output in request_output.outputs
|
||||
]
|
||||
ret = {"text": text_outputs}
|
||||
yield (json.dumps(ret) + "\0").encode("utf-8")
|
||||
yield (json.dumps(ret) + "\n").encode("utf-8")
|
||||
|
||||
if stream:
|
||||
return StreamingResponse(stream_results())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user