Welcome to the Langflow Embedded Chat repository! 🎉
The Langflow Embedded Chat is a powerful web component that enables seamless communication with the Langflow ⛓️. This widget provides a chat interface, allowing you to integrate Langflow ⛓️ into your web applications effortlessly.
Langflow is a no-code open-source project that empowers developers to build cutting-edge applications using Language Model technologies. With Langflow, you can leverage the power of LLMs (Large Language Models) to enhance user interactions, generate human-like text, and gain valuable insights from natural language data.
🌟 Seamless Integration: Easily integrate the Langflow 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 Langflow'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.
Use the Langflow Widget directly from the CDN by including the following script tag in your HTML:
<script src="https://cdn.jsdelivr.net/gh/logspace-ai/langflow-embedded-chat@v1.0.6/dist/build/static/js/bundle.min.js"></script>
git clone https://github.com/logspace-ai/langflow-embedded-chat.git
cd langflow-embedded-chat
npm run build
dist/build/static/js
folder. You can include this JavaScript file in your HTML:<script src="https://github.com/langflow-ai/langflow-embedded-chat/raw/main/path/to/your/langflow-widget.js"></script>
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/gh/logspace-ai/langflow-embedded-chat@v1.0.6/dist/build/static/js/bundle.min.js"></script>
</head>
<body>
<langflow-chat
host_url="langflow url"
flow_id="your_flow_id"
></langflow-chat>
</body>
</html>
Import the js bundle in the index.html of your react project
<script src="https://cdn.jsdelivr.net/gh/logspace-ai/langflow-embedded-chat@v1.0.6/dist/build/static/js/bundle.min.js"></script>
Encapsulate your custom element in a react component
export default function ChatWidget() {
return (
<div>
<langflow-chat
host_url="langflow url"
flow_id="your_flow_id"></langflow-chat>
</div>
);
}
Use the widget API to customize your widget:
Prop | Type | Required |
---|---|---|
bot_message_style | json | No |
chat_position | string | No |
chat_trigger_style | json | No |
chat_window_style | json | No |
output_type | string | No |
input_type | string | No |
output_component | 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 |
start_open | 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 |
session_id | string | No |
additional_headers | json | No |
bot_message_style:
input_type:
output_type:
output_component:
chat_position:
chat_trigger_style:
chat_window_style:
error_message_style:
flow_id:
height:
host_url:
input_container_style:
input_style:
Online:
start_open:
online_message:
placeholder:
placeholder_sending:
send_button_style:
send_icon_style:
tweaks:
user_message_style:
width:
window_title:
session_id:
additional_headers:
Try out or live example to see how the Langflow Embedded Chat ⛓️ works.
This project is licensed under the MIT License - see the LICENSE file for details.