fix: minor bug in chat stream output - python error being serialized (#1449)

This commit is contained in:
Robert Gay
2024-01-16 07:41:20 -08:00
committed by GitHub
parent d3acd85fe3
commit 6191bcdbd6

View File

@@ -118,5 +118,5 @@ def to_openai_sse_stream(
yield f"data: {OpenAICompletion.json_from_delta(text=response.delta)}\n\n"
else:
yield f"data: {OpenAICompletion.json_from_delta(text=response, sources=sources)}\n\n"
yield f"data: {OpenAICompletion.json_from_delta(text=None, finish_reason='stop')}\n\n"
yield f"data: {OpenAICompletion.json_from_delta(text='', finish_reason='stop')}\n\n"
yield "data: [DONE]\n\n"