mirror of
https://github.com/langchain-ai/streamlit-agent.git
synced 2026-07-01 09:25:05 -04:00
23e814223a9beb8ecb69456f2bea6b1e0f54f7b3
* Added StreamHandler to Streamlit UI Implemented StreamHandler in the Streamlit application. This change enables the application to provide real-time streaming of the output from the language model during the execution of the Conversational Retrieval Chain. * Switch order of rendering --------- Co-authored-by: Joshua Carroll <joshua.carroll@snowflake.com>
🦜️🔗 LangChain 🤝 Streamlit agent examples
This repository contains reference implementations of various LangChain agents as Streamlit apps including:
basic_streaming.py: Simple streaming app withlangchain.chat_models.ChatOpenAI(View the app)mrkl_demo.py: An agent that replicates the MRKL demo (View the app)minimal_agent.py: A minimal agent with search (requires settingOPENAI_API_KEYenv to run)search_and_chat.py: A search-enabled chatbot that remembers chat history (View the app)chat_with_documents.py: Chatbot capable of answering queries by referring custom documents (View the app)
Apps feature LangChain 🤝 Streamlit integrations such as the Callback integration.
Setup
This project uses Poetry for dependency management.
# Create Python environment
$ poetry install
# Install git pre-commit hooks
$ poetry shell
$ pre-commit install
Running
# Run mrkl_demo.py or another app the same way
$ streamlit run streamlit_agent/mrkl_demo.py
Contributing
We plan to add more agent examples over time - PRs welcome
- SQL agent
Description
Languages
Python
97.5%
Dockerfile
2.5%