Skip to content

Commit

Permalink
fix: minor bug in chat stream output - python error being serialized (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
roblg committed Jan 16, 2024
1 parent d3acd85 commit 6191bcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion private_gpt/open_ai/openai_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 6191bcd

Please sign in to comment.