Browse Source

fix: return message error in blocking mode (#657)

tags/0.3.11
John Wang 2 years ago
parent
commit
538e3fc256
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      api/services/completion_service.py

+ 2
- 2
api/services/completion_service.py View File

@@ -390,8 +390,8 @@ class CompletionService:
result = json.loads(result)
if result.get('error'):
cls.handle_error(result)
return cls.get_message_response_data(result.get('data'))
if 'data' in result:
return cls.get_message_response_data(result.get('data'))
except ValueError as e:
if e.args[0] != "I/O operation on closed file.": # ignore this error
raise CompletionStoppedError()

Loading…
Cancel
Save