Nexai AI Support Chat Bubble
Github Repository ->The Nexai AI Support Chat Bubble is a React component for AI-powered support chat for any website.
Powered by cutting-edge AI like GPT-3.5 or GPT-4, our AI chat agent provides instant assistance to your visitors, making interactions smoother and more efficient.
Install
- The simplest is to use the AI Chat Widget HTML Embed Code.
- For React Projects use the AI Chat React Component.
- For a full React project template clone the github repository
AI Chat Widget HTML Embed code
You can find the embed code under your: Dashboard -> Project -> Apps.
Copy the HTML code before the </body>
of your index.html page.
Example HTML Embed Code
html - index.html
copy code
<!-- nexai ai chat bubble --><script src="https://nexai.site/ai/embed.umd.js"></script><script>NexaiChatBubble.render({bottom: 30,right: 30,width: 400,nexaiApiKey: 'your-api-key'})</script><!-- end nexai ai chat bubble --->
Ensure the domain of the project matches the domain you embed the chatbot into.
AI Support Chat React Component
For existing projects install the nexai.js
library into your project dependencies.
npm i --save nexai.js
Example Usage
Create a React Component eg: App.tsx
to render the chat bubble.
typescript - App.tsx
copy code
import { NexaiChatBubble } from "nexai.js/chat-bubble"export const App = () => {return (<NexaiChatBubblenexaiApiKey="your-api-key"width={300}nexaiIoUrl="https://io.nexai.site"nexaiAssetsUrl="https://nexai.site"aiName="Your Bot Name"aiAvatarUrl="https://your.site/avatar.png"chatSuggests={["Hello|How do I use it?","Help me login|Setup account","I'm happy|I need a human"]}projectName="Your Project Name"inputPlaceholder="Type your message..."/>);};
For a new project template clone the git codebase
https://github.com/nexai-cloud/nexai.js
git clone https://github.com/nexai-cloud/nexai.js
cd nexai.js
npm install
npm run start
You are good to go!
The react component is high level. For building custom apps use JS Library.