From e869e7b4f502a4738063719794b3dae7fa3aa34d Mon Sep 17 00:00:00 2001 From: Wenzhe Xue Date: Thu, 13 Jun 2024 07:16:29 -0700 Subject: [PATCH] change logging to debug instead of warning --- log10/_httpx_utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/log10/_httpx_utils.py b/log10/_httpx_utils.py index 50a4b246..7543cecb 100644 --- a/log10/_httpx_utils.py +++ b/log10/_httpx_utils.py @@ -167,11 +167,11 @@ def format_anthropic_tools_request(request_content) -> str: async def get_completion_id(request: Request): host = request.headers.get("host") if "anthropic" in host and "/v1/messages" not in str(request.url): - logger.warning("Currently logging is only available for anthropic v1/messages.") + logger.debug("Currently logging is only available for anthropic v1/messages.") return if "openai" in host and "v1/chat/completions" not in str(request.url): - logger.warning("Currently logging is only available for openai v1/chat/completions.") + logger.debug("Currently logging is only available for openai v1/chat/completions.") return request.headers["x-log10-completion-id"] = str(uuid.uuid4()) @@ -209,7 +209,7 @@ async def log_request(request: Request): orig_module = "anthropic.resources.messages" orig_qualname = "Messages.stream" else: - logger.warning("Currently logging is only available for async openai and anthropic.") + logger.debug("Currently logging is only available for async openai and anthropic.") return log_row = { "status": "started", @@ -318,7 +318,7 @@ def is_response_end_reached(self, text: str): elif "openai" in host: return self.is_openai_response_end_reached(text) else: - logger.warning("Currently logging is only available for async openai and anthropic.") + logger.debug("Currently logging is only available for async openai and anthropic.") return False def is_anthropic_response_end_reached(self, text: str): @@ -447,7 +447,7 @@ def parse_response_data(self, responses: list[str]): elif "anthropic" in host: return self.parse_anthropic_responses(responses) else: - logger.warning("Currently logging is only available for async openai and anthropic.") + logger.debug("Currently logging is only available for async openai and anthropic.") return None