Kaynağa Gözat

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

tags/0.3.15
takatost 2 yıl önce
ebeveyn
işleme
0cc0b6e052
No account linked to committer's email address
1 değiştirilmiş dosya ile 4 ekleme ve 1 silme
  1. 4
    1
      api/core/third_party/spark/spark_llm.py

+ 4
- 1
api/core/third_party/spark/spark_llm.py Dosyayı Görüntüle

@@ -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…
İptal
Kaydet