Create Chat Interfaces
Both Streamlit and Panel provides special components to help you build conversational apps.
Streamlit | Panel | Description |
---|---|---|
chat_message | ChatMessage | Display a chat message |
chat_input | ChatInput example | Input a chat message |
status | Status example | Display the output of long-running tasks in a container |
ChatFeed | Display multiple chat messages | |
ChatInterface | High-level, easy to use chat interface | |
StreamlitCallbackHandler | PanelCallbackHandler | Display the thoughts and actions of a LangChain agent |
StreamlitChatMessageHistory | Persist the memory of a LangChain agent |
The starting point for most Panel users is the high-level ChatInterface
or PanelCallbackHandler
, not the low-level ChatMessage
and ChatFeed
components.
Chat Message
Lets see how-to migrate an app that is using st.chat_message
.
Streamlit Chat Message Example
Panel Chat Message Example
Echo Bot
Lets see how to migrate a bot that echoes the user input.
Streamlit Echo Bot
Panel Echo Bot
Search Agent with Chain of thought
Lets try to migrate an agent that uses the Duck Duck Go search tool and shows its chain of thought.
Streamlit Search Agent with Chain of thought
Your browser does not support the video tag.
Panel Search Agent with Chain of thought
Your browser does not support the video tag.
More Panel Chat Examples
For more inspiration check out panel-chat-examples.