Chat

Get guardrails settings for a chat session.

Returns the guardrails settings configured for a specific chat session.

get/chats/{session_id}/guardrails

Request

Path parameters

session_idstring required

Id of the chat session

Response

Successful operation

exception_messagestring

A message that will be returned in case some guardrails settings are violated.

show_violated_responsesboolean

Admin-only toggle to view the exact content of violated responses. When enabled, admins can see what triggered a guardrail violation. This is disabled by default for privacy and security. Only administrators can enable this setting and view violated content.

guardrails_on_transcriptionsboolean

When enabled, audio and video transcriptions are checked for content safety violations using the guardrails LLM, in addition to the existing PII detection.

vision_guardrails_enabledboolean

When enabled, images and video frames are checked for content safety violations using a vision-capable guardrails LLM during document ingestion.

guardrails_vision_llmstring

Vision-capable LLM for image and video content safety checks. Defaults to auto which selects the best available vision model.

disallowed_regex_patternsstring[]

A list of regular expressions that match custom PII.

presidio_labels_to_flagstring[]

A list of entities to be flagged as PII by the built-in Presidio model.

pii_labels_to_flagstring[]

A list of entities to be flagged as PII by the built-in PII model.

pii_detection_parse_action'allow' | 'redact' | 'fail'

What to do when PII is detected during parsing of documents. The 'redact' option will replace disallowed content in the ingested documents with redaction bars.

pii_detection_llm_input_action'allow' | 'redact' | 'fail'

What to do when PII is detected in the input to the LLM (document content and user prompts). The 'redact' option will replace disallowed content with placeholders.

pii_detection_llm_output_action'allow' | 'redact' | 'fail'

What to do when PII is detected in the output of the LLM. The 'redact' option will replace disallowed content with placeholders.

prompt_guard_labels_to_flagstring[]

A list of entities to be flagged as safety violations in user prompts by the built-in prompt guard model.

guardrails_labels_to_flagstring[]

A list of entities to be flagged as safety violations in user prompts. Must be a subset of guardrails_entities, if provided.

guardrails_llmstring

LLM to use for Guardrails and PII detection

guardrails_safe_categorystring

Name of the safe category for guardrails. Must be a key in guardrails_entities, if provided. Otherwise uses system defaults.

guardrails_entitiesobject

(Optional) Dictionary mapping each guardrails category name to its definition, used by the guardrails model to classify messages. The first entry is the "safe" class; the rest are "unsafe" classes. Omit this field to inherit the server's maintained default category definitions and keep receiving improvements to them. Supplying it REPLACES the defaults wholesale (the dict is not merged with them), so a value copied from documentation pins the collection to those exact definitions permanently — including wordings later found too weak to classify reliably. Pass it only when you deliberately own the full category set. No example is shown here on purpose, to avoid inviting such a copy.

column_redaction_custom_entities_to_flagstring[]

Deprecated - Use custom_pii_entities_to_flag. A list of entities to redact in tabular data files. Must be a subset of column_redaction_custom_entities, if provided.

column_redaction_custom_entitiesobject

(Optional) Deprecated - Use custom_pii_entities. A dictionary of entities and a short description for the LLM to check for and redact columns containing PII in tabular data files.

custom_pii_entities_to_flagstring[]

A list of entities to redact in tabular data files. Must be a subset of custom_pii_entities, if provided.

custom_pii_entitiesobject

(Optional) A dictionary of entities and a short description for the LLM to check for and redact columns containing PII in tabular data files.

Example response

{
  "disallowed_regex_patterns": [
    "secret_disallowed_word",
    "(?!0{3})(?!6{3})[0-8]\\d{2}-(?!0{2})\\d{2}-(?!0{4})\\d{4}"
  ],
  "presidio_labels_to_flag": [
    "IBAN_CODE",
    "US_SSN"
  ],
  "pii_labels_to_flag": [
    "IBAN",
    "SSN"
  ],
  "prompt_guard_labels_to_flag": [
    "JAILBREAK"
  ],
  "guardrails_labels_to_flag": [
    "Violent Crimes",
    "Non-Violent Crimes",
    "Intellectual Property",
    "Code Interpreter Abuse"
  ],
  "guardrails_llm": "h2oai/h2o-danube3-4b-chat",
  "guardrails_safe_category": "Safe",
  "column_redaction_custom_entities_to_flag": [
    "Mother's Maiden Name"
  ],
  "column_redaction_custom_entities": {
    "Mother's Maiden Name": "Mother's maiden name"
  },
  "custom_pii_entities_to_flag": [
    "Mother's Maiden Name"
  ],
  "custom_pii_entities": {
    "Mother's Maiden Name": "Mother's maiden name"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.