npm run build && cp dist/build/static/js/bundle.min.js /Users/tejas/innkeeper/hotel-site/public
to purge jsdelivr cache: click this https://www.jsdelivr.com/tools/purge and enter https://cdn.jsdelivr.net/gh/autoinfra-ai/lingtual-embedded-chat@latest/dist/build/static/js/bundle.min.js
Lingtual is a no-code open-source project that is for people to easily build custom tools to use chat as a universal interface.
🌟 Seamless Integration: Easily integrate the Lingtual Widget into your website or web application with just a few lines of JavaScript.
🚀 Interactive Chat Interface: Engage your users with a user-friendly chat interface, powered by Lingtual's advanced language understanding capabilities.
🎛️ Customizable Styling: Customize the appearance of the chat widget to match your application's design and branding.
🌐 Multilingual Support: Communicate with users in multiple languages, opening up your application to a global audience.
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/gh/autoinfra-ai/lingtual-embedded-chat@main/dist/build/static/js/bundle.min.js"></script>
</head>
<body>
<lingtual-chat
window_title="TITLE"
flow_id="YOUR_FLOW_ID"
api_key="YOUR_KEY"
host_url="http://localhost:7860"
chat_input_field="input"
chat_inputs='{"input":""}'
suggested_questions='[
{
"questionId": 1,
"text": "Suggested questions here..."
},
{
"questionId": 2,
"text": "Question 2"
},
{
"questionId": 3,
"text": "How to connect with Google Calendar?"
}
]'
></lingtual-chat>
</body>
</html>
<!-- suggested_questions='[
{
"questionId": 1,
"text": "Suggested questions here..."
},
{
"questionId": 2,
"text": "Question 2"
},
{
"questionId": 3,
"text": "How to connect with Google Calendar?"
}
]' -->
Import the js bundle in the index.html of your react project
<script src="https://cdn.jsdelivr.net/gh/autoinfra-ai/lingtual-embedded-chat@main/dist/build/static/js/bundle.min.js"></script>
Encapsulate your custom element in a react component
export default function ChatWidget() {
return (
<div>
<lingtual-chat
window_title="TITLE"
flow_id="YOUR_FLOW_ID"
api_key="YOUR_KEY"
host_url="http://localhost:7860"
style="position: fixed; bottom: 50px; right: 50px;"
chat_input_field="input"
chat_inputs='{"input":""}'
suggested_questions='[
{
"questionId": 1,
"text": "Suggested questions here..."
},
{
"questionId": 2,
"text": "Question 2"
},
{
"questionId": 3,
"text": "How to connect with Google Calendar?"
}
]'></lingtual-chat>
</div>
);
}
Use the widget API to customize your widget:
Prop | Type | Required |
---|---|---|
bot_message_style | json | No |
chat_input_field | string | Yes |
chat_inputs | json | Yes |
chat_position | string | No |
chat_trigger_style | json | No |
chat_window_style | json | No |
chat_output_key | string | No |
error_message_style | json | No |
flow_id | string | Yes |
height | number | No |
host_url | string | Yes |
input_container_style | json | No |
input_style | json | No |
online | boolean | No |
online_message | string | No |
placeholder | string | No |
placeholder_sending | string | No |
send_button_style | json | No |
send_icon_style | json | No |
tweaks | json | No |
user_message_style | json | No |
width | number | No |
window_title | string | No |
bot_message_style:
chat_input_field:
chat_inputs:
chat_output_key:
chat_position:
chat_trigger_style:
chat_window_style:
error_message_style:
flow_id:
height:
host_url:
input_container_style:
input_style:
Online:
online_message:
placeholder:
placeholder_sending:
send_button_style:
send_icon_style:
tweaks:
user_message_style:
width:
window_title:
This project is licensed under the MIT License - see the LICENSE file for details.
This is a fork of https://github.com/logspace-ai/langflow-embedded-chat credit to them and flowise for building these similar chat components with MIT!
https://github.com/FlowiseAI/FlowiseChatEmbed
To build the project and deploy the generated bundle to your specified directory, you can use the following command:
npm run build && cp dist/build/static/js/bundle.min.js /Users/tejas/innkeeper/hotel-site/public