@prexo/ai-chat-sdk
Version:
AI Chat Component with Persistent History
23 lines (20 loc) • 889 B
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import React__default from 'react';
import { UseChatHelpers } from '@ai-sdk/react';
import { BaseMessageHistory } from '../../../lib/types.js';
import 'ai';
import '@upstash/vector';
interface ChatInputProps {
input: UseChatHelpers["input"];
status: UseChatHelpers["status"];
handleSubmit: UseChatHelpers["handleSubmit"];
handleInputChange: UseChatHelpers["handleInputChange"];
placeholder: string;
sessionId?: string;
sessionTTL?: number;
isLoading?: boolean;
history?: BaseMessageHistory;
}
declare function ChatInputComponent({ input, status, handleSubmit, handleInputChange, placeholder, sessionId, sessionTTL, isLoading, history }: ChatInputProps): react_jsx_runtime.JSX.Element;
declare const ChatInput: React__default.MemoExoticComponent<typeof ChatInputComponent>;
export { ChatInput };