From 7e752966c4f4b5fef10fdaebd3316d0f47f4bf16 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 22 Oct 2024 18:55:24 +0530 Subject: [PATCH] fix langfuse logger --- litellm/integrations/langfuse.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/litellm/integrations/langfuse.py b/litellm/integrations/langfuse.py index 863480893cb..b245e15fd7c 100644 --- a/litellm/integrations/langfuse.py +++ b/litellm/integrations/langfuse.py @@ -816,7 +816,17 @@ def get_langfuse_logger_for_request( is False ): if temp_langfuse_logger is None: - temp_langfuse_logger = LangFuseLogger() + temp_langfuse_logger = in_memory_dynamic_logger_cache.get_cache( + credentials={}, service_name="langfuse" + ) + if temp_langfuse_logger is None: + temp_langfuse_logger = LangFuseLogger() + in_memory_dynamic_logger_cache.set_cache( + credentials={}, + service_name="langfuse", + logging_obj=temp_langfuse_logger, + ) + return temp_langfuse_logger # get langfuse logging config to use for this request, based on standard_callback_dynamic_params