ai-pay-react-hooks
v0.0.2
Published
A react hook package to interact with ai-pay
Downloads
23
Readme
AI Pay React Hooks
This package provides react hooks to the official ai-pay package
Examples
import { useSessionData } from "ai-pay-react-hooks"
const {
sessionState,
browserExtensionInstalled,
} = useSessionData()
import { useIsBrowserExtensionInstalled } from "ai-pay-react-hooks"
const isBrowserExtensionInstalled = useIsBrowserExtensionInstalled()
import { useSessionState } from "ai-pay-react-hooks"
const sessionState = useSessionState()
import { useSessionId } from "ai-pay-react-hooks"
const sessionId = useSessionId()
import { useChatCompletion } from "ai-pay-react-hooks"
const {
loading,
error,
messages,
sendMessage,
} = useChatCompletion()
import { useChatCompletionStream } from "ai-pay-react-hooks"
const {
loading,
error,
messages,
streamingResponse,
sendMessage,
} = useChatCompletionStream()