A third party lit library which can we embedded into the customers application which can interact with agents created in Elna platform
npm i @elna-ai/chat-widgetyarn add @elna-ai/chat-widgetpnpm add @elna-ai/chat-widget import "@elna-ai/chat-widget";
...
<elna-chat-widget
agentId="${AGENT_UUID_IN_ELNA}"
logo="${LOGO_URL}"
headerBackgroundColor="#{VALID_VALUE_FOR_COLOR_PROPERTY}"
></elna-chat-widget>logo is the image used in the title and as avatar for the bot. headerBackgroundColor is used as the background for the title bar in expanded state
might need to declare type manually to avoid JSX.IntrinsicElements error
https://coryrylan.com/blog/how-to-use-web-components-with-typescript-and-react
clone repo
git clone https://github.com/elna-ai/chat-widget.gitinstall dependence
pnpm installrun dev server
pnpm dev