Guardrails
This page outlines the operations, endpoints, parameters, and example requests and responses for the Guardrails.
GET /api/v2/guardConfigurations/
List resource tags.
Code samples
curl -X GET https://app.datarobot.com/api/v2/guardConfigurations/?entityId=string&entityType=customModel \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
Parameters
| Name |
In |
Type |
Required |
Description |
| offset |
query |
integer |
false |
This many results will be skipped. |
| limit |
query |
integer |
false |
At most this many results are returned. |
| entityId |
query |
string |
true |
Filter guard configurations by the given entity ID. |
| entityType |
query |
string |
true |
Entity type of the given entity ID. |
Enumerated Values
| Parameter |
Value |
| entityType |
[customModel, customModelVersion, playground] |
Example responses
200 Response
{
"count": 0,
"data": [
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"deploymentId": "string",
"description": "string",
"entityId": "string",
"entityType": "customModel",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"stages": [
"prompt"
],
"type": "guardModel"
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Responses
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
POST /api/v2/guardConfigurations/
Create a guard configuration.
Code samples
curl -X POST https://app.datarobot.com/api/v2/guardConfigurations/ \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{GuardConfigurationCreate}'
Body parameter
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"deploymentId": "string",
"description": "string",
"entityId": "string",
"entityType": "customModel",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"stages": [
"prompt"
],
"templateId": "string"
}
Parameters
Example responses
201 Response
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"deploymentId": "string",
"description": "string",
"entityId": "string",
"entityType": "customModel",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"stages": [
"prompt"
],
"type": "guardModel"
}
Responses
| Status |
Meaning |
Description |
Schema |
| 201 |
Created |
none |
GuardConfigurationRetrieveResponse |
| 404 |
Not Found |
Either the resource does not exist or the user does not have permission to create the configuration. |
None |
| 409 |
Conflict |
The proposed configuration name is already in use for the same entity. |
None |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/guardConfigurations/predictionEnvironmentsInUse/
AShow prediction environments in use for moderation.
Code samples
curl -X GET https://app.datarobot.com/api/v2/guardConfigurations/predictionEnvironmentsInUse/?customModelVersionId=string \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
Parameters
| Name |
In |
Type |
Required |
Description |
| offset |
query |
integer |
false |
This many results will be skipped. |
| limit |
query |
integer |
false |
At most this many results are returned. |
| customModelVersionId |
query |
string |
true |
Show prediction environment information for this custom model version. |
Example responses
200 Response
{
"count": 0,
"data": [
{
"id": "string",
"name": "string",
"usedBy": [
{
"configurationId": "string",
"deploymentId": "string",
"name": "string"
}
]
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Responses
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
POST /api/v2/guardConfigurations/toNewCustomModelVersion/
Apply moderation configuration to a new custom model version.
Code samples
curl -X POST https://app.datarobot.com/api/v2/guardConfigurations/toNewCustomModelVersion/ \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{GuardConfigurationToCustomModelVersion}'
Body parameter
{
"customModelId": "string",
"data": [
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"deploymentId": "string",
"description": "string",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"parameters": [
"s"
],
"stages": [
"prompt"
],
"type": "guardModel"
}
],
"overallConfig": {
"timeoutAction": "block",
"timeoutSec": 2
}
}
Parameters
Example responses
200 Response
{
"customModelVersionId": "string"
}
Responses
| Status |
Meaning |
Description |
Schema |
| 200 |
OK |
none |
GuardConfigurationToCustomModelResponse |
| 404 |
Not Found |
Either the resource does not exist or the user does not have permission to create the configuration. |
None |
| 409 |
Conflict |
The destination custom model version is frozen. Create a new version to save configuration. |
None |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
DELETE /api/v2/guardConfigurations/{configId}/
Delete a guard config.
Code samples
curl -X DELETE https://app.datarobot.com/api/v2/guardConfigurations/{configId}/ \
-H "Authorization: Bearer {access-token}"
Parameters
| Name |
In |
Type |
Required |
Description |
| configId |
path |
string |
true |
ID of the configuration. |
Responses
| Status |
Meaning |
Description |
Schema |
| 204 |
No Content |
none |
None |
| 404 |
Not Found |
Either the config does not exist or the user does not have permission to delete it. |
None |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/guardConfigurations/{configId}/
Retrieve info about a guard configuration.
Code samples
curl -X GET https://app.datarobot.com/api/v2/guardConfigurations/{configId}/ \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
Parameters
| Name |
In |
Type |
Required |
Description |
| configId |
path |
string |
true |
ID of the configuration. |
Example responses
200 Response
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"deploymentId": "string",
"description": "string",
"entityId": "string",
"entityType": "customModel",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"stages": [
"prompt"
],
"type": "guardModel"
}
Responses
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
PATCH /api/v2/guardConfigurations/{configId}/
Update a guard config.
Code samples
curl -X PATCH https://app.datarobot.com/api/v2/guardConfigurations/{configId}/ \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{undefined}'
Body parameter
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"deploymentId": "string",
"description": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string"
}
Parameters
| Name |
In |
Type |
Required |
Description |
| configId |
path |
string |
true |
ID of the configuration. |
| body |
body |
GuardConfigurationUpdate |
false |
none |
Example responses
200 Response
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"deploymentId": "string",
"description": "string",
"entityId": "string",
"entityType": "customModel",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"stages": [
"prompt"
],
"type": "guardModel"
}
Responses
| Status |
Meaning |
Description |
Schema |
| 200 |
OK |
none |
GuardConfigurationRetrieveResponse |
| 404 |
Not Found |
Either the resource does not exist or the user does not have permission to create the configuration. |
None |
| 409 |
Conflict |
The proposed configuration name is already in use for the same entity. |
None |
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/guardTemplates/
List guard templates.
Code samples
curl -X GET https://app.datarobot.com/api/v2/guardTemplates/ \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
Parameters
| Name |
In |
Type |
Required |
Description |
| offset |
query |
integer |
false |
This many results will be skipped. |
| limit |
query |
integer |
false |
At most this many results are returned. |
Example responses
200 Response
{
"count": 0,
"data": [
{
"allowedActions": [
"block"
],
"allowedStages": [
"prompt"
],
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"description": "string",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"modifyMessage": "string",
"sendNotification": true
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiDeploymentId": "string",
"orgId": "string",
"productionOnly": true,
"type": "guardModel"
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Responses
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/guardTemplates/{templateId}/
Retrieve info about a guard template.
Code samples
curl -X GET https://app.datarobot.com/api/v2/guardTemplates/{templateId}/ \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
Parameters
| Name |
In |
Type |
Required |
Description |
| templateId |
path |
string |
true |
ID of the template. |
Example responses
200 Response
{
"allowedActions": [
"block"
],
"allowedStages": [
"prompt"
],
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"description": "string",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"modifyMessage": "string",
"sendNotification": true
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiDeploymentId": "string",
"orgId": "string",
"productionOnly": true,
"type": "guardModel"
}
Responses
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/moderationSupportedLlms/
List supported LLMs for moderation.
Code samples
curl -X GET https://app.datarobot.com/api/v2/moderationSupportedLlms/ \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
Parameters
| Name |
In |
Type |
Required |
Description |
| offset |
query |
integer |
false |
This many results will be skipped. |
| limit |
query |
integer |
false |
At most this many results are returned. |
Example responses
200 Response
{
"count": 0,
"data": [
{
"description": "string",
"id": "string",
"llmType": "string",
"model": "string",
"name": "string",
"provider": "string",
"vendor": "string"
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Responses
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
GET /api/v2/overallModerationConfiguration/
Get overall moderation configuration for an entity.
Code samples
curl -X GET https://app.datarobot.com/api/v2/overallModerationConfiguration/?entityId=string&entityType=customModel \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
Parameters
| Name |
In |
Type |
Required |
Description |
| entityId |
query |
string |
true |
Retrieve overall moderation configuration for the given entity ID. |
| entityType |
query |
string |
true |
Entity type of the given entity ID. |
Enumerated Values
| Parameter |
Value |
| entityType |
[customModel, customModelVersion, playground] |
Example responses
200 Response
{
"entityId": "string",
"entityType": "customModel",
"timeoutAction": "block",
"timeoutSec": 2,
"updatedAt": "2019-08-24T14:15:22Z",
"updaterId": "string"
}
Responses
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
PATCH /api/v2/overallModerationConfiguration/
Update overall moderation configuration for an entity.
Code samples
curl -X PATCH https://app.datarobot.com/api/v2/overallModerationConfiguration/ \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{undefined}'
Body parameter
{
"entityId": "string",
"entityType": "customModel",
"timeoutAction": "block",
"timeoutSec": 0
}
Parameters
| Name |
In |
Type |
Required |
Description |
| entityId |
path |
string |
true |
Retrieve overall moderation configuration for the given entity ID. |
| entityType |
path |
string |
true |
Entity type of the given entity ID. |
| body |
body |
OverallModerationConfigurationUpdate |
false |
none |
Enumerated Values
| Parameter |
Value |
| entityType |
[customModel, customModelVersion, playground] |
Example responses
200 Response
{
"entityId": "string",
"entityType": "customModel",
"timeoutAction": "block",
"timeoutSec": 2,
"updatedAt": "2019-08-24T14:15:22Z",
"updaterId": "string"
}
Responses
To perform this operation, you must be authenticated by means of one of the following methods:
BearerAuth
Schemas
DeploymentAndGuardResponse
{
"configurationId": "string",
"deploymentId": "string",
"name": "string"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| configurationId |
string |
true |
|
ID of guard configuration. |
| deploymentId |
string |
true |
|
ID of guard model deployment. |
| name |
string |
true |
|
Name of guard configuration. |
GuardConditionResponse
{
"comparand": true,
"comparator": "greaterThan"
}
Condition to trigger intervention
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| comparand |
any |
true |
|
Condition comparand (basis of comparison) |
anyOf
| Name |
Type |
Required |
Restrictions |
Description |
| » anonymous |
boolean |
false |
|
none |
or
| Name |
Type |
Required |
Restrictions |
Description |
| » anonymous |
number |
false |
|
none |
or
| Name |
Type |
Required |
Restrictions |
Description |
| » anonymous |
string |
false |
|
none |
or
| Name |
Type |
Required |
Restrictions |
Description |
| » anonymous |
[string] |
false |
maxItems: 10
|
none |
continued
| Name |
Type |
Required |
Restrictions |
Description |
| comparator |
string |
true |
|
Condition comparator (operator) |
Enumerated Values
| Property |
Value |
| comparator |
[greaterThan, lessThan, equals, notEquals, is, isNot, matches, doesNotMatch, contains, doesNotContain] |
GuardConfigurationConditionResponse
{
"comparand": true,
"comparator": "greaterThan"
}
Condition to trigger intervention
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| comparand |
any |
true |
|
Condition comparand (basis of comparison |
anyOf
| Name |
Type |
Required |
Restrictions |
Description |
| » anonymous |
boolean |
false |
|
none |
or
| Name |
Type |
Required |
Restrictions |
Description |
| » anonymous |
number |
false |
|
none |
or
| Name |
Type |
Required |
Restrictions |
Description |
| » anonymous |
string |
false |
|
none |
or
| Name |
Type |
Required |
Restrictions |
Description |
| » anonymous |
[string] |
false |
maxItems: 10
|
none |
continued
| Name |
Type |
Required |
Restrictions |
Description |
| comparator |
string |
true |
|
Condition comparator (operator) |
Enumerated Values
| Property |
Value |
| comparator |
[greaterThan, lessThan, equals, notEquals, is, isNot, matches, doesNotMatch, contains, doesNotContain] |
GuardConfigurationCreate
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"deploymentId": "string",
"description": "string",
"entityId": "string",
"entityType": "customModel",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"stages": [
"prompt"
],
"templateId": "string"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| allowedActions |
[string] |
false |
maxItems: 10
|
The actions this guard is allowed to take. |
| awsAccount |
string,null |
false |
|
ID of user credential containing an AWS account. |
| awsModel |
string,null |
false |
|
AWS model. |
| awsRegion |
string,null |
false |
maxLength: 255
|
AWS model region. |
| deploymentId |
string,null |
false |
|
ID of deployed model, for model guards. |
| description |
string |
false |
maxLength: 4096
|
Guard configuration description |
| entityId |
string |
true |
|
ID of custom model or playground for this guard. |
| entityType |
string |
true |
|
Type of associated entity. |
| googleModel |
string,null |
false |
|
Google model. |
| googleRegion |
string,null |
false |
maxLength: 255
|
Google model region. |
| googleServiceAccount |
string,null |
false |
|
ID of user credential containing a Google service account. |
| intervention |
GuardConfigurationInterventionResponse |
false |
|
Intervention configuration for the guard. |
| llmType |
string,null |
false |
|
Type of LLM used by this guard |
| modelInfo |
GuardConfigurationPayloadModelInfo |
false |
|
Configuration info for guards using deployed models. |
| name |
string |
true |
maxLength: 255
|
Guard configuration name |
| nemoInfo |
GuardConfigurationNemoInfoResponse |
false |
|
Configuration info for NeMo guards. |
| openaiApiBase |
string,null |
false |
maxLength: 255
|
Azure OpenAI API Base URL |
| openaiApiKey |
string,null |
false |
maxLength: 255
|
Deprecated; use openai_credential instead |
| openaiCredential |
string,null |
false |
|
ID of user credential containing an OpenAI token. |
| openaiDeploymentId |
string,null |
false |
maxLength: 255
|
Open API Deployment ID |
| stages |
[string] |
true |
maxItems: 16
|
The stages where the guard can run. |
| templateId |
string |
true |
|
ID of template this guard is based on. |
Enumerated Values
| Property |
Value |
| awsModel |
[amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus] |
| entityType |
[customModel, customModelVersion, playground] |
| googleModel |
[chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType |
[openAi, azureOpenAi, google, amazon, datarobot, nim] |
GuardConfigurationFullPost
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"deploymentId": "string",
"description": "string",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"parameters": [
"s"
],
"stages": [
"prompt"
],
"type": "guardModel"
}
Complete guard configuration to push
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| allowedActions |
[string] |
false |
maxItems: 10
|
The actions this guard is allowed to take. |
| awsAccount |
string,null |
false |
|
ID of user credential containing an AWS account. |
| awsModel |
string,null |
false |
|
AWS model. |
| awsRegion |
string,null |
false |
maxLength: 255
|
AWS model region. |
| deploymentId |
string,null |
false |
|
ID of deployed model, for model guards. |
| description |
string |
true |
maxLength: 4096
|
Guard configuration description |
| errorMessage |
string,null |
false |
|
Error message if the guard configuration is invalid. |
| googleModel |
string,null |
false |
|
Google model. |
| googleRegion |
string,null |
false |
maxLength: 255
|
Google model region. |
| googleServiceAccount |
string,null |
false |
|
ID of user credential containing a Google service account. |
| intervention |
GuardConfigurationInterventionResponse |
false |
|
Intervention configuration for the guard. |
| isValid |
boolean |
false |
|
Whether the guard is valid or not. |
| llmType |
string,null |
false |
|
Type of LLM used by this guard |
| modelInfo |
GuardModelInfoResponse |
false |
|
Configuration info for guards using deployed models. |
| name |
string |
true |
maxLength: 255
|
Guard configuration name |
| nemoInfo |
GuardConfigurationNemoInfoResponse |
false |
|
Configuration info for NeMo guards. |
| ootbType |
string,null |
false |
|
Guard template "Out of the Box" metric type |
| openaiApiBase |
string,null |
false |
maxLength: 255
|
Azure OpenAI API Base URL |
| openaiApiKey |
string,null |
false |
maxLength: 255
|
Deprecated; use openai_credential instead |
| openaiCredential |
string,null |
false |
|
ID of user credential containing an OpenAI token. |
| openaiDeploymentId |
string,null |
false |
maxLength: 255
|
OpenAI Deployment ID |
| parameters |
[string] |
false |
maxItems: 1
|
Parameter list, not used, deprecated. |
| stages |
[string] |
true |
maxItems: 16
|
The stages where the guard is configured to run. |
| type |
string |
true |
|
Guard configuration type |
Enumerated Values
| Property |
Value |
| awsModel |
[amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus] |
| googleModel |
[chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType |
[openAi, azureOpenAi, google, amazon, datarobot, nim] |
| ootbType |
[token_count, faithfulness, rouge_1] |
| type |
[guardModel, nemo, ootb, pii, userModel] |
GuardConfigurationInterventionResponse
{
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
}
Intervention configuration for the guard.
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| action |
string |
true |
|
Action to take if conditions are met |
| allowedActions |
[string] |
false |
maxItems: 10
|
The actions this guard is allowed to take. |
| conditionLogic |
string |
false |
|
Action to take if conditions are met |
| conditions |
[GuardConfigurationConditionResponse] |
true |
maxItems: 1
|
List of conditions to trigger intervention |
| message |
string |
true |
maxLength: 4096
|
Message to use if prompt or response is blocked |
| sendNotification |
boolean |
false |
|
Create a notification event if intervention is triggered |
Enumerated Values
| Property |
Value |
| action |
[block, report, replace] |
| conditionLogic |
any |
GuardConfigurationListResponse
{
"count": 0,
"data": [
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"deploymentId": "string",
"description": "string",
"entityId": "string",
"entityType": "customModel",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"stages": [
"prompt"
],
"type": "guardModel"
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| count |
integer |
false |
|
Number of items returned on this page. |
| data |
[GuardConfigurationRetrieveResponse] |
true |
maxItems: 200
|
list of guard configurations. |
| next |
string,null(uri) |
true |
|
URL pointing to the next page (if null, there is no next page). |
| previous |
string,null(uri) |
true |
|
URL pointing to the previous page (if null, there is no previous page). |
| totalCount |
integer |
true |
|
The total number of items across all pages. |
GuardConfigurationNemoInfoResponse
{
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
}
Configuration info for NeMo guards.
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| actions |
string |
false |
maxLength: 4096
|
NeMo guardrails actions file |
| blockedTerms |
string |
true |
maxLength: 4096
|
NeMo guardrails blocked terms list |
| credentialId |
string,null |
false |
|
NeMo guardrails credential ID (deprecated; use "openai_credential") |
| llmPrompts |
string |
false |
maxLength: 4096
|
NeMo guardrails prompts |
| mainConfig |
string |
true |
maxLength: 4096
|
Overall NeMo configuration YAML |
| railsConfig |
string |
true |
maxLength: 4096
|
NeMo guardrails configuration Colang |
GuardConfigurationPayloadModelInfo
{
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
}
Configuration info for guards using deployed models.
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| classNames |
[string] |
false |
maxItems: 100
|
List of class names for multiclass models |
| inputColumnName |
string |
true |
maxLength: 255
|
Input column name |
| modelId |
string,null |
false |
|
ID of registered model, for model guards. |
| modelName |
string |
false |
maxLength: 255
|
ID of registered model, for .model guards |
| outputColumnName |
string |
true |
maxLength: 255
|
Output column name |
| replacementTextColumnName |
string |
false |
maxLength: 255
|
Name of the output column with replacement text. Required only if intervention.action is replace. |
| targetType |
string,null |
false |
|
Target type |
Enumerated Values
| Property |
Value |
| targetType |
[Binary, Regression, Multiclass, TextGeneration] |
GuardConfigurationPredictionEnvironmentsInUseListResponse
{
"count": 0,
"data": [
{
"id": "string",
"name": "string",
"usedBy": [
{
"configurationId": "string",
"deploymentId": "string",
"name": "string"
}
]
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| count |
integer |
false |
|
Number of items returned on this page. |
| data |
[PredictionEnvironmentInUseResponse] |
true |
maxItems: 32
|
list of prediction environments in use for this custom model version. |
| next |
string,null(uri) |
true |
|
URL pointing to the next page (if null, there is no next page). |
| previous |
string,null(uri) |
true |
|
URL pointing to the previous page (if null, there is no previous page). |
| totalCount |
integer |
true |
|
The total number of items across all pages. |
GuardConfigurationRetrieveResponse
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"deploymentId": "string",
"description": "string",
"entityId": "string",
"entityType": "customModel",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"stages": [
"prompt"
],
"type": "guardModel"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| allowedActions |
[string] |
false |
maxItems: 10
|
The actions this guard is allowed to take. |
| awsAccount |
string,null |
false |
|
ID of user credential containing an AWS account. |
| awsModel |
string,null |
false |
|
AWS model. |
| awsRegion |
string,null |
false |
maxLength: 255
|
AWS model region. |
| createdAt |
string(date-time) |
true |
|
When the configuration was created. |
| creatorId |
string,null |
false |
|
ID of the user who created the Guard configuration. |
| creatorName |
string |
false |
maxLength: 1000
|
Name of the user who created the Guard configuration. |
| deploymentId |
string,null |
false |
|
ID of deployed model, for model guards. |
| description |
string |
true |
maxLength: 4096
|
Guard configuration description |
| entityId |
string,null |
true |
|
ID of custom model or playground for this guard. |
| entityType |
string |
true |
|
Type of associated entity. |
| errorMessage |
string,null |
false |
|
Error message if the guard configuration is invalid. |
| googleModel |
string,null |
false |
|
Google model. |
| googleRegion |
string,null |
false |
maxLength: 255
|
Google model region. |
| googleServiceAccount |
string,null |
false |
|
ID of user credential containing a Google service account. |
| id |
string |
true |
|
Guard configuration object ID |
| intervention |
GuardConfigurationInterventionResponse |
false |
|
Intervention configuration for the guard. |
| isValid |
boolean |
false |
|
Whether the guard is valid or not. |
| llmType |
string,null |
false |
|
Type of LLM used by this guard |
| modelInfo |
GuardModelInfoResponse |
false |
|
Configuration info for guards using deployed models. |
| name |
string |
true |
maxLength: 255
|
Guard configuration name |
| nemoInfo |
GuardConfigurationNemoInfoResponse |
false |
|
Configuration info for NeMo guards. |
| ootbType |
string,null |
false |
|
Guard template "Out of the Box" metric type |
| openaiApiBase |
string,null |
false |
maxLength: 255
|
Azure OpenAI API Base URL |
| openaiApiKey |
string,null |
false |
maxLength: 255
|
Deprecated; use openai_credential instead |
| openaiCredential |
string,null |
false |
|
ID of user credential containing an OpenAI token. |
| openaiDeploymentId |
string,null |
false |
maxLength: 255
|
Open API Deployment ID |
| stages |
[string] |
true |
maxItems: 16
|
The stages where the guard is configured to run. |
| type |
string |
true |
|
Guard configuration type |
Enumerated Values
| Property |
Value |
| awsModel |
[amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus] |
| entityType |
[customModel, customModelVersion, playground] |
| googleModel |
[chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType |
[openAi, azureOpenAi, google, amazon, datarobot, nim] |
| ootbType |
[token_count, faithfulness, rouge_1] |
| type |
[guardModel, nemo, ootb, pii, userModel] |
GuardConfigurationToCustomModelResponse
{
"customModelVersionId": "string"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| customModelVersionId |
string |
true |
|
ID of the new custom model version created. |
GuardConfigurationToCustomModelVersion
{
"customModelId": "string",
"data": [
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"deploymentId": "string",
"description": "string",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string",
"parameters": [
"s"
],
"stages": [
"prompt"
],
"type": "guardModel"
}
],
"overallConfig": {
"timeoutAction": "block",
"timeoutSec": 2
}
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| customModelId |
string |
true |
|
ID the custom model the user is working with. |
| data |
[GuardConfigurationFullPost] |
true |
maxItems: 200
|
List of complete guard configurations to push |
| overallConfig |
OverallConfigUpdate |
false |
|
Overall moderation configuration to push (not specific to one guard) |
GuardConfigurationUpdate
{
"allowedActions": [
"block"
],
"awsAccount": "string",
"awsModel": "amazon-titan",
"awsRegion": "string",
"deploymentId": "string",
"description": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"googleServiceAccount": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"message": "string",
"sendNotification": false
},
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "string",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "string",
"mainConfig": "string",
"railsConfig": "string"
},
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiCredential": "string",
"openaiDeploymentId": "string"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| allowedActions |
[string] |
false |
maxItems: 10
|
The actions this guard is allowed to take. |
| awsAccount |
string,null |
false |
|
ID of user credential containing an AWS account. |
| awsModel |
string,null |
false |
|
AWS model. |
| awsRegion |
string,null |
false |
maxLength: 255
|
AWS model region. |
| deploymentId |
string,null |
false |
|
ID of deployed model, for model guards. |
| description |
string |
false |
maxLength: 4096
|
Guard configuration description |
| googleModel |
string,null |
false |
|
Google model. |
| googleRegion |
string,null |
false |
maxLength: 255
|
Google model region. |
| googleServiceAccount |
string,null |
false |
|
ID of user credential containing a Google service account. |
| intervention |
GuardConfigurationInterventionResponse |
false |
|
Intervention configuration for the guard. |
| llmType |
string,null |
false |
|
Type of LLM used by this guard |
| modelInfo |
GuardConfigurationPayloadModelInfo |
false |
|
Configuration info for guards using deployed models. |
| name |
string |
false |
maxLength: 255
|
Guard configuration name |
| nemoInfo |
GuardConfigurationNemoInfoResponse |
false |
|
Configuration info for NeMo guards. |
| openaiApiBase |
string,null |
false |
maxLength: 255
|
Azure OpenAI API Base URL |
| openaiApiKey |
string,null |
false |
maxLength: 255
|
Deprecated; use openai_credential instead |
| openaiCredential |
string,null |
false |
|
ID of user credential containing an OpenAI token. |
| openaiDeploymentId |
string,null |
false |
maxLength: 255
|
Open API Deployment ID |
Enumerated Values
| Property |
Value |
| awsModel |
[amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus] |
| googleModel |
[chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType |
[openAi, azureOpenAi, google, amazon, datarobot, nim] |
GuardInterventionResponse
{
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"modifyMessage": "string",
"sendNotification": true
}
Intervention configuration for the guard.
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| action |
string |
true |
|
Action to take if conditions are met |
| allowedActions |
[string] |
false |
maxItems: 10
|
The actions this guard is allowed to take. |
| conditionLogic |
string |
false |
|
Action to take if conditions are met |
| conditions |
[GuardConditionResponse] |
true |
maxItems: 1
|
List of conditions to trigger intervention |
| modifyMessage |
string |
true |
maxLength: 4096
|
Message to use if prompt or response is blocked |
| sendNotification |
boolean |
false |
|
Create a notification event if intervention is triggered |
Enumerated Values
| Property |
Value |
| action |
[block, report, replace] |
| conditionLogic |
any |
GuardModelInfoResponse
{
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
}
Configuration info for guards using deployed models.
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| classNames |
[string] |
false |
maxItems: 100
|
List of class names for multiclass models |
| inputColumnName |
string |
true |
maxLength: 255
|
Input column name |
| modelId |
string,null |
false |
|
ID of registered model, for model guards. |
| modelName |
string |
false |
maxLength: 255
|
ID of registered model, for .model guards |
| outputColumnName |
string |
true |
maxLength: 255
|
Output column name |
| replacementTextColumnName |
string |
false |
maxLength: 255
|
Name of the output column with replacement text. Required only if intervention.action is replace. |
| targetType |
string |
true |
|
Target type |
Enumerated Values
| Property |
Value |
| targetType |
[Binary, Regression, Multiclass, TextGeneration] |
GuardNemoInfoResponse
{
"actions": "",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "",
"mainConfig": "string",
"railsConfig": "string"
}
Configuration info for NeMo guards.
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| actions |
string |
false |
maxLength: 4096
|
NeMo guardrails actions |
| blockedTerms |
string |
true |
maxLength: 4096
|
NeMo guardrails blocked terms list |
| credentialId |
string,null |
false |
|
NeMo guardrails credential ID |
| llmPrompts |
string |
false |
maxLength: 4096
|
NeMo guardrails prompts |
| mainConfig |
string |
true |
maxLength: 4096
|
Overall NeMo configuration YAML |
| railsConfig |
string |
true |
maxLength: 4096
|
NeMo guardrails configuration Colang |
GuardTemplateListResponse
{
"count": 0,
"data": [
{
"allowedActions": [
"block"
],
"allowedStages": [
"prompt"
],
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"description": "string",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"modifyMessage": "string",
"sendNotification": true
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiDeploymentId": "string",
"orgId": "string",
"productionOnly": true,
"type": "guardModel"
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| count |
integer |
false |
|
Number of items returned on this page. |
| data |
[GuardTemplateRetrieveResponse] |
true |
maxItems: 200
|
list of guard templates. |
| next |
string,null(uri) |
true |
|
URL pointing to the next page (if null, there is no next page). |
| previous |
string,null(uri) |
true |
|
URL pointing to the previous page (if null, there is no previous page). |
| totalCount |
integer |
true |
|
The total number of items across all pages. |
GuardTemplateRetrieveResponse
{
"allowedActions": [
"block"
],
"allowedStages": [
"prompt"
],
"awsModel": "amazon-titan",
"awsRegion": "string",
"createdAt": "2019-08-24T14:15:22Z",
"creatorId": "string",
"creatorName": "string",
"description": "string",
"errorMessage": "string",
"googleModel": "chat-bison",
"googleRegion": "string",
"id": "string",
"intervention": {
"action": "block",
"allowedActions": [
"block"
],
"conditionLogic": "any",
"conditions": [
{
"comparand": true,
"comparator": "greaterThan"
}
],
"modifyMessage": "string",
"sendNotification": true
},
"isValid": true,
"llmType": "openAi",
"modelInfo": {
"classNames": [
"string"
],
"inputColumnName": "string",
"modelId": "string",
"modelName": "",
"outputColumnName": "string",
"replacementTextColumnName": "",
"targetType": "Binary"
},
"name": "string",
"nemoInfo": {
"actions": "",
"blockedTerms": "string",
"credentialId": "string",
"llmPrompts": "",
"mainConfig": "string",
"railsConfig": "string"
},
"ootbType": "token_count",
"openaiApiBase": "string",
"openaiApiKey": "string",
"openaiDeploymentId": "string",
"orgId": "string",
"productionOnly": true,
"type": "guardModel"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| allowedActions |
[string] |
false |
maxItems: 10
|
The actions this guard is allowed to take. |
| allowedStages |
[string] |
true |
maxItems: 16
|
The stages where the guard can run. |
| awsModel |
string,null |
false |
|
AWS model. |
| awsRegion |
string,null |
false |
maxLength: 255
|
AWS model region. |
| createdAt |
string(date-time) |
true |
|
When the template was created. |
| creatorId |
string,null |
false |
|
ID of the user who created the Guard template. |
| creatorName |
string |
false |
maxLength: 1000
|
ID of the user who created the Guard template. |
| description |
string |
true |
maxLength: 4096
|
Guard template description |
| errorMessage |
string,null |
false |
|
Error message if the guard configuration is invalid. |
| googleModel |
string,null |
false |
|
Google model. |
| googleRegion |
string,null |
false |
maxLength: 255
|
Google model region. |
| id |
string |
true |
|
Guard template object ID |
| intervention |
GuardInterventionResponse |
false |
|
Intervention configuration for the guard. |
| isValid |
boolean |
false |
|
True if the guard is fully configured and valid. |
| llmType |
string,null |
false |
|
Type of LLM used by this guard |
| modelInfo |
GuardModelInfoResponse |
false |
|
Configuration info for guards using deployed models. |
| name |
string |
true |
maxLength: 255
|
Guard template name |
| nemoInfo |
GuardNemoInfoResponse |
false |
|
Configuration info for NeMo guards. |
| ootbType |
string,null |
false |
|
Guard template "Out of the Box" metric type |
| openaiApiBase |
string,null |
false |
maxLength: 255
|
Azure OpenAI API Base URL |
| openaiApiKey |
string,null |
false |
maxLength: 255
|
Deprecated; use openai_credential instead |
| openaiDeploymentId |
string,null |
false |
maxLength: 255
|
Open API Deployment ID |
| orgId |
string,null |
false |
|
Organization ID of the user who created the Guard template. |
| productionOnly |
boolean,null |
false |
|
Whether the guard is for production only, or if it can be used in production and playground. |
| type |
string |
true |
|
Guard template type |
Enumerated Values
| Property |
Value |
| awsModel |
[amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus] |
| googleModel |
[chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType |
[openAi, azureOpenAi, google, amazon, datarobot, nim] |
| ootbType |
[token_count, faithfulness, rouge_1] |
| type |
[guardModel, nemo, ootb, pii, userModel] |
OverallConfigUpdate
{
"timeoutAction": "block",
"timeoutSec": 2
}
Overall moderation configuration to push (not specific to one guard)
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| timeoutAction |
string |
true |
|
Action to take if timeout occurs |
| timeoutSec |
integer |
true |
minimum: 2
|
Timeout value in seconds for any guard |
Enumerated Values
| Property |
Value |
| timeoutAction |
[block, score] |
OverallModerationConfigurationResponse
{
"entityId": "string",
"entityType": "customModel",
"timeoutAction": "block",
"timeoutSec": 2,
"updatedAt": "2019-08-24T14:15:22Z",
"updaterId": "string"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| entityId |
string |
true |
|
ID of custom model or playground for this configuration. |
| entityType |
string |
true |
|
Type of associated entity. |
| timeoutAction |
string |
true |
|
Action to take if timeout occurs |
| timeoutSec |
integer |
true |
minimum: 2
|
Timeout value in seconds for any guard |
| updatedAt |
string(date-time) |
false |
|
When the configuration was updated. |
| updaterId |
string,null |
true |
|
ID of user who updated the configuration. |
Enumerated Values
| Property |
Value |
| entityType |
[customModel, customModelVersion, playground] |
| timeoutAction |
[block, score] |
OverallModerationConfigurationUpdate
{
"entityId": "string",
"entityType": "customModel",
"timeoutAction": "block",
"timeoutSec": 0
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| entityId |
string |
true |
|
ID of custom model or playground for this configuration. |
| entityType |
string |
true |
|
Type of associated entity. |
| timeoutAction |
string |
true |
|
Action to take if timeout occurs |
| timeoutSec |
integer |
true |
minimum: 0
|
Timeout value in seconds for any guard |
Enumerated Values
| Property |
Value |
| entityType |
[customModel, customModelVersion, playground] |
| timeoutAction |
[block, score] |
PredictionEnvironmentInUseResponse
{
"id": "string",
"name": "string",
"usedBy": [
{
"configurationId": "string",
"deploymentId": "string",
"name": "string"
}
]
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| id |
string |
true |
|
ID of prediction environment. |
| name |
string |
true |
|
Name of prediction environment. |
| usedBy |
[DeploymentAndGuardResponse] |
true |
maxItems: 32
|
Guards using this prediction environment. |
SupportedLlmListResponse
{
"count": 0,
"data": [
{
"description": "string",
"id": "string",
"llmType": "string",
"model": "string",
"name": "string",
"provider": "string",
"vendor": "string"
}
],
"next": "http://example.com",
"previous": "http://example.com",
"totalCount": 0
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| count |
integer |
false |
|
Number of items returned on this page. |
| data |
[SupportedLlmResponse] |
true |
maxItems: 200
|
List of supported LLMs for moderation. |
| next |
string,null(uri) |
true |
|
URL pointing to the next page (if null, there is no next page). |
| previous |
string,null(uri) |
true |
|
URL pointing to the previous page (if null, there is no previous page). |
| totalCount |
integer |
true |
|
The total number of items across all pages. |
SupportedLlmResponse
{
"description": "string",
"id": "string",
"llmType": "string",
"model": "string",
"name": "string",
"provider": "string",
"vendor": "string"
}
Properties
| Name |
Type |
Required |
Restrictions |
Description |
| description |
string |
true |
maxLength: 1024
|
Description of this LLM. |
| id |
string |
true |
maxLength: 1024
|
Identifier for this LLM. |
| llmType |
string |
true |
maxLength: 1024
|
General category of this LLM. |
| model |
string |
true |
maxLength: 1024
|
Specific model of this LLM. |
| name |
string |
true |
maxLength: 1024
|
Display name of this LLM. |
| provider |
string |
true |
maxLength: 1024
|
Provider of access to this LLM. |
| vendor |
string |
true |
maxLength: 1024
|
Vendor of this LLM. |