(fix) loggers langfuse - print import exception

This commit is contained in:
ishaan-jaff 2023-10-26 09:38:30 -07:00
parent 3e2e1c9efe
commit fd515f2a07

View file

@ -13,8 +13,8 @@ class LangFuseLogger:
def __init__(self):
try:
from langfuse import Langfuse
except:
raise Exception("\033[91mLangfuse not installed, try running 'pip install langfuse' to fix this error\033[0m")
except Exception as e:
raise Exception("\033[91mLangfuse not installed, try running 'pip install langfuse' to fix this error\033[0m", e)
# Instance variables
self.secret_key = os.getenv("LANGFUSE_SECRET_KEY")
self.public_key = os.getenv("LANGFUSE_PUBLIC_KEY")