@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
13 lines (12 loc) • 588 B
TypeScript
/**
* @file Toxicity analysis scorer
* Detects harmful, offensive, or inappropriate content
*/
import type { LLMScorerConfig, ScoreResult, ScorerInput } from "../../../types/index.js";
import { BaseLLMScorer } from "./baseLLMScorer.js";
export declare class ToxicityScorer extends BaseLLMScorer {
constructor(config?: Partial<LLMScorerConfig>);
generatePrompt(input: ScorerInput): string;
parseResponse(response: string, _input: ScorerInput): Partial<ScoreResult>;
}
export declare function createToxicityScorer(config?: Partial<LLMScorerConfig>): Promise<ToxicityScorer>;