pdfconverse


Namepdfconverse JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryA tool for interacting with PDF documents using AI, allowing page-specific prompts and summaries. PDFConverse leverages Gemini API to provide intelligent responses to queries about PDF content, optimizing token usage and enabling focused analysis of specific page ranges.
upload_time2024-06-29 14:28:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords ai document analysis gemini pdf smart reading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SmartPDF

PDFConverse is a Python tool that allows you to interact with PDF documents using AI, leveraging the Gemini API to provide intelligent responses to queries about PDF content. It optimizes token usage and enables focused analysis of specific page ranges.

## Features

- Interact with individual pages or page ranges in your PDF
- Run AI-powered prompts on specific sections of your document
- Avoid the problem of passing too much information to the model
- Save tokens by targeting specific pages or ranges
- Built-in sanity checks for better performance and reliability

## Installation

You can install PDFConverse using pip:

```
pip install pdfconverse
```

## Usage

Here's a basic example of how to use PDFConverse:

```python
import os
from pdfconverse import PDFConverse
from pdfconverse.models import FilePath,GeminiSetup

# Set up your PDF path and Gemini API key. Assuming you have a .env file with the Gemini API key
pdf_path = FilePath(path="./path/to/your/document.pdf")
gemini_setup=GeminiSetup(api_key=os.getenv("GEMINI_API_KEY"),model="gemini-1.5-flash")

# Initialize PDFConverse
pdfconverse = PDFConverse(pdf_path=pdf_path, gemini_setup=gemini_setup)

# Get a summary of the first page
summary = pdfconverse.page(page_start=0, page_end=0).prompt("Give me a summary")
print(summary)
```

## Use Cases

1. **Reading Aid**: Use PDFConverse as a reading assistant, summarizing individual pages as you go through a document.
2. **Targeted Analysis**: Focus on specific sections of a large document without processing unnecessary content.
3. **Document Q&A**: Ask questions about particular pages or sections of your PDF.

## Caution

While PDFConverse can summarize or interact with entire books, please be aware that this may lead to expensive bills from the Gemini API. Always monitor your usage and costs.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Thanks to the Gemini API for powering the AI interactions
- Inspired by the need for more granular control over AI-document interactions
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pdfconverse",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ai, document analysis, gemini, pdf, smart reading",
    "author": null,
    "author_email": "Chencha Jacob <jmokua@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/27/52/b8d7d220790c78d9753af2a734492d48ba635506256c212eb5ae7f0fec86/pdfconverse-0.1.2.tar.gz",
    "platform": null,
    "description": "# SmartPDF\n\nPDFConverse is a Python tool that allows you to interact with PDF documents using AI, leveraging the Gemini API to provide intelligent responses to queries about PDF content. It optimizes token usage and enables focused analysis of specific page ranges.\n\n## Features\n\n- Interact with individual pages or page ranges in your PDF\n- Run AI-powered prompts on specific sections of your document\n- Avoid the problem of passing too much information to the model\n- Save tokens by targeting specific pages or ranges\n- Built-in sanity checks for better performance and reliability\n\n## Installation\n\nYou can install PDFConverse using pip:\n\n```\npip install pdfconverse\n```\n\n## Usage\n\nHere's a basic example of how to use PDFConverse:\n\n```python\nimport os\nfrom pdfconverse import PDFConverse\nfrom pdfconverse.models import FilePath,GeminiSetup\n\n# Set up your PDF path and Gemini API key. Assuming you have a .env file with the Gemini API key\npdf_path = FilePath(path=\"./path/to/your/document.pdf\")\ngemini_setup=GeminiSetup(api_key=os.getenv(\"GEMINI_API_KEY\"),model=\"gemini-1.5-flash\")\n\n# Initialize PDFConverse\npdfconverse = PDFConverse(pdf_path=pdf_path, gemini_setup=gemini_setup)\n\n# Get a summary of the first page\nsummary = pdfconverse.page(page_start=0, page_end=0).prompt(\"Give me a summary\")\nprint(summary)\n```\n\n## Use Cases\n\n1. **Reading Aid**: Use PDFConverse as a reading assistant, summarizing individual pages as you go through a document.\n2. **Targeted Analysis**: Focus on specific sections of a large document without processing unnecessary content.\n3. **Document Q&A**: Ask questions about particular pages or sections of your PDF.\n\n## Caution\n\nWhile PDFConverse can summarize or interact with entire books, please be aware that this may lead to expensive bills from the Gemini API. Always monitor your usage and costs.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Thanks to the Gemini API for powering the AI interactions\n- Inspired by the need for more granular control over AI-document interactions",
    "bugtrack_url": null,
    "license": null,
    "summary": "A tool for interacting with PDF documents using AI, allowing page-specific prompts and summaries. PDFConverse leverages Gemini API to provide intelligent responses to queries about PDF content, optimizing token usage and enabling focused analysis of specific page ranges.",
    "version": "0.1.2",
    "project_urls": {
        "Documentation": "https://github.com/prodeveloper/pdfconverse?tab=readme-ov-file",
        "Issues": "https://github.com/prodeveloper/pdfconverse/issues",
        "Source": "https://github.com/prodeveloper/pdfconverse"
    },
    "split_keywords": [
        "ai",
        " document analysis",
        " gemini",
        " pdf",
        " smart reading"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f14af7e3c1573e68f5fe70c8bfd9846e9dc8cedfb5224942323abec0ad90a6b8",
                "md5": "64aa7117d1a1da56bd9071705c7d8a75",
                "sha256": "0095cba366c6260fcb0f34bb61ccd27d965204267fbdf79fcd09d0970ab3951f"
            },
            "downloads": -1,
            "filename": "pdfconverse-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "64aa7117d1a1da56bd9071705c7d8a75",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 29424,
            "upload_time": "2024-06-29T14:28:22",
            "upload_time_iso_8601": "2024-06-29T14:28:22.676150Z",
            "url": "https://files.pythonhosted.org/packages/f1/4a/f7e3c1573e68f5fe70c8bfd9846e9dc8cedfb5224942323abec0ad90a6b8/pdfconverse-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2752b8d7d220790c78d9753af2a734492d48ba635506256c212eb5ae7f0fec86",
                "md5": "ef2a799680495ef55e3e911251c0e373",
                "sha256": "8593112bba31672bd6a30d1d65b6295cccdd1b843b6023e4de30af4088222985"
            },
            "downloads": -1,
            "filename": "pdfconverse-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "ef2a799680495ef55e3e911251c0e373",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 28778,
            "upload_time": "2024-06-29T14:28:24",
            "upload_time_iso_8601": "2024-06-29T14:28:24.773910Z",
            "url": "https://files.pythonhosted.org/packages/27/52/b8d7d220790c78d9753af2a734492d48ba635506256c212eb5ae7f0fec86/pdfconverse-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-29 14:28:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "prodeveloper",
    "github_project": "pdfconverse?tab=readme-ov-file",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pdfconverse"
}
        
Elapsed time: 0.62136s