mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-08-20 05:14:10 -07:00
Merge pull request #131 from fauxpilot/fix-streaming
Fix json formatting issue with streaming
This commit is contained in:
commit
e18fbf5145
1 changed files with 2 additions and 2 deletions
|
@ -234,8 +234,8 @@ class CodeGenProxy:
|
|||
for c in choices:
|
||||
completion['id'] = self.random_completion_id()
|
||||
completion['choices'] = [c]
|
||||
yield f'data: {json.dumps(completion)}\n\n'
|
||||
yield 'data: [DONE]\n\n'
|
||||
yield f'{json.dumps(completion)}'
|
||||
yield '[DONE]'
|
||||
|
||||
def non_streamed_response(self, completion, choices) -> str:
|
||||
completion['id'] = self.random_completion_id()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue