{"repo":"gbolly/dash-chat","free":true,"listed":false,"github":"https://github.com/gbolly/dash-chat","clone":"git clone https://github.com/gbolly/dash-chat.git","description":"Chat component for Python Dash","language":"JavaScript","stars":32,"topics":["chat","chatbot","dash","plotly-dash","python"],"license":"MIT","category":"chat-messaging","readme_excerpt":"dash-chat dash-chat is a Dash component library chat interface. It provides a customizable and responsive chat UI with support for markdown, chat persistence, typing indicators, themes, and state management. Installation Basic Usage The simplest way to use the dash chat.ChatComponent is to initialize the messages prop as an empty list. This is a list of messages that initialize the chat UI. Each message is an OpenAI-style dictionary that must have the following key-value pairs: - role : The message sender, either \"user\" or \"assistant\" . - content : The content of the message. A dash callback chat function is also required to handle how the messages are updated Example 1 Using OpenAI with dash-chat (requires the openai package - install it by running pip install openai ) Example 2 To send local images and files along with a message to the AI assistant, the structure of content in the messages prop becomes a list of dictionary. The content takes the structure; In your dash callback, follow the OpenAI-style for uploading images with text. Example 3 ChatComponent is agnostic about which chatbot or AI assistant technology you're interacting with, so here's an example not using OpenAI Persistence Functionality The ChatComponent supports persistence, allowing messages to be stored and retrieved across page reloads. When persistence=True, messages are saved in the specified storage (localStorage or sessionStorage). On initialization, the component checks for stored messages. If store","default_branch":null,"files":null,"tree":[],"storefront":"/r/gbolly","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gbolly/dash-chat/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}