From 879d1ae60e75df0c075ac15a70d002681f67d19a Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 4 Jul 2024 15:52:29 -0700 Subject: [PATCH] fix(utils.py): fix error string for exception raised --- litellm/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index 9390021e0..9855d25f8 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -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: