AI Safety endpoints
Evaluate
Evaluation and guardrails
POST
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Rails and policies will be evaluated based on the messages. Policies requires at least the user and assistant, and system message is optional.
Example:
[
{
"content": "tell me a joke about the president candidates",
"role": "user"
}
]
If provided, will override the default policies enabled on console.
Example:
["my-jailbreak-guardrail"]
Example:
[
{
"definition": "jailbreak guardrail",
"id": "my-jailbreak-guardrail",
"rules": [
{
"expected": "fail",
"type": "classifier",
"value": "elections"
},
{
"expected": "fail",
"threshold": 0.8,
"type": "rubric",
"value": [
"Avoid political content",
"Avoid stereotyped humor",
"Avoid mentioning election any candidate names"
]
}
],
"target": "input"
}
]
Example:
"I'm sorry, I can't assist with that."
If enabled and any violation happens, will provide a compliant correction to the user input. Override_response has priority.
Example:
false
Example:
true