mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(utils.py): better exception raising if logging object is not able to get set
This commit is contained in:
parent
2014e69e99
commit
c55db28b6f
3 changed files with 34 additions and 19 deletions
|
@ -14,7 +14,7 @@ class LangFuseLogger:
|
|||
try:
|
||||
from langfuse import Langfuse
|
||||
except Exception as e:
|
||||
raise Exception("\033[91mLangfuse not installed, try running 'pip install langfuse' to fix this error\033[0m", e)
|
||||
raise Exception(f"\033[91mLangfuse not installed, try running 'pip install langfuse' to fix this error: {e}\033[0m")
|
||||
# Instance variables
|
||||
self.secret_key = os.getenv("LANGFUSE_SECRET_KEY")
|
||||
self.public_key = os.getenv("LANGFUSE_PUBLIC_KEY")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue