--- id: shinychat version: "0.6.1" license: MIT license_treatment: permissive maintenance: active --- # shinychat — An AI Chat interface for Shiny apps. License: permissive · Maintenance: active · Downloads: 320.6K/mo ## What it is and what it does shinychat is a chat UI component library for Shiny for Python that abstracts the interface layer for building conversational applications. It provides a Chat class that manages message display, user input collection, and event handling, letting developers focus on the backend logic rather than HTML/CSS markup. The component integrates directly into Shiny's reactive framework and supports both imperative and declarative usage patterns. Typically used to add a chat interface to a Shiny app by instantiating a Chat object, rendering it with `.ui()`, and attaching an async callback to handle user submissions. Messages are managed as a reactive list, and the component handles rendering, scrolling, and input field management. It is automatically included with Shiny for Python but can be installed separately if needed. Use it for: - Build a chatbot UI in a Shiny app that delegates message generation to an external LLM API. - Create an interactive Q&A interface where user queries trigger backend computations and responses are appended to the chat. - Prototype conversational data exploration tools that accept natural-language queries and display results. - Add a support or help chat widget to an existing Shiny dashboard without writing custom HTML/JavaScript. - Develop multi-turn dialogue systems where message history is maintained and used for context in subsequent calls. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. shinychat provides a chat UI component for building conversational interfaces in Shiny for Python applications, handling message display, user input, and callback handling. Yes, if you are building a Shiny for Python application that needs a chat interface. The component is actively maintained, has no known vulnerabilities, low install friction, and integrates seamlessly with Shiny's reactive model. It is permissively licensed and already included with Shiny, so installing it separately is optional unless you need a specific version or want to use it outside a Shiny context. ## Install pip install shinychat uv add shinychat poetry add shinychat ## Installing shinychat Before you install: Low friction installation with a pure-Python wheel. Actively maintained with a recent release and no known vulnerabilities. Depends on htmltools, pydantic, and shiny—all stable, widely-used libraries. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects. Quickstart: pip install shinychat from shiny.express import render, ui from shinychat.express import Chat chat = Chat(id="chat", messages=[{"content": "Hello!", "role": "assistant"}]) chat.ui() @chat.on_user_submit async def handle_input(user_input: str): await chat.append_message(f"You said: {user_input}") Requires Python 3.10 or later and a working Shiny for Python environment. Verify before relying: - Whether the package includes built-in LLM integration or only provides UI scaffolding for user-supplied models. - Performance characteristics and message history size limits for typical chat applications. - Styling and customization options beyond what the example demonstrates. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 320.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags chat ui component shiny, conversational interface python, chatbot ui shiny python, chat interface web app, shiny chat component, ai chat ui framework, message display component, shiny-component, ui-framework, conversational-ai [View on SkillFed](https://skillfed.io/packages/shinychat) · [View on PyPI](https://pypi.org/project/shinychat/)