Metadata-Version: 2.1
Name: chatdocs
Version: 0.1.0
Summary: Chat with your documents offline using AI.
Home-page: https://github.com/marella/chatdocs
Author: Ravindra Marella
Author-email: mv.ravindra007@gmail.com
License: MIT
Keywords: chatdocs ctransformers transformers langchain chroma ai llm
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
Requires-Dist: InstructorEmbedding (>=1.0.1)
Requires-Dist: argilla (==1.8.0)
Requires-Dist: chromadb (<0.4.0,>=0.3.0)
Requires-Dist: ctransformers (<0.3.0,>=0.2.5)
Requires-Dist: extract-msg (<0.42.0,>=0.41.0)
Requires-Dist: langchain (>=0.0.181)
Requires-Dist: pandoc (==2.3)
Requires-Dist: pdfminer.six (==20221105)
Requires-Dist: pypandoc (==1.11)
Requires-Dist: sentence-transformers (>=2.2.2)
Requires-Dist: tqdm (>=4.64.1)
Requires-Dist: typer (>=0.9.0)
Requires-Dist: typing-extensions (>=4.4.0)
Requires-Dist: unstructured (<0.7.0,>=0.6.0)
Provides-Extra: tests
Requires-Dist: pytest ; extra == 'tests'

# [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)

Chat 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.

![Demo](https://github.com/marella/chatdocs/raw/main/docs/demo.png)

It is based on [PrivateGPT](https://github.com/imartinez/privateGPT) but uses [C Transformers](https://github.com/marella/ctransformers) which supports more GGML models. It also supports [🤗 Transformers](https://github.com/huggingface/transformers).

## Installation

Install the tool using:

```sh
pip install chatdocs
```

Download the AI models using:

```sh
chatdocs download
```

Now it can be run offline without internet connection.

## Basic Usage

Add a directory containing documents to chat with using:

```sh
chatdocs add /path/to/documents
```

Chat with your documents using:

```sh
chatdocs chat
```

## Advanced Usage

To see available options for each command, run:

```sh
chatdocs add --help
chatdocs chat --help
```

### LLM

By default it uses the [Wizard-Vicuna-7B-Uncensored-GGML](https://huggingface.co/TheBloke/Wizard-Vicuna-7B-Uncensored-GGML) model which can be changed using the `--model` option:

```sh
chatdocs chat --model TheBloke/MPT-7B-GGML --download
```

> **Note:** The `--download` option is only required when you use a model for the first time.

It can also be used with an existing local model file:

```sh
chatdocs chat --model /path/to/mpt-7b-ggml.bin --model-type mpt
```

### LLM Provider

By default it uses C Transformers as the LLM provider which can be changed to 🤗 Transformers using the `--hf` option:

```sh
chatdocs chat --hf --model TheBloke/Wizard-Vicuna-7B-Uncensored-HF --download
```

### DB

By default it stores the processed documents in `db` directory which can be changed using the `--db` option:

```sh
chatdocs add documents --db /path/to/some/directory
chatdocs chat --db /path/to/some/directory
```

## UI

Coming Soon

## License

[MIT](https://github.com/marella/chatdocs/blob/main/LICENSE)


