Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hwchase17/langchain-streamlit-template
https://github.com/hwchase17/langchain-streamlit-template
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hwchase17/langchain-streamlit-template
- Owner: hwchase17
- Created: 2023-01-09T04:28:41.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-11T03:25:35.000Z (about 1 month ago)
- Last Synced: 2025-01-28T13:16:05.715Z (14 days ago)
- Language: Python
- Size: 2.93 KB
- Stars: 272
- Watchers: 5
- Forks: 137
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-langchain-zh - Streamlit Template - streamlit-template?style=social): 如何在 Streamlit 上部署 LangChain 的模板 (工具 / 模板)
- awesome-langchain - Streamlit Template - streamlit-template?style=social) (Tools / Templates)
- jimsghstars - hwchase17/langchain-streamlit-template - (Python)
README
# LangChain-Streamlit Template
This repo serves as a template for how to deploy a [LangGraph](https://langchain-ai.github.io/langgraph/) agent on Streamlit.
This repo contains an `main.py` file which has a template for a chatbot implementation.
## Adding your chain
To add your chain, you need to change the `load_chain` function in `main.py`.
Depending on the type of your chain, you may also need to change the inputs/outputs that occur later on.## Run locally
After installing dependencies with e.g. `$ pip install -r requirements.txt`, you can run this project locally with the following command:
```sh
$ streamlit run main.py
```## Deploy on Streamlit
This is easily deployable on the Streamlit platform.
Note that when setting up your Streamlit app you should make sure to add `OPENAI_API_KEY` as a secret environment variable.## Setting up LangSmith
To quickly spot issues and improve the performance of your LangGraph projects, sign up for [LangSmith](https://docs.smith.langchain.com/). LangSmith lets you use trace data to debug, test, and monitor your LLM apps built with LangGraph — read more about how to get started [here](https://docs.smith.langchain.com/).