mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 16:09:00 +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)
|
data = json.loads(message)
|
||||||
code = data['header']['code']
|
code = data['header']['code']
|
||||||
if code != 0:
|
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()
|
ws.close()
|
||||||
else:
|
else:
|
||||||
choices = data["payload"]["choices"]
|
choices = data["payload"]["choices"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user