import { IsString, MinLength, IsOptional, IsBoolean } from "class-validator"; import type { IntentType, ExtractedEntity } from "../interfaces"; /** * DTO for intent classification request */ export class ClassifyIntentDto { @IsString() @MinLength(1, { message: "query must not be empty" }) query!: string; @IsOptional() @IsBoolean() useLlm?: boolean; } /** * DTO for intent classification result */ export class IntentClassificationResultDto { intent!: IntentType; confidence!: number; entities!: ExtractedEntity[]; method!: "rule" | "llm"; query!: string; }