UNPKG

adrit-mcb

Version:

A customizable floating chatbot widget for React applications

15 lines (14 loc) 612 B
import type { ChatMessage } from './types'; /** * Creates a Google AI handler for the ChatbotWidget. * * @example * const aiHandler = createGoogleAIHandler('your-api-key'); * <ChatbotWidget aiHandler={aiHandler} /> */ export declare function createGoogleAIHandler(apiKey: string, modelId?: string): (messages: ChatMessage[]) => Promise<string>; /** * A ready-to-use handler that relies on the `GEMINI_API_KEY` environment variable. * In browser builds, this usually comes from your bundler's environment variables. */ export declare const defaultAIHandler: (messages: ChatMessage[]) => Promise<string>;