Generate personalized UI to guide your users with Lopus AI
lopus-ai
in your React project:
shadcn/ui
separately in order to render the generated components (we internally use these components for clean default styling). If you prefer installation guidelines given by the shadcn/ui
website, head on to the Installation instructions.
If you’re using a framework like Next.js, Gatsby, Remix or Astro, you can use the shadcn/ui
CLI to set this up. If you’re using plain React.js, head on to the Manual Installation Guide.
Install and initialize shadcn/ui in your React-based project:
tailwind.config.ts
content array:
useLopusChat
HookuseLopusChat
hook in your React component:
your_api_key_here
with your actual Lopus AI API key. You can find
your API key in the dashboard.useLopusChat
hook provides:
messages
: An array of chat messages
sendQuery
: A function to send new messages
isLoading
: A boolean indicating if a response is being generated
Authentication confirmation from Lopus AI
ChatComponent.tsx
to use the components:
Lopus Chat Component