dr-doc-search is an open-source project on GitHub designed to let AI read papers or books for you. It is built on GPT-3, and its core feature is "Converse with a book," meaning that after users upload a PDF file, they can obtain information from the document by asking questions.
Main capabilities:
- Create an index for PDF files and generate embeddings.
- Support the use of the OpenAI API or HuggingFace models to generate embeddings and answers.
- Provide a command-line interface and a web interface (port 5006) for question answering.
- Can specify the starting and ending page numbers of the PDF.
- The output directory defaults to OutputDir/dr-doc-search/<pdf-name> under the user's home directory, and can be changed with the --app-dir parameter.
How to use:
- Installation: Requires Python 3.7+ and Poetry. After cloning the repository, create a virtual environment and install the dependencies.
- Set the OpenAI API key (obtained from OpenAI). Starting from version 1.5.0, OpenAI can be skipped and HuggingFace models can be used.
- Generate the index and embeddings: Run the training command, for example using HuggingFace to generate embeddings.
- Ask questions: Use the generated index to start asking questions, or open the web interface (port 5006). When using HuggingFace models, the --llm parameter must be provided.
Use cases:
- Researchers, students, or developers who need to quickly extract information from PDF books, papers, or documents.
- Users who want to explore the contents of long documents in a conversational way.
Limitations and notes:
- The project is not affiliated with OpenAI. The OpenAI API and GPT-3 language model are not free after the trial period.
- Windows users need to set the location of the ImageMagick executable in the IMCONV environment variable.
- For specific installation commands, code examples, and more options, please refer to the official documentation and GitHub repository.
Project address:https://github.com/namuan/dr-doc-search Documentation:https://namuan.github.io/dr-doc-search PyPI:https://pypi.org/project/dr-doc-search/