mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
CR
This commit is contained in:
parent
4a31b32a88
commit
32dedbe551
1 changed files with 3 additions and 2 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue