From abffddd0ff60351e8b97ea657ebbea12740fa55b Mon Sep 17 00:00:00 2001 From: Aliaksandr Kuzmik <98702584+alexkuzmik@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:05:49 +0100 Subject: [PATCH] Disable printing messages content (#1071) --- sdks/python/src/opik/logging_messages.py | 4 +--- sdks/python/src/opik/message_processing/message_processors.py | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sdks/python/src/opik/logging_messages.py b/sdks/python/src/opik/logging_messages.py index 8d89e14647..6dba1a9a62 100644 --- a/sdks/python/src/opik/logging_messages.py +++ b/sdks/python/src/opik/logging_messages.py @@ -22,9 +22,7 @@ FAILED_TO_PARSE_OPENAI_STREAM_CONTENT = "Failed to parse openai Stream content. %s" -FAILED_TO_PROCESS_MESSAGE_IN_BACKGROUND_STREAMER = ( - "Failed to process %s. Error: %s,\nContent: %s" -) +FAILED_TO_PROCESS_MESSAGE_IN_BACKGROUND_STREAMER = "Failed to process %s. Error: %s" HALLUCINATION_DETECTION_FAILED = "Failed hallucination detection" diff --git a/sdks/python/src/opik/message_processing/message_processors.py b/sdks/python/src/opik/message_processing/message_processors.py index 51b888e938..4346046a60 100644 --- a/sdks/python/src/opik/message_processing/message_processors.py +++ b/sdks/python/src/opik/message_processing/message_processors.py @@ -58,14 +58,12 @@ def process(self, message: messages.BaseMessage) -> None: logging_messages.FAILED_TO_PROCESS_MESSAGE_IN_BACKGROUND_STREAMER, message_type.__name__, str(exception), - message, ) except Exception as exception: LOGGER.error( logging_messages.FAILED_TO_PROCESS_MESSAGE_IN_BACKGROUND_STREAMER, message_type.__name__, str(exception), - message, exc_info=True, )