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

This commit is contained in:
John Wang 2023-07-27 16:14:45 +08:00 committed by GitHub
parent ba3dc8cae0
commit 538e3fc256
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -390,7 +390,7 @@ class CompletionService:
result = json.loads(result)
if result.get('error'):
cls.handle_error(result)
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