from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.guardrails.get_guardrails()
# Handle response
print(res){
"object": "guardrails_settings",
"guardrails": [
{
"mode": "ban_words",
"enabled": true,
"config": {
"words": [
"spam"
]
}
},
{
"mode": "prompt_injection",
"enabled": true,
"config": {
"threshold": 0.8
}
}
]
}Retrieve the current guardrails configuration for the authenticated user. Returns all configured guardrails including ban words, prompt injection detection, and leakage detection settings.
from mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.guardrails.get_guardrails()
# Handle response
print(res){
"object": "guardrails_settings",
"guardrails": [
{
"mode": "ban_words",
"enabled": true,
"config": {
"words": [
"spam"
]
}
},
{
"mode": "prompt_injection",
"enabled": true,
"config": {
"threshold": 0.8
}
}
]
}Was this page helpful?