fix(utils.py): fix error string for exception raised

This commit is contained in:
Krrish Dholakia 2024-07-04 15:52:29 -07:00
parent 18d8edc145
commit 879d1ae60e

View file

@ -9208,7 +9208,9 @@ class CustomStreamWrapper:
if response_obj["is_finished"]:
if response_obj["finish_reason"] == "error":
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"]
if response_obj.get("original_chunk", None) is not None: