mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
Merge pull request #3392 from BerriAI/litellm_fix_langfuse_reinitalized
[Fix] bug where langfuse was reinitialized on every call
This commit is contained in:
commit
7ffe410097
1 changed files with 10 additions and 3 deletions
|
@ -1695,10 +1695,17 @@ class Logging:
|
||||||
print_verbose("reaches langfuse for streaming logging!")
|
print_verbose("reaches langfuse for streaming logging!")
|
||||||
result = kwargs["complete_streaming_response"]
|
result = kwargs["complete_streaming_response"]
|
||||||
if langFuseLogger is None or (
|
if langFuseLogger is None or (
|
||||||
self.langfuse_public_key != langFuseLogger.public_key
|
(
|
||||||
and self.langfuse_secret != langFuseLogger.secret_key
|
self.langfuse_public_key is not None
|
||||||
|
and self.langfuse_public_key
|
||||||
|
!= langFuseLogger.public_key
|
||||||
|
)
|
||||||
|
and (
|
||||||
|
self.langfuse_public_key is not None
|
||||||
|
and self.langfuse_public_key
|
||||||
|
!= langFuseLogger.public_key
|
||||||
|
)
|
||||||
):
|
):
|
||||||
print_verbose("Instantiates langfuse client")
|
|
||||||
langFuseLogger = LangFuseLogger(
|
langFuseLogger = LangFuseLogger(
|
||||||
langfuse_public_key=self.langfuse_public_key,
|
langfuse_public_key=self.langfuse_public_key,
|
||||||
langfuse_secret=self.langfuse_secret,
|
langfuse_secret=self.langfuse_secret,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue