forked from phoenix/litellm-mirror
fix - langfuse.py
This commit is contained in:
parent
1588453532
commit
9ac5d30cb7
1 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@ class LangFuseLogger:
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
from langfuse import Langfuse
|
from langfuse import Langfuse
|
||||||
|
import langfuse
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
f"\033[91mLangfuse not installed, try running 'pip install langfuse' to fix this error: {e}\n{traceback.format_exc()}\033[0m"
|
f"\033[91mLangfuse not installed, try running 'pip install langfuse' to fix this error: {e}\n{traceback.format_exc()}\033[0m"
|
||||||
|
@ -34,7 +35,7 @@ class LangFuseLogger:
|
||||||
"host": self.langfuse_host,
|
"host": self.langfuse_host,
|
||||||
"release": self.langfuse_release,
|
"release": self.langfuse_release,
|
||||||
"debug": self.langfuse_debug,
|
"debug": self.langfuse_debug,
|
||||||
"flush_interval": flush_interval, # flush interval in seconds
|
"flush_interval": flush_interval, # flush interval in seconds
|
||||||
}
|
}
|
||||||
|
|
||||||
if Version(langfuse.version.__version__) >= Version("2.6.0"):
|
if Version(langfuse.version.__version__) >= Version("2.6.0"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue