A chatbot for the Airelogic documentation to be used in the Airesuite products.
npm install @airelogic/docs-chatbot
import React, { useRef } from "react";
import { DocsBotChat, DocsBotChatRef, DocsBotOptions } from "@airelogic/docs-chatbot";
const docsBotRef = useRef<DocsBotChatRef>(null);
const widgetOptions: DocsBotOptions = {
botName: "AireGlu Docs",
description: "Ask me anything about AireGlu!",
color: "#291b3e",
alignment: "left",
labels: {
firstMessage:
"Hi! I can help you with our documentation. What would you like to know?",
floatingButton: "Help",
inputPlaceholder: "Ask about our docs...",
poweredBy: "Aireinnovate",
},
questions: [
"How do I get started with AireGlu endpoints?",
"What are the main features of AireGlu?",
"How do I send an email from an AireGlu enpoint?",
],
verticalMargin: 10,
horizontalMargin: 10,
};
// include component, the bot Id is unique for Airelogic
return (
<div>
<h1>Welcome to the Docs Chatbot Playground</h1>
<DocsBotChat
ref={docsBotRef}
botId="a1QS54aX5vqaWUgXH9c1/QYNQLIJlzqpRsJX90lLE"
options={widgetOptions}
enableDefaultShortcuts={true}
/>
</div>
);