The arguments for creating the toxicity evaluator.
Optionalchoices?: ClassificationChoicesMapOptionalinputMapping?: ObjectMapping<RecordType>The mapping of the input to evaluate to the shape that the evaluator expects
Optionalname?: stringOptionaloptimizationDirection?: OptimizationDirectionOptionalpromptTemplate?: PromptTemplateOptionaltelemetry?: TelemetryConfigAn evaluator function that takes a ToxicityEvaluationRecord and returns a classification result indicating whether the text is toxic or non-toxic.
Creates a toxicity evaluator function.
This function returns an evaluator that determines whether a given text is toxic — hateful, demeaning, abusive, or threatening.