michangarrito/apps/whatsapp-service/dist/llm/llm.service.d.ts
rckrdmrd 97f407c661 [MIGRATION-V2] feat: Migrar michangarrito a estructura v2
- Prefijo v2: MCH
- TRACEABILITY-MASTER.yml creado
- Listo para integracion como submodulo

Workspace: v2.0.0 | SIMCO: v4.0.0
2026-01-10 11:28:54 -06:00

44 lines
1.3 KiB
TypeScript

import { ConfigService } from '@nestjs/config';
import { CredentialsProviderService } from '../common/credentials-provider.service';
interface ConversationContext {
customerId?: string;
customerName: string;
phoneNumber: string;
lastActivity: Date;
intent?: string;
pendingAction?: string;
cart?: Array<{
productId: string;
name: string;
quantity: number;
price: number;
}>;
tenantId?: string;
businessName?: string;
}
interface LlmResponse {
message: string;
action?: string;
data?: any;
intent?: string;
confidence?: number;
}
export declare class LlmService {
private readonly configService;
private readonly credentialsProvider;
private readonly logger;
private readonly clientCache;
private readonly conversationHistory;
constructor(configService: ConfigService, credentialsProvider: CredentialsProviderService);
private getClient;
invalidateClientCache(tenantId?: string): void;
processMessage(userMessage: string, context: ConversationContext): Promise<LlmResponse>;
private callLlm;
private getSystemPrompt;
private getAvailableFunctions;
private getActionMessage;
private getFallbackResponse;
cleanupOldConversations(maxAgeMinutes?: number): void;
}
export {};