realtorbots-ai

1.0.14 • Public • Published

realtorbots-ai

A simple custom HTML element for a chatbot.

Installation

You can install the realtorbots-ai package via npm:

npm install realtorbots-ai

or use via unpkg:

<script src="https://unpkg.com/realtorbots-ai@latest/index.js"></script>

Usage

create a config.js file and paste your access token

const config = {
  token: "<-- token -->",
};

paste the following in your html body

    <chatbot-ai id="chatbot-ai"></chatbot-ai>
    <!-- Load config.js and set the token -->
    <script src="config.js"></script>
    <!-- Load the chatbot element and set the token -->
    <script>
    document.addEventListener('DOMContentLoaded', function () {
      const chatbotElement = document.getElementById('chatbot-ai');
      if (chatbotElement && config.token) {
        chatbotElement.setAttribute('token', config.token);
        console.log("Chatbot element and token found.");
      } else {
        console.error('Chatbot element or token not found.');
      }
    });
  </script>

Package Sidebar

Install

npm i realtorbots-ai

Weekly Downloads

4

Version

1.0.14

License

MIT

Unpacked Size

66.6 kB

Total Files

3

Last publish

Collaborators

  • varunmnx