This commit is contained in:
Tomer Bin 2025-02-11 17:41:57 +02:00
parent 4a31b32a88
commit 32dedbe551

View file

@ -30,6 +30,7 @@ from litellm.types.utils import (
ModelResponseStream, ModelResponseStream,
) )
class AimGuardrailMissingSecrets(Exception): class AimGuardrailMissingSecrets(Exception):
pass pass
@ -120,9 +121,9 @@ class AimGuardrail(CustomGuardrail):
{"x-aim-user-email": user_email} if user_email else {} {"x-aim-user-email": user_email} if user_email else {}
) )
response = await self.async_handler.post( response = await self.async_handler.post(
f"{self.api_base}/detect", f"{self.api_base}/detect/output",
headers=headers, headers=headers,
json={"user_prompt": output}, json={"output": output, "messages": request_data.get("messages", [])},
) )
response.raise_for_status() response.raise_for_status()
res = response.json() res = response.json()