37 lines
791 B
TypeScript
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;
|
|
}
|