reactjs-useai
v1.0.1
Published
A React hook to easily call AI endpoints with loading and error handling.
Maintainers
Readme
reactjs-useai
A simple React hook to call AI endpoints with built-in loading and error handling.
Installation
npm install reactjs-useaiUsage
import useAi from "reactjs-useai";
const { data, error, loading, call } = useAi("/api/ask");
call({ prompt: "Hi, How are you ?" });