Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Guardrail

import type { Guardrail } from "https://googleapis.deno.dev/v1/ces:v1.ts";

Guardrail contains a list of checks and balances to keep the agents safe and secure.

interface Guardrail {
action?: TriggerAction;
codeCallback?: GuardrailCodeCallback;
contentFilter?: GuardrailContentFilter;
readonly createTime?: Date;
description?: string;
displayName?: string;
enabled?: boolean;
etag?: string;
llmPolicy?: GuardrailLlmPolicy;
llmPromptSecurity?: GuardrailLlmPromptSecurity;
modelSafety?: GuardrailModelSafety;
name?: string;
readonly updateTime?: Date;
}

§Properties

§

Optional. Action to take when the guardrail is triggered.

§

Optional. Guardrail that potentially blocks the conversation based on the result of the callback execution.

§

Optional. Guardrail that bans certain content from being used in the conversation.

§
readonly createTime?: Date
[src]

Output only. Timestamp when the guardrail was created.

§
description?: string
[src]

Optional. Description of the guardrail.

§
displayName?: string
[src]

Required. Display name of the guardrail.

§
enabled?: boolean
[src]

Optional. Whether the guardrail is enabled.

§
etag?: string
[src]

Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.

§

Optional. Guardrail that blocks the conversation if the LLM response is considered violating the policy based on the LLM classification.

§

Optional. Guardrail that blocks the conversation if the prompt is considered unsafe based on the LLM classification.

§

Optional. Guardrail that blocks the conversation if the LLM response is considered unsafe based on the model safety settings.

§
name?: string
[src]

Identifier. The unique identifier of the guardrail. Format: projects/{project}/locations/{location}/apps/{app}/guardrails/{guardrail}

§
readonly updateTime?: Date
[src]

Output only. Timestamp when the guardrail was last updated.