{"id":25692694,"url":"https://github.com/kwame-mintah/python-langchain-chainlit-qdrant-ollama-stack-template","last_synced_at":"2026-04-09T23:44:35.851Z","repository":{"id":279046015,"uuid":"937560245","full_name":"kwame-mintah/python-langchain-chainlit-qdrant-ollama-stack-template","owner":"kwame-mintah","description":"📄 A template for project for creating a chainlit application, using a locally run model via ollama and qdrant vector database for document retrieval.","archived":false,"fork":false,"pushed_at":"2025-02-23T12:25:32.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T12:27:03.467Z","etag":null,"topics":["chainlit","deepseek-r1","docker","docker-compose","docling","huggingface","langchain","ollama","qdrant"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kwame-mintah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-23T11:14:45.000Z","updated_at":"2025-02-23T12:25:35.000Z","dependencies_parsed_at":"2025-02-23T12:38:00.068Z","dependency_job_id":null,"html_url":"https://github.com/kwame-mintah/python-langchain-chainlit-qdrant-ollama-stack-template","commit_stats":null,"previous_names":["kwame-mintah/python-langchain-chainlit-qdrant-ollama-stack-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/kwame-mintah/python-langchain-chainlit-qdrant-ollama-stack-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwame-mintah%2Fpython-langchain-chainlit-qdrant-ollama-stack-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwame-mintah%2Fpython-langchain-chainlit-qdrant-ollama-stack-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwame-mintah%2Fpython-langchain-chainlit-qdrant-ollama-stack-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwame-mintah%2Fpython-langchain-chainlit-qdrant-ollama-stack-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kwame-mintah","download_url":"https://codeload.github.com/kwame-mintah/python-langchain-chainlit-qdrant-ollama-stack-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kwame-mintah%2Fpython-langchain-chainlit-qdrant-ollama-stack-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284971136,"owners_count":27093121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-17T02:00:06.431Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chainlit","deepseek-r1","docker","docker-compose","docling","huggingface","langchain","ollama","qdrant"],"created_at":"2025-02-24T23:28:12.950Z","updated_at":"2025-11-17T23:03:42.320Z","avatar_url":"https://github.com/kwame-mintah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Langchain Chainlit Qdrant Ollama Stack Template\n\n![python](https://img.shields.io/badge/python-3.11.6-informational)\n\u003ca href=\"https://github.com/new?template_name=python-langchain-chainlit-qdrant-ollama-stack-template\u0026template_owner=kwame-mintah\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/use%20this-template-blue?logo=github\"\u003e\n\u003c/a\u003e\n\nThis a template project, to demonstrate using docker compose to create a Retrieval-Augmented Generation (RAG) application\nusing Langchain, chainlit, qdrant and ollama on a specified knowledge base.\n\n## Prerequisites\n\n1. [Python 3.11.6](https://www.python.org/downloads/release/python-3116/)\n2. [Langchain](https://python.langchain.com/docs/introduction/)\n3. [Chainlit](https://docs.chainlit.io/get-started/overview)\n4. [Qdrant](https://qdrant.tech/documentation/quickstart/)\n5. [Ollama](https://ollama.com/download)\n6. [Docker for desktop](https://docs.docker.com/desktop/)\n\n# Usage\n\n1. Install python packages used for the project\n\n```pycon\npip install -r requirements.txt\n```\n\n2. Start [Qdrant](https://qdrant.tech/documentation/quickstart/) vector search database via docker\n\n```shell\ndocker run -p 6333:6333 -p 6334:6334 \\\n    -v \"$(pwd)/qdrant_storage:/qdrant/storage:z\" \\\n    qdrant/qdrant\n```\n\n3. Start [Ollama](https://ollama.readthedocs.io/en/quickstart/) and download large language models needed, waiting for the download to complete\n\n```shell\nollama run deepseek-r1:1.5b\n```\n\n4. Ingest data into the Qdrant database\n\n```pycon\npython utils/ingest.py\n```\n\n5. Confirm Qdrant collection has been created with data ingested via the Web UI @ http://localhost:6333/dashboard\n\n6. Start Chainlit application\n\n```pycon\nchainlit run main.py\n```\n\n## Environment variables\n\nThe following environment variables are used by this project.\n\n| Environment Variable        | Description                           | Default Value                          |\n|-----------------------------|---------------------------------------|----------------------------------------|\n| QDRANT_DATABASE_URL         | The Qdrant Database URL               | http://localhost:6333                  |\n| QDRANT_COLLECTION_NAME      | The name of the Qdrant collection     | template                               |\n| OLLAMA_URL                  | The Ollama host URL                   | http://localhost:11434                 |\n| OLLAMA_LLM_MODEL            | The Ollama model to use               | deepseek-r1:1.5b                       |\n| DATA_INGESTION_LOCATION     | The file path for data to be ingested |                                        |\n| HUGGING_FACE_EMBED_MODEL_ID | The Hugging Face embeddings name      | sentence-transformers/all-MiniLM-L6-v2 |\n\n# Running via Docker Compose\n\nAn alternative way of running the stack involves using [docker compose](https://docs.docker.com/compose/), the [`docker-compose.yaml`](docker-compose.yaml)\ncontains the services needed to run this project, such as starting chainlit, qdrant and ollama.\n\n1. In the root directory start all the services.\n\n```shell\ndocker compose up -d\n```\n\n2. Access the services on the following endpoint in your browser. chainlit (http://localhost:8000/) and qdrant (http://localhost:6333/dashboard)\n3. An _optional_ step to run is enabling GPU usage via docker compose, you will need to uncomment out the following lines\n   in the yaml found under the Ollama service, providing better performance with large language models (LLM) models.\n\n```yaml\n...\n#  Enable GPU support using host machine\n#  https://docs.docker.com/compose/how-tos/gpu-support/\n deploy:\n   resources:\n     reservations:\n       devices:\n         - driver: nvidia\n           count: all\n           capabilities: [ gpu ]\n```\n\n# References\n\n[100% Local RAG Using LangChain, DeepSeek, Ollama, Qdrant, Docling, Huggingface \u0026 Chainlit](https://www.youtube.com/watch?v=MCHOam13JSk) by [Data Science Basics](https://www.youtube.com/@datasciencebasics)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwame-mintah%2Fpython-langchain-chainlit-qdrant-ollama-stack-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkwame-mintah%2Fpython-langchain-chainlit-qdrant-ollama-stack-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkwame-mintah%2Fpython-langchain-chainlit-qdrant-ollama-stack-template/lists"}