ApplyGuardrailsDetails¶
-
class
oci.generative_ai_inference.models.ApplyGuardrailsDetails(**kwargs)¶ Bases:
objectDetails 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_configGets the guardrail_version_config of this ApplyGuardrailsDetails. inputGets the input of this ApplyGuardrailsDetails. multimodal_inputGets 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: - input (oci.generative_ai_inference.models.GuardrailsInput) – The value to assign to the input property of this ApplyGuardrailsDetails.
- multimodal_input (list[oci.generative_ai_inference.models.GuardrailsInput]) – The value to assign to the multimodal_input property of this ApplyGuardrailsDetails.
- guardrail_configs (oci.generative_ai_inference.models.GuardrailConfigs) – The value to assign to the guardrail_configs property of this ApplyGuardrailsDetails.
- guardrail_version_config (oci.generative_ai_inference.models.GuardrailVersionConfig) – The value to assign to the guardrail_version_config property of this ApplyGuardrailsDetails.
- compartment_id (str) – The value to assign to the compartment_id property of this ApplyGuardrailsDetails.
-
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
-
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
-
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
-
input¶ Gets the input of this ApplyGuardrailsDetails.
Returns: The input of this ApplyGuardrailsDetails. Return type: oci.generative_ai_inference.models.GuardrailsInput
-
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]
-