import { type AiProvider, type AiOptions, type AiVerdict, type ModerationOptions, type ModerationResult } from './types.js'; /** * Lower-level API for running a generic AI completion with provider dispatch. * Used by compliance module and other library consumers. * * Returns the raw JSON (no parsing), or null on error. Refusals and errors * are logged to console but don't throw (unless onError: 'throw'). */ export declare function runAiCompletion(request: { text: string; system: string; schema: Record; }, options?: AiOptions & { provider?: AiProvider; model?: string; }): Promise<{ json: string; model?: string; } | null>; /** * Asks a model whether the text is racist, hateful, threatening, harassing, * obscene, sexually predatory, or pushing someone toward self-harm. * * Returns a verdict rather than throwing: a moderation call that fails should * be a decision you make, not an exception that takes down the request. Set * `onError: 'throw'` if you would rather it stopped. */ export declare function analyzeWithAi(text: string, options?: AiOptions): Promise; /** * Both signals in one call: the local word lists (synchronous, free, offline) * and the model's read of the whole sentence. * * Without an `ai` option no model is contacted and this is just * {@link filterFWordsToSegments} in a wrapper — which is the point: the network * call is something you opt into, not something you have to remember to remove. * * ```ts * const result = await moderateText(comment, { * languages: ['en', 'de'], * ai: { enabled: true }, // key from ANTHROPIC_API_KEY * }); * * if (result.flagged) hold(result.ai.reason); * else publish(result.segments); * ``` */ export declare function moderateText(text: string, options?: ModerationOptions): Promise; export { anthropicCompletion } from './anthropic.js'; export { geminiCompletion, toGeminiSchema } from './gemini.js'; export { ollamaCompletion, OLLAMA_DEFAULT_HOST } from './ollama.js'; export { buildSchema, buildSystemPrompt } from './prompt.js'; export { AI_CATEGORIES, AI_MODELS } from './types.js'; export type { AiCategory, AiCompletion, AiOptions, AiProvider, AiRequest, AiResponse, AiSeverity, AiVerdict, ModerationOptions, ModerationResult, } from './types.js'; export { filterFWordsToSegments } from '../filter.js'; export type { FilterOptions, TextSegment } from '../filter.js'; //# sourceMappingURL=index.d.ts.map