Unverified Commit 0cc0b6e0 authored by takatost's avatar takatost Committed by GitHub

fix: error raise status code not exist (#888)

parent cd78adb0
......@@ -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"]
......
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