From c432666d18fbf78de8b3523eaf9626d8a20856a1 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 9 Apr 2024 00:49:34 +0200 Subject: Update README --- README.md | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ff86560..39c954b 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,17 @@ DOCUMENT_DB_USER = QDRANT_URL = QDRANT_COLLECTION_NAME = + +COHERE_API_KEY = # OPTIONAL ``` -### Ollama +### Ollama + +Make sure ollama is running: + +```sh +ollama serve +``` Download the encoder and generator models with ollama: @@ -43,18 +51,40 @@ Download and run qdrant. ### Postgres -Postgres is used to save hashes of the document chunks to prevent document chunks from +Postgres is used to save hashes of the document chunks to prevent document chunks from being added to the vector db more than ones. Download and run qdrant. -#### Running +### Cohere + +Get an API from their website. + +### Running + +#### Prerequisites + +##### Python Environment + +Activate the poetry shell: -Build script/or FE for adding pdfs or retrieve information +```sh +poetry shell +``` + +#### CLI + +```sh +python rag/cli.py +``` -### Frontend (Low priority) +#### UI -[streamlit](https://github.com/streamlit/streamlit) +Run the web app with streamlit: + +```sh +streamlit run rag/ui.py +``` ### Notes @@ -68,3 +98,5 @@ I took some inspiration from these tutorials. [rag-openai-qdrant](https://colab.research.google.com/github/qdrant/examples/blob/master/rag-openai-qdrant/rag-openai-qdrant.ipynb) [building-rag-application-using-langchain-openai-faiss](https://medium.com/@solidokishore/building-rag-application-using-langchain-openai-faiss-3b2af23d98ba) + +[knowledge_gpt](https://github.com/mmz-001/knowledge_gpt) -- cgit v1.2.3-70-g09d2