skailan-ai
Version:
Servicio de IA y procesamiento de lenguaje natural para Skailan
34 lines • 1.07 kB
TypeScript
import { LLMConfig } from "../entities/LLMConfig";
export interface IntentClassificationResult {
intent: string;
confidence: number;
entities?: Array<{
type: string;
value: string;
confidence: number;
}>;
slots?: Record<string, any>;
summary?: string;
}
export interface IntentDefinition {
name: string;
description: string;
examples: string[];
entities?: string[];
}
export declare class IntentClassificationService {
private aiService;
private intents;
constructor(llmConfig: LLMConfig, intents?: IntentDefinition[]);
classifyIntent(text: string): Promise<IntentClassificationResult>;
classifyConversationIntent(messages: Array<{
role: string;
content: string;
}>): Promise<IntentClassificationResult>;
addIntent(intent: IntentDefinition): void;
removeIntent(intentName: string): void;
getIntents(): IntentDefinition[];
private getDefaultIntents;
private fallbackIntentClassification;
}
//# sourceMappingURL=IntentClassificationService.d.ts.map