Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 589 Bytes

File metadata and controls

24 lines (16 loc) · 589 Bytes

reactjs-useai

A simple React hook to call AI endpoints with built-in loading and error handling.

X platform Github platform

Installation

npm install reactjs-useai

Usage

import useAi from "reactjs-useai";

const { data, error, loading, call } = useAi("/api/ask");

call({ prompt: "Hi, How are you ?" });