Files
shop-api/src/modules/chatbot/interfaces/chatbot.interface.ts
T
morteza-mortezai 3ebae01605 chatbot : init
2025-11-29 11:46:23 +03:30

37 lines
791 B
TypeScript

export interface IChatbotResponse {
message: string;
confidence: number;
sources?: string[];
tokensUsed: number;
context?: Record<string, any>;
}
export interface IChatContext {
userId: string;
sessionId: string;
conversationHistory: IChatMessage[];
userPreferences?: Record<string, any>;
businessContext?: Record<string, any>;
}
export interface IChatMessage {
content: string;
type: "user" | "bot" | "system";
timestamp: Date;
metadata?: Record<string, any>;
}
export interface ILLMConfig {
model: string;
temperature: number;
maxTokens: number;
topP: number;
apiKey: string;
}
export interface IDataSource {
query: (question: string, context?: Record<string, any>) => Promise<string[]>;
type: "database" | "vector" | "api";
name: string;
}