(test) test custom input_callback

This commit is contained in:
ishaan-jaff 2023-10-24 17:40:58 -07:00
parent e5c6f512f9
commit 749c7ea73d

View file

@ -57,12 +57,20 @@ def send_slack_alert(
print(f"Failed to send message to Slack. Status code: {response.status_code}") print(f"Failed to send message to Slack. Status code: {response.status_code}")
print(response.json()) 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.success_callback = [custom_callback, send_slack_alert]
litellm.failure_callback = [send_slack_alert] litellm.failure_callback = [send_slack_alert]
litellm.set_verbose = True litellm.set_verbose = True
litellm.input_callback = [get_transformed_inputs]
def test_chat_openai(): def test_chat_openai():
try: try: