GuardrailLlmPromptSecurityCustomPolicy class
Constructors
-
GuardrailLlmPromptSecurityCustomPolicy({Input<
bool?> ? allowShortUtterance, Input<bool?> ? failOpen, Input<int?> ? maxConversationMessages, Input<GuardrailLlmPromptSecurityCustomPolicyModelSettings?> ? modelSettings, required Input<String> policyScope, required Input<String> prompt}) -
Creates a new GuardrailLlmPromptSecurityCustomPolicy.
allowShortUtteranceBy default, the LLM policy check is bypassed for short utterances.failOpenIf an error occurs during the policy check, fail open and do not triggermaxConversationMessagesWhen checking this policy, consider the last 'n' messages in themodelSettingsModel settings contains various configurations for the LLM model.policyScopeDefines when to apply the policy check during the conversation. If set topromptPolicy prompt.const -
GuardrailLlmPromptSecurityCustomPolicy.fromMap(Map<
String, dynamic> map) -
factory
Properties
-
allowShortUtterance
→ Input<
bool?> ? -
By default, the LLM policy check is bypassed for short utterances.
Enabling this setting applies the policy check to all utterances,
including those that would normally be skipped.
final
-
failOpen
→ Input<
bool?> ? -
If an error occurs during the policy check, fail open and do not trigger
the guardrail.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
maxConversationMessages
→ Input<
int?> ? -
When checking this policy, consider the last 'n' messages in the
conversation.
When not set a default value of 10 will be used.
final
-
modelSettings
→ Input<
GuardrailLlmPromptSecurityCustomPolicyModelSettings?> ? -
Model settings contains various configurations for the LLM model.
Structure is documented below.
final
-
policyScope
→ Input<
String> -
Defines when to apply the policy check during the conversation. If set to
POLICY_SCOPE_UNSPECIFIED, the policy will be applied to the user input. When applying the policy to the agent response, additional latency will be introduced before the agent can respond. Possible values: USER_QUERY AGENT_RESPONSE USER_QUERY_AND_AGENT_RESPONSEfinal -
prompt
→ Input<
String> -
Policy prompt.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited