forked from phoenix/litellm-mirror
fix langfuse logger re-initialized on all failure callbacks
This commit is contained in:
parent
a4695c3010
commit
1d25be0ca8
1 changed files with 10 additions and 2 deletions
|
@ -2452,8 +2452,16 @@ class Logging:
|
|||
kwargs[k] = v
|
||||
# this only logs streaming once, complete_streaming_response exists i.e when stream ends
|
||||
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
|
||||
)
|
||||
):
|
||||
langFuseLogger = LangFuseLogger(
|
||||
langfuse_public_key=self.langfuse_public_key,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue