diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-09 00:49:34 +0200 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2024-04-09 00:49:34 +0200 |
commit | c432666d18fbf78de8b3523eaf9626d8a20856a1 (patch) | |
tree | f82ff36461645f34378b6f27301a74a630f09965 /README.md | |
parent | 3f447bff69c20109474c455f1ad52bd547ab49e9 (diff) |
Update README
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 44 |
1 files changed, 38 insertions, 6 deletions
@@ -24,9 +24,17 @@ DOCUMENT_DB_USER = <DOCUMENT_DB_USER> QDRANT_URL = <QDRANT_URL> QDRANT_COLLECTION_NAME = <QDRANT_COLLECTION_NAME> + +COHERE_API_KEY = <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) |