ai-native-form
Version:
AI-powered React form assistant with GPT-4, speech input, and schema auto-generation.
20 lines (19 loc) • 713 B
TypeScript
import { FieldValues, UseFormReturn, Path } from "react-hook-form";
export declare function useAIForm<T extends FieldValues>(form?: UseFormReturn<T>, apiKey?: string): {
register: (name: Path<T>, options?: Record<string, any> & {
required?: boolean;
type?: string;
}) => import("react-hook-form").UseFormRegisterReturn<Path<T>>;
registerController: (name: Path<T>, meta: {
required?: boolean;
type?: string;
enum?: string[];
transform?: (value: any) => any;
}) => void;
fillFromPrompt: (prompt: string) => Promise<void>;
getSchema: () => {
type: string;
properties: Record<string, any>;
required: string[];
};
};