mongodb-chatbot-ui
TypeScript icon, indicating that this package has built-in type declarations

0.8.0 • Public • Published

MongoDB Chatbot UI

The React components for the MongoDB Chatbot Framework.

Documentation

To learn more about the MongoDB Chatbot UI components, check out the documentation.

For more information about the available components and props, refer to the documentation.

Install

Install the mongodb-chatbot-ui package from npm. This contains the React.js components that you can use to build a chatbot UI.

npm install mongodb-chatbot-ui

Usage

import Chatbot, {
  FloatingActionButtonTrigger,
  InputBarTrigger,
  ModalView,
  MongoDbLegalDisclosure,
  mongoDbVerifyInformationMessage,
} from "mongodb-chatbot-ui";

function MyApp() {
  const suggestedPrompts = [
    "How do I create a new MongoDB Atlas cluster?",
    "Can MongoDB store lists of data?",
    "How does vector search work?",
  ];
  return (
    <div>
      <Chatbot
        name="MongoDB AI"
        maxInputCharacters={300}
      >
        <InputBarTrigger
          bottomContent={<MongoDbLegalDisclosure />}
          suggestedPrompts={suggestedPrompts}
        />
        <FloatingActionButtonTrigger text="Ask My MongoDB AI" />
        <ModalView
          disclaimer={<MongoDbLegalDisclosure />}
          initialMessageText="Welcome to my MongoDB AI Assistant. What can I help you with?"
          initialMessageSuggestedPrompts={suggestedPrompts}
          inputBottomText={mongoDbVerifyInformationMessage}
        />
      </Chatbot>
    </div>
  );
}

Package Sidebar

Install

npm i mongodb-chatbot-ui

Weekly Downloads

71

Version

0.8.0

License

Apache-2.0

Unpacked Size

6.45 MB

Total Files

73

Last publish

Collaborators

  • nlarew
  • bpmutter
  • mozartsghozt