mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
feat - redact messages from slack alerting
This commit is contained in:
parent
059c59f206
commit
1e8429bb20
3 changed files with 11 additions and 4 deletions
|
@ -60,6 +60,7 @@ _async_failure_callback: List[Callable] = (
|
||||||
pre_call_rules: List[Callable] = []
|
pre_call_rules: List[Callable] = []
|
||||||
post_call_rules: List[Callable] = []
|
post_call_rules: List[Callable] = []
|
||||||
turn_off_message_logging: Optional[bool] = False
|
turn_off_message_logging: Optional[bool] = False
|
||||||
|
redact_messages_in_exceptions: Optional[bool] = False
|
||||||
store_audit_logs = False # Enterprise feature, allow users to see audit logs
|
store_audit_logs = False # Enterprise feature, allow users to see audit logs
|
||||||
## end of callbacks #############
|
## end of callbacks #############
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,9 @@ model_list:
|
||||||
|
|
||||||
general_settings:
|
general_settings:
|
||||||
master_key: sk-1234
|
master_key: sk-1234
|
||||||
|
alerting: ["slack"]
|
||||||
|
|
||||||
litellm_settings:
|
litellm_settings:
|
||||||
callbacks: ["otel"]
|
callbacks: ["otel"]
|
||||||
store_audit_logs: true
|
store_audit_logs: true
|
||||||
|
redact_messages_in_exceptions: True
|
|
@ -8514,7 +8514,11 @@ def exception_type(
|
||||||
extra_information = f"\nModel: {model}"
|
extra_information = f"\nModel: {model}"
|
||||||
if _api_base:
|
if _api_base:
|
||||||
extra_information += f"\nAPI Base: `{_api_base}`"
|
extra_information += f"\nAPI Base: `{_api_base}`"
|
||||||
if messages and len(messages) > 0:
|
if (
|
||||||
|
messages
|
||||||
|
and len(messages) > 0
|
||||||
|
and litellm.redact_messages_in_exceptions is False
|
||||||
|
):
|
||||||
extra_information += f"\nMessages: `{messages}`"
|
extra_information += f"\nMessages: `{messages}`"
|
||||||
|
|
||||||
if _model_group is not None:
|
if _model_group is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue