michangarrito/apps/whatsapp-service/dist/llm/llm.service.d.ts
rckrdmrd 48dea7a5d0 feat: Initial commit - michangarrito
Marketplace móvil para negocios locales mexicanos.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React Web)
- apps/mobile (Expo/React Native)
- apps/mcp-server (Claude MCP Server)
- apps/whatsapp-service (WhatsApp Business API)
- database/ (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:02 -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 {};