mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
fix: return message error in blocking mode (#657)
This commit is contained in:
1 parent
ba3dc8cae0
commit
538e3fc256
1 file changed
+2
-2
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user