1.0.11 • Published 1 year ago

aitoolkit-widget v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

aitoolkit-widget

The aitoolkit-widget is an HTML component that can be easily integrated into any website. It provides a chatbot interface powered by the AI Toolkit platform (https://aitoolkit.dev).

Getting Started

Before integrating the aitoolkit-widget into your website, you must obtain an API key and Bot ID from the AI Toolkit website (https://aitoolkit.dev).

Once you have your API key and Bot ID, copy the following code inside the <head> tag of your website:

<link rel="stylesheet" href="https://unpkg.com/aitoolkit-widget/dist/style.min.css">

And the following code inside the <body> tag of your website:

<div id="root"></div>
<script src="https://unpkg.com/react@17/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>
<script src="https://unpkg.com/aitoolkit-widget/dist/Widget.bundle.js"></script>
<script>
    const rootElement = document.getElementById('root');
    ReactDOM.render(React.createElement(Widget, {
        apiKey: "<api-key>",
        config: {
            id: "<bot-id>",
            startMessage: "Hi! I'm your personal assistant. How can I help you?",
            enableLocalStorage: true,
        },
        translations: {
            clearChatHistory: "Clear chat history",
            typeMessage: "Type a message...",
        },
    }), rootElement);

    // Open the widget when the page is loaded
    document.addEventListener('DOMContentLoaded', () => {
        if (window.WidgetEvents && window.WidgetEvents.open) {
            window.WidgetEvents.open();
        }
    }, false);
</script>

Replace <api-key> and <bot-id> with your actual API key and Bot ID obtained from the AI Toolkit website. You can also modify any of the configuration options or translations to suit your needs.

And that's it! The aitoolkit-widget should now be displayed on your website and ready to assist your visitors.

Support

If you have any questions or issues with the aitoolkit-widget, please email us at aitoolkit@aleskovacic.com and we'll be happy to help you out. Thanks for using AI Toolkit!

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago