All you need is this
import { useBasicChatCompletions } from '@fencyai/react'export default function BasicChatCompletionExample() {const { createBasicChatCompletion, latest } = useBasicChatCompletions()const response = latest?.data?.responseconst error = latest?.errorconst loading = latest?.loadingreturn (<div><buttononClick={async () => {await createBasicChatCompletion({openai: {model: 'gpt-4o-mini',messages: [{ role: 'user', content: 'Hello, how are you?' }]}})}}disabled={loading}>Send Message</button>{error && <div>{error.message}</div>}{response && <div>{response}</div>}</div>)}
Focus on your product. We handle the AI plumbing.
We know because we have tried and failed multiple times. This made us build Fency.ai so you don't have to do go through the same as us.
Choose the right plan for you
Choose the plan that fits your stage - from development to production.
Free
For those in the development and integration phase.
Custom
For those who are ready to go live.