Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: logger error in streaming interface (#2807)

cthomas9c098e8912f2
diff --git a/letta/interfaces/anthropic_streaming_interface.py b/letta/interfaces/anthropic_streaming_interface.py
index e295fdd70..a25501d67 100644
--- a/letta/interfaces/anthropic_streaming_interface.py
+++ b/letta/interfaces/anthropic_streaming_interface.py
@@ -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()},
diff --git a/letta/interfaces/openai_streaming_interface.py b/letta/interfaces/openai_streaming_interface.py
index 0ff2c6fb8..bf44867a3 100644
--- a/letta/interfaces/openai_streaming_interface.py
+++ b/letta/interfaces/openai_streaming_interface.py
@@ -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()},