ApplyGuardrailsDetails

class oci.generative_ai_inference.models.ApplyGuardrailsDetails(**kwargs)

Bases: object

Details for applying guardrails to the input content. Case 1: Use input for simple single-text moderation. Existing customers can continue to use this field for the current text-only flow. Case 2: Use multimodalInput for moderation over text, image, or a combination of both. multimodalInput supports a single text item, an array of text items only, an array of images only, or a mixed ordered combination of text and image items. Clients may provide input, multimodalInput, or both. At least one of these fields must be provided. If both input and multimodalInput are provided, the service will process input and discard multimodalInput.

Methods:

__init__(**kwargs)

Initializes a new ApplyGuardrailsDetails object with values from keyword arguments.

Attributes:

compartment_id

[Required] Gets the compartment_id of this ApplyGuardrailsDetails.

guardrail_configs

[Required] Gets the guardrail_configs of this ApplyGuardrailsDetails.

guardrail_version_config

Gets the guardrail_version_config of this ApplyGuardrailsDetails.

input

Gets the input of this ApplyGuardrailsDetails.

multimodal_input

Gets the multimodal_input of this ApplyGuardrailsDetails.

__init__(**kwargs)

Initializes a new ApplyGuardrailsDetails object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
property compartment_id

[Required] Gets the compartment_id of this ApplyGuardrailsDetails. The OCID of the compartment to apply guardrails.

Returns

The compartment_id of this ApplyGuardrailsDetails.

Return type

str

property guardrail_configs

[Required] Gets the guardrail_configs of this ApplyGuardrailsDetails.

Returns

The guardrail_configs of this ApplyGuardrailsDetails.

Return type

oci.generative_ai_inference.models.GuardrailConfigs

property guardrail_version_config

Gets the guardrail_version_config of this ApplyGuardrailsDetails.

Returns

The guardrail_version_config of this ApplyGuardrailsDetails.

Return type

oci.generative_ai_inference.models.GuardrailVersionConfig

property input

Gets the input of this ApplyGuardrailsDetails.

Returns

The input of this ApplyGuardrailsDetails.

Return type

oci.generative_ai_inference.models.GuardrailsInput

property multimodal_input

Gets the multimodal_input of this ApplyGuardrailsDetails. An ordered list of text and image inputs for multimodal guardrail evaluation. This field supports a single text item, an array of text items only, an array of images only, or a mixed ordered combination of text and image items. If both input and multimodalInput are provided, this field is ignored.

Returns

The multimodal_input of this ApplyGuardrailsDetails.

Return type

list[oci.generative_ai_inference.models.GuardrailsInput]