|
@@ -478,6 +478,10 @@ class OAIAPICompatLargeLanguageModel(_CommonOaiApiCompat, LargeLanguageModel):
|
|
usage=usage,
|
|
usage=usage,
|
|
)
|
|
)
|
|
break
|
|
break
|
|
|
|
+ # handle the error here. for issue #11629
|
|
|
|
+ if chunk_json.get("error") and chunk_json.get("choices") is None:
|
|
|
|
+ raise ValueError(chunk_json.get("error"))
|
|
|
|
+
|
|
if chunk_json:
|
|
if chunk_json:
|
|
if u := chunk_json.get("usage"):
|
|
if u := chunk_json.get("usage"):
|
|
usage = u
|
|
usage = u
|