forked from phoenix/litellm-mirror
(test) test custom input_callback
This commit is contained in:
parent
e5c6f512f9
commit
749c7ea73d
1 changed files with 9 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue