forked from phoenix/litellm-mirror
fix - by default log raw curl command on langfuse
This commit is contained in:
parent
48f399bcc4
commit
3b823c7587
1 changed files with 6 additions and 3 deletions
|
@ -1270,7 +1270,11 @@ class Logging:
|
||||||
api_base
|
api_base
|
||||||
) # used for alerting
|
) # used for alerting
|
||||||
masked_headers = {
|
masked_headers = {
|
||||||
k: (v[:-20] + "*" * 20) if (isinstance(v, str) and len(v) > 20) else v
|
k: (
|
||||||
|
(v[:-44] + "*" * 44)
|
||||||
|
if (isinstance(v, str) and len(v) > 44)
|
||||||
|
else "*****"
|
||||||
|
)
|
||||||
for k, v in headers.items()
|
for k, v in headers.items()
|
||||||
}
|
}
|
||||||
formatted_headers = " ".join(
|
formatted_headers = " ".join(
|
||||||
|
@ -1309,7 +1313,6 @@ class Logging:
|
||||||
# check if user wants the raw request logged to their logging provider (like LangFuse)
|
# check if user wants the raw request logged to their logging provider (like LangFuse)
|
||||||
_litellm_params = self.model_call_details.get("litellm_params", {})
|
_litellm_params = self.model_call_details.get("litellm_params", {})
|
||||||
_metadata = _litellm_params.get("metadata", {}) or {}
|
_metadata = _litellm_params.get("metadata", {}) or {}
|
||||||
if _metadata.get("log_raw_request", False) is True:
|
|
||||||
_metadata["raw_request"] = curl_command
|
_metadata["raw_request"] = curl_command
|
||||||
|
|
||||||
if self.logger_fn and callable(self.logger_fn):
|
if self.logger_fn and callable(self.logger_fn):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue