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

GuardrailContentFilter

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

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

interface GuardrailContentFilter {
bannedContents?: string[];
bannedContentsInAgentResponse?: string[];
bannedContentsInUserInput?: string[];
disregardDiacritics?: boolean;
matchType?:
| "MATCH_TYPE_UNSPECIFIED"
| "SIMPLE_STRING_MATCH"
| "WORD_BOUNDARY_STRING_MATCH"
| "REGEXP_MATCH";
}

§Properties

§
bannedContents?: string[]
[src]

Optional. List of banned phrases. Applies to both user inputs and agent responses.

§
bannedContentsInAgentResponse?: string[]
[src]

Optional. List of banned phrases. Applies only to agent responses.

§
bannedContentsInUserInput?: string[]
[src]

Optional. List of banned phrases. Applies only to user inputs.

§
disregardDiacritics?: boolean
[src]

Optional. If true, diacritics are ignored during matching.

§
matchType?: "MATCH_TYPE_UNSPECIFIED" | "SIMPLE_STRING_MATCH" | "WORD_BOUNDARY_STRING_MATCH" | "REGEXP_MATCH"
[src]

Required. Match type for the content filter.