plazbot
Version:
Official Plazbot SDK for creating AI agents for WhatsApp, portals, and developers.
17 lines (16 loc) • 577 B
TypeScript
import type { ChatMessage } from '../types';
export interface UseChatOptions {
/** Callback cuando el agente responde */
onResponse?: (message: ChatMessage) => void;
/** Callback cuando ocurre un error */
onError?: (error: string) => void;
}
export interface UseChatReturn {
messages: ChatMessage[];
isLoading: boolean;
error: string | null;
sendMessage: (content: string, file?: string) => Promise<void>;
clearMessages: () => void;
retry: () => Promise<void>;
}
export declare function useChat(options?: UseChatOptions): UseChatReturn;