2023-07-20 15:36:30 -07:00
2023-07-18 15:02:52 -07:00
2023-07-20 15:26:17 -07:00
2023-06-26 12:47:37 -04:00
2023-06-26 13:31:02 -04:00
2023-07-20 15:26:17 -07:00
2023-07-20 15:26:17 -07:00

🦜🔗 LangChain 🤝 Streamlit agent examples

Open in GitHub Codespaces

This repository contains reference implementations of various LangChain agents as Streamlit apps including:

  • basic_streaming.py: Simple streaming app with langchain.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 setting OPENAI_API_KEY env 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)
  • chat_with_sql_db.py: Chatbot which can communicate with your database (View the app)
  • chat_pandas_df.py: Chatbot to ask questions about a pandas DF (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 and chain examples over time and improve the existing ones - PRs welcome! 🚀

S
Description
Reference implementations of several LangChain agents as Streamlit apps
Readme Apache-2.0 14 MiB
Languages
Python 97.5%
Dockerfile 2.5%