langfuser add view button (#7571)
This commit is contained in:
parent
6025002971
commit
9864b35465
8 changed files with 61 additions and 9 deletions
|
|
@ -419,3 +419,11 @@ class LangFuseDataTrace(BaseTraceInstance):
|
|||
except Exception as e:
|
||||
logger.debug(f"LangFuse API check failed: {str(e)}")
|
||||
raise ValueError(f"LangFuse API check failed: {str(e)}")
|
||||
|
||||
def get_project_key(self):
|
||||
try:
|
||||
projects = self.langfuse_client.client.projects.get()
|
||||
return projects.data[0].id
|
||||
except Exception as e:
|
||||
logger.debug(f"LangFuse get project key failed: {str(e)}")
|
||||
raise ValueError(f"LangFuse get project key failed: {str(e)}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue