UNPKG

@prexo/ai-chat-sdk

Version:

AI Chat Component with Persistent History

30 lines (28 loc) 791 B
export { PrexoAiChatBot, PrexoAiChatBotProps } from './components/custom/chat.widget.js'; import 'react'; import '../lib/types.js'; import 'ai'; import '@upstash/vector'; declare global { interface Window { PrexoAiChatBot: { init: (config: GlobalChatConfig) => void; destroy: () => void; }; } } interface GlobalChatConfig { apiKey: string; user?: { name: string | "Prexo Ai"; pfp: string | "https://raw.githubusercontent.com/plura-ai/prexo/refs/heads/main/apps/www/public/logo.png"; lastSeen: Date; }; placeholder?: string; botName?: string; width?: number | string; height?: number | string; position?: "bottom-right" | "bottom-left"; mountId?: string; onClose?: () => void; }