fix(langfuse.py): fix langfuse environ check

This commit is contained in:
Krrish Dholakia 2024-04-24 13:20:44 -07:00
parent 157099dd9e
commit cbcb3318f4
9 changed files with 44 additions and 1 deletions

View file

@ -38,9 +38,9 @@ class LangFuseLogger:
# this is used by Alerting to link to the correct project
try:
project_id = self.Langfuse.client.projects.get().data[0].id
os.environ["LANGFUSE_PROJECT_ID"] = project_id
except:
project_id = None
os.environ["LANGFUSE_PROJECT_ID"] = project_id
if os.getenv("UPSTREAM_LANGFUSE_SECRET_KEY") is not None:
self.upstream_langfuse_secret_key = os.getenv(