How to Use ChatDocs: Your Offline Document Chatting AI

Mar 15, 2021 | Educational

Imagine having a personal assistant that can comb through your files and chat with you about them—all without sending your data elsewhere. Welcome to ChatDocs, a powerful AI tool that allows you to interact with your documents offline while providing you with the convenience of both a web UI and a command-line interface. In this article, we’ll guide you through the features, installation process, usage, and configuration of ChatDocs.

Features

  • Supports GGML and GGUF models via CTransformers
  • Supports Transformer models
  • Supports GPTQ models
  • Web UI for user-friendly interactions
  • GPU support for faster performance
  • Highly configurable through chatdocs.yml

Supported Document Types

Extension Format
.csv CSV
.docx, .doc Word Document
.enex EverNote
.pdf Portable Document Format (PDF)
.txt Text file (UTF-8)
.pptx, .ppt PowerPoint Document

Installation

Getting started with ChatDocs is straightforward. Here’s how to install it:

sh
pip install chatdocs

Once installed, download the AI models:

sh
chatdocs download

Now you can run the tool offline without needing an internet connection!

Usage

With ChatDocs, you can easily add directories containing documents to chat with. Here’s how:

sh
chatdocs add pathtodocuments

The processed documents will be stored in a default directory named db. To access the web UI, use the following command:

sh
chatdocs ui

Open http://localhost:5000 in your browser to interact with your documents. You can also use the command-line interface:

sh
chatdocs chat

Here’s a sneak peek of the CLI interface:

Demo of ChatDocs CLI

Configuration

To customize ChatDocs, edit the chatdocs.yml configuration file. Create this file in your chosen directory and run all commands from there. You only need to add the config options you want to change; it will merge with the default settings.

For instance, to update the embeddings model, you can do the following:

yaml
embeddings:
  model: hkunlp/instructor-large

Note: If you change the embeddings model, delete the db directory and re-add documents.

GPU Support

To enhance performance using a GPU, configure the chatdocs.yml file according to the model you are using. Here’s an example for enabling GPU support for embeddings:

yaml
embeddings:
  model_kwargs:
    device: cuda

For details on GPU setups, visit PyTorch Local Setup.

Troubleshooting

If you encounter issues during installation or usage, consider the following:

  • Ensure you’re using the correct paths for document directories.
  • Verify that the chatdocs.yml file is correctly set up.
  • Double-check that all necessary dependencies are installed.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Conclusion

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Now that you know how to set up and use ChatDocs, you can easily chat with your documents while keeping your data secure. Happy chatting!

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox