mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-14 08:26:09 +00:00
(test) test custom input_callback
This commit is contained in:
@@ -56,13 +56,21 @@ def send_slack_alert(
|
||||
else:
|
||||
print(f"Failed to send message to Slack. Status code: {response.status_code}")
|
||||
print(response.json())
|
||||
|
||||
|
||||
def get_transformed_inputs(
|
||||
kwargs,
|
||||
):
|
||||
params_to_model = kwargs["additional_args"]["complete_input_dict"]
|
||||
print("params to model", params_to_model)
|
||||
|
||||
litellm.success_callback = [custom_callback, send_slack_alert]
|
||||
litellm.failure_callback = [send_slack_alert]
|
||||
|
||||
|
||||
litellm.set_verbose = True
|
||||
|
||||
litellm.input_callback = [get_transformed_inputs]
|
||||
|
||||
|
||||
def test_chat_openai():
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user