npm.io
3.3.2 • Published 1 year ago

custom-chatbot-widget

Licence
Apache-2.0
Version
3.3.2
Deps
31
Size
888 kB
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Built With

  • React
  • Socket-io
  • Chart.js

Requirements

  • react :^17.0.2
  • react-dom : ^17.0.2

Getting Started

npm i custom-chatbot-widget

Usage

import Widget from 'custom-chatbot-widget';
import { createBrowserHistory } from 'history';

const App = ()=>{
    const initPayload = {
        access_token: 'jwt token',
        refresh_token: 'refresh token',
        uagent: window.navigator.userAgent,
        uriBackend: 'uri backend',
        uriService: 'uri open ai service chatbot',
        companyid: 'coid',
        companycode:'companycode',
        lang:'EN',
        uriBackendEnt: 'uri backend go',
    }

    const textSayHiAndGetStarted = 'Workplaze is Outstandingly Wonderful';

    const history = createBrowserHistory();

    return (
        <Widget
            initPayload={getInitPayload()}
            customData={{ language: 'en' }}
            socketUrl={"RASA ENDPOINT"}
            showMessageDate={true}
            subtitle={textSayHiAndGetStarted}
            title="WOW"
            inputTextFieldHint="Type a message..."
            showFullScreenButton={true}
            displayUnreadCount={true}
            hideWhenNotConnected={false}
            socketPath={socketPath || ''}
            history={history}
            keyEncrypt={''}
            payloadPwdPY={{
                onSubmitPYPwd:()=>{},
                onCheckPYAccess:()=>{},
            }}
        />
    )
}

Click this for Publish Process

Keywords