mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(utils.py): fix error string for exception raised
This commit is contained in:
parent
18d8edc145
commit
879d1ae60e
1 changed files with 3 additions and 1 deletions
|
@ -9208,7 +9208,9 @@ class CustomStreamWrapper:
|
||||||
if response_obj["is_finished"]:
|
if response_obj["is_finished"]:
|
||||||
if response_obj["finish_reason"] == "error":
|
if response_obj["finish_reason"] == "error":
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"Mistral API raised a streaming error - finish_reason: error, no content string given."
|
"{} raised a streaming error - finish_reason: error, no content string given. Received Chunk={}".format(
|
||||||
|
self.custom_llm_provider, response_obj
|
||||||
|
)
|
||||||
)
|
)
|
||||||
self.received_finish_reason = response_obj["finish_reason"]
|
self.received_finish_reason = response_obj["finish_reason"]
|
||||||
if response_obj.get("original_chunk", None) is not None:
|
if response_obj.get("original_chunk", None) is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue