From 1b586e50420bd19fe143331acb1543634e4a7888 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 27 Apr 2024 14:53:18 -0700 Subject: [PATCH] fix - allow langfuse init with flush interval --- litellm/integrations/langfuse.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/litellm/integrations/langfuse.py b/litellm/integrations/langfuse.py index 51ad4d19abe..c2612feb805 100644 --- a/litellm/integrations/langfuse.py +++ b/litellm/integrations/langfuse.py @@ -12,7 +12,9 @@ import litellm class LangFuseLogger: # Class variables or attributes - def __init__(self, langfuse_public_key=None, langfuse_secret=None): + def __init__( + self, langfuse_public_key=None, langfuse_secret=None, flush_interval=1 + ): try: from langfuse import Langfuse except Exception as e: @@ -31,7 +33,7 @@ class LangFuseLogger: host=self.langfuse_host, release=self.langfuse_release, debug=self.langfuse_debug, - flush_interval=1, # flush interval in seconds + flush_interval=flush_interval, # flush interval in seconds ) # set the current langfuse project id in the environ