mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
fix: error raise status code not exist (#888)
This commit is contained in:
parent
cd78adb0ab
commit
0cc0b6e052
5
api/core/third_party/spark/spark_llm.py
vendored
5
api/core/third_party/spark/spark_llm.py
vendored
|
@ -102,7 +102,10 @@ class SparkLLMClient:
|
|||
data = json.loads(message)
|
||||
code = data['header']['code']
|
||||
if code != 0:
|
||||
self.queue.put({'error': f"Code: {code}, Error: {data['header']['message']}"})
|
||||
self.queue.put({
|
||||
'status_code': 400,
|
||||
'error': f"Code: {code}, Error: {data['header']['message']}"
|
||||
})
|
||||
ws.close()
|
||||
else:
|
||||
choices = data["payload"]["choices"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user