Unverified Commit 2658c4d5 authored by takatost's avatar takatost Committed by GitHub

fix: answer returned null when response_mode was blocking (#1133)

parent 84c76bc0
...@@ -367,7 +367,7 @@ class CompletionService: ...@@ -367,7 +367,7 @@ class CompletionService:
result = json.loads(result) result = json.loads(result)
if result.get('error'): if result.get('error'):
cls.handle_error(result) cls.handle_error(result)
if 'data' in result: if result['event'] == 'message' and 'data' in result:
return cls.get_message_response_data(result.get('data')) return cls.get_message_response_data(result.get('data'))
except ValueError as e: except ValueError as e:
if e.args[0] != "I/O operation on closed file.": # ignore this error if e.args[0] != "I/O operation on closed file.": # ignore this error
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment