fix: logger error in streaming interface (#2807)
This commit is contained in:
@@ -226,7 +226,7 @@ class AnthropicStreamingInterface:
|
||||
except Exception as e:
|
||||
import traceback
|
||||
|
||||
logger.error("Error processing stream: %s", e, traceback.format_exc())
|
||||
logger.error("Error processing stream: %s\n%s", e, traceback.format_exc())
|
||||
ttft_span.add_event(
|
||||
name="stop_reason",
|
||||
attributes={"stop_reason": StopReasonType.error.value, "error": str(e), "stacktrace": traceback.format_exc()},
|
||||
|
||||
@@ -166,7 +166,7 @@ class OpenAIStreamingInterface:
|
||||
except Exception as e:
|
||||
import traceback
|
||||
|
||||
logger.error("Error processing stream: %s", e, traceback.format_exc())
|
||||
logger.error("Error processing stream: %s\n%s", e, traceback.format_exc())
|
||||
ttft_span.add_event(
|
||||
name="stop_reason",
|
||||
attributes={"stop_reason": StopReasonType.error.value, "error": str(e), "stacktrace": traceback.format_exc()},
|
||||
|
||||
Reference in New Issue
Block a user