File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
litellm/integrations/langfuse Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1
1
#### What this does ####
2
2
# On success, logs events to Langfuse
3
- import copy
4
3
import os
5
4
import traceback
6
5
from datetime import datetime
11
10
import litellm
12
11
from litellm ._logging import verbose_logger
13
12
from litellm .constants import MAX_LANGFUSE_INITIALIZED_CLIENTS
13
+ from litellm .litellm_core_utils .core_helpers import safe_deep_copy
14
14
from litellm .litellm_core_utils .redact_messages import redact_user_api_key_info
15
15
from litellm .llms .custom_httpx .http_handler import _get_httpx_client
16
16
from litellm .secret_managers .main import str_to_bool
@@ -222,7 +222,7 @@ def log_event_on_langfuse(
222
222
litellm_params .get ("metadata" , {}) or {}
223
223
) # if litellm_params['metadata'] == None
224
224
metadata = self .add_metadata_from_header (litellm_params , metadata )
225
- optional_params = copy . deepcopy (kwargs .get ("optional_params" , {}))
225
+ optional_params = safe_deep_copy (kwargs .get ("optional_params" , {}))
226
226
227
227
prompt = {"messages" : kwargs .get ("messages" )}
228
228
You can’t perform that action at this time.
0 commit comments