moderate

open suspend override fun moderate(prompt: Prompt, model: LLModel): ModerationResult(source)

Processes a given prompt to determine if it adheres to moderation rules and returns a moderation result.

The method evaluates the last message in the prompt for exact and partial matches against predefined moderation rules. If no matches are found, it returns a default moderation response.

Return

The result of the moderation, based on matches or default rules.

Parameters

prompt

The prompt containing the message to be moderated.

model

The LLM model used for processing (ignored in this implementation).