{"id":13585051,"url":"https://github.com/marella/chatdocs","last_synced_at":"2025-05-16T06:04:23.295Z","repository":{"id":172050378,"uuid":"648800562","full_name":"marella/chatdocs","owner":"marella","description":"Chat with your documents offline using AI.","archived":false,"fork":false,"pushed_at":"2023-09-29T17:11:08.000Z","size":261,"stargazers_count":726,"open_issues_count":58,"forks_count":103,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-05-13T11:55:48.378Z","etag":null,"topics":["ai","chatdocs","chroma","ctransformers","langchain","llm","transformers"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marella.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-06-02T21:06:22.000Z","updated_at":"2025-05-04T02:22:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1fa0388-ce99-4707-91ff-e0a70e9eb260","html_url":"https://github.com/marella/chatdocs","commit_stats":null,"previous_names":["marella/chatdocs"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marella%2Fchatdocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marella%2Fchatdocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marella%2Fchatdocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marella%2Fchatdocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marella","download_url":"https://codeload.github.com/marella/chatdocs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478186,"owners_count":22077675,"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","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":["ai","chatdocs","chroma","ctransformers","langchain","llm","transformers"],"created_at":"2024-08-01T15:04:42.595Z","updated_at":"2025-05-16T06:04:23.240Z","avatar_url":"https://github.com/marella.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# [ChatDocs](https://github.com/marella/chatdocs) [![PyPI](https://img.shields.io/pypi/v/chatdocs)](https://pypi.org/project/chatdocs/) [![tests](https://github.com/marella/chatdocs/actions/workflows/tests.yml/badge.svg)](https://github.com/marella/chatdocs/actions/workflows/tests.yml)\n\nChat with your documents offline using AI. No data leaves your system. Internet connection is only required to install the tool and download the AI models. It is based on [PrivateGPT](https://github.com/imartinez/privateGPT) but has more features.\n\n![Web UI](https://github.com/marella/chatdocs/raw/main/docs/demo.png)\n\n**Contents**\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [GPU](#gpu)\n\n## Features\n\n- Supports GGML/GGUF models via [CTransformers](https://github.com/marella/ctransformers)\n- Supports 🤗 Transformers models\n- Supports GPTQ models\n- Web UI\n- GPU support\n- Highly configurable via `chatdocs.yml`\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eShow supported document types\u003c/strong\u003e\u003c/summary\u003e\u003cbr\u003e\n\n| Extension       | Format                         |\n| :-------------- | :----------------------------- |\n| `.csv`          | CSV                            |\n| `.docx`, `.doc` | Word Document                  |\n| `.enex`         | EverNote                       |\n| `.eml`          | Email                          |\n| `.epub`         | EPub                           |\n| `.html`         | HTML                           |\n| `.md`           | Markdown                       |\n| `.msg`          | Outlook Message                |\n| `.odt`          | Open Document Text             |\n| `.pdf`          | Portable Document Format (PDF) |\n| `.pptx`, `.ppt` | PowerPoint Document            |\n| `.txt`          | Text file (UTF-8)              |\n\n\u003c/details\u003e\n\n## Installation\n\nInstall the tool using:\n\n```sh\npip install chatdocs\n```\n\nDownload the AI models using:\n\n```sh\nchatdocs download\n```\n\nNow it can be run offline without internet connection.\n\n## Usage\n\nAdd a directory containing documents to chat with using:\n\n```sh\nchatdocs add /path/to/documents\n```\n\n\u003e The processed documents will be stored in `db` directory by default.\n\nChat with your documents using:\n\n```sh\nchatdocs ui\n```\n\nOpen http://localhost:5000 in your browser to access the web UI.\n\nIt also has a nice command-line interface:\n\n```sh\nchatdocs chat\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eShow preview\u003c/strong\u003e\u003c/summary\u003e\u003cbr\u003e\n\n![Demo](https://github.com/marella/chatdocs/raw/main/docs/cli.png)\n\n\u003c/details\u003e\n\n## Configuration\n\nAll the configuration options can be changed using the `chatdocs.yml` config file. Create a `chatdocs.yml` file in some directory and run all commands from that directory. For reference, see the default [`chatdocs.yml`](https://github.com/marella/chatdocs/blob/main/chatdocs/data/chatdocs.yml) file.\n\nYou don't have to copy the entire file, just add the config options you want to change as it will be merged with the default config. For example, see [`tests/fixtures/chatdocs.yml`](https://github.com/marella/chatdocs/blob/main/tests/fixtures/chatdocs.yml) which changes only some of the config options.\n\n### Embeddings\n\nTo change the embeddings model, add and change the following in your `chatdocs.yml`:\n\n```yml\nembeddings:\n  model: hkunlp/instructor-large\n```\n\n\u003e **Note:** When you change the embeddings model, delete the `db` directory and add documents again.\n\n### CTransformers\n\nTo change the CTransformers (GGML/GGUF) model, add and change the following in your `chatdocs.yml`:\n\n```yml\nctransformers:\n  model: TheBloke/Wizard-Vicuna-7B-Uncensored-GGML\n  model_file: Wizard-Vicuna-7B-Uncensored.ggmlv3.q4_0.bin\n  model_type: llama\n```\n\n\u003e **Note:** When you add a new model for the first time, run `chatdocs download` to download the model before using it.\n\nYou can also use an existing local model file:\n\n```yml\nctransformers:\n  model: /path/to/ggml-model.bin\n  model_type: llama\n```\n\n### 🤗 Transformers\n\nTo use 🤗 Transformers models, add the following to your `chatdocs.yml`:\n\n```yml\nllm: huggingface\n```\n\nTo change the 🤗 Transformers model, add and change the following in your `chatdocs.yml`:\n\n```yml\nhuggingface:\n  model: TheBloke/Wizard-Vicuna-7B-Uncensored-HF\n```\n\n\u003e **Note:** When you add a new model for the first time, run `chatdocs download` to download the model before using it.\n\nTo use GPTQ models with 🤗 Transformers, install the necessary packages using:\n\n```sh\npip install chatdocs[gptq]\n```\n\n## GPU\n\n### Embeddings\n\nTo enable GPU (CUDA) support for the embeddings model, add the following to your `chatdocs.yml`:\n\n```yml\nembeddings:\n  model_kwargs:\n    device: cuda\n```\n\nYou may have to reinstall PyTorch with CUDA enabled by following the instructions [here](https://pytorch.org/get-started/locally/).\n\n### CTransformers\n\nTo enable GPU (CUDA) support for the CTransformers (GGML/GGUF) model, add the following to your `chatdocs.yml`:\n\n```yml\nctransformers:\n  config:\n    gpu_layers: 50\n```\n\nYou may have to install the CUDA libraries using:\n\n```sh\npip install ctransformers[cuda]\n```\n\n### 🤗 Transformers\n\nTo enable GPU (CUDA) support for the 🤗 Transformers model, add the following to your `chatdocs.yml`:\n\n```yml\nhuggingface:\n  device: 0\n```\n\nYou may have to reinstall PyTorch with CUDA enabled by following the instructions [here](https://pytorch.org/get-started/locally/).\n\n## License\n\n[MIT](https://github.com/marella/chatdocs/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarella%2Fchatdocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarella%2Fchatdocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarella%2Fchatdocs/lists"}