Skip to content

Commit

Permalink
quick fixes (langchain-ai#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
agola11 authored Feb 15, 2023
1 parent 748ada7 commit 1b64c73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Built with [LangChain](https://github.com/hwchase17/langchain/) and [FastAPI](ht

The app leverages LangChain's streaming support and async API to update the page in real time for multiple users.

## To run:
## Running locally
1. Install dependencies: `pip install -r requirements.txt`
1. Run `ingest.sh` to ingest LangChain docs data into the vectorstore (only needs to be done once).
1. You can use other [Document Loaders](https://langchain.readthedocs.io/en/latest/modules/document_loaders.html) to load your own data into the vectorstore.
1. Run the app: `make start`
1. To enable tracing, make sure `langchain-server` is running locally and pass `tracing=True` to `get_chain` in `main.py`.
1. To enable tracing, make sure `langchain-server` is running locally and pass `tracing=True` to `get_chain` in `main.py`. You can find more documentation [here](https://langchain.readthedocs.io/en/latest/tracing.html).
1. Open [localhost:9000](http://localhost:9000) in your browser.

## 🚀 Important Links
Expand Down
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ async def websocket_endpoint(websocket: WebSocket):
chat_history = []
qa_chain = get_chain(vectorstore, question_handler, stream_handler)
# Use the below line instead of the above line to enable tracing
qa_chain = get_chain(vectorstore, question_handler, stream_handler, tracing=True)
# Ensure `langchain-server` is running
# qa_chain = get_chain(vectorstore, question_handler, stream_handler, tracing=True)

while True:
try:
Expand Down

0 comments on commit 1b64c73

Please sign in to comment.