pdfgpt


Namepdfgpt JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/Mariosmsk/pdfgpt
Summarypdfgpt is a Python package that provides users with the ability to engage in natural language conversations with their PDF documents.
upload_time2023-07-06 13:18:41
maintainer
docs_urlNone
authorMarios S. Kyriakou
requires_python>=3.6
licenseMIT license
keywords pdfgpt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ======
pdfgpt
======


.. image:: https://img.shields.io/pypi/v/pdfgpt.svg
        :target: https://pypi.python.org/pypi/pdfgpt

.. image:: https://readthedocs.org/projects/pdfgpt/badge/?version=latest
        :target: https://pdfgpt.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status

.. image:: https://pepy.tech/badge/pdfgpt
        :target: https://pepy.tech/badge/pdfgpt
        :alt: Downloads

.. image:: https://static.pepy.tech/badge/pdfgpt/month
        :target: https://pepy.tech/badge/pdfgpt/month
        :alt: Downloads

pdfgpt is a Python package that provides users with the ability to engage in natural language conversations with their PDF documents.


* Free software: MIT license
* Documentation: https://pdfgpt.readthedocs.io.

**Source:** Openai - https://github.com/openai/openai-cookbook

How to install
---------------

**Environments -> base (root) -> open terminal -> pip install pdfgpt**

* pip install pdfgpt

Example
-------

.. code-block:: python

    from pdfgpt import *

    d = PDFBot(openai_key='OPENAI_KEY')

    print('Example')
    extracted_text, num_pages = d.generateText(file_path='tests/epanet_matlab_toolkit.pdf')
    df = d.generateEmbeddings(extracted_text)

    print('USER: What is EPANET?')
    prompt = d.generatePrompt(df, num_pages, 'What is EPANET?')
    response = d.sendPrompt(prompt, model="gpt-3.5-turbo")
    print('AI')
    print(response, '\n')

What is EPANET?

EPANET is a software for modeling water distribution systems' hydraulic and quality dynamics, initially developed by the US Environmental Protection Agency in the C programming language in 1994. It uses a geometric representation of the pipe network, along with a set of initial conditions, rules of operation, and uses this information to compute flows, pressures, and water quality throughout the network, for a certain period of time.

.. code-block:: python

    print('USER: Give me the command to load a network?')
    prompt = d.generatePrompt(df, num_pages, 'Give me the command to load a network?')
    response = d.sendPrompt(prompt, model="gpt-3.5-turbo", temperature=0.9)
    print('AI')
    print(response)

What is the command to load a network?

The command to load a network is:

G = epanet( ’BWSN_Network_1 .inp’);%Load EPANET Input file

G.loadMSXFile( ’Arsenite .msx’);%Load MSX file

Features
--------

* TODO

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage


=======
History
=======

0.1.0 (2023-05-11)
------------------

* First release on PyPI.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Mariosmsk/pdfgpt",
    "name": "pdfgpt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "pdfgpt",
    "author": "Marios S. Kyriakou",
    "author_email": "kiriakou.marios@ucy.ac.cy",
    "download_url": "https://files.pythonhosted.org/packages/4e/95/cdee5b5f8019764ce8e33aa6957fc9d194762b38600d5ddea60d2dbf9101/pdfgpt-0.2.2.tar.gz",
    "platform": null,
    "description": "======\r\npdfgpt\r\n======\r\n\r\n\r\n.. image:: https://img.shields.io/pypi/v/pdfgpt.svg\r\n        :target: https://pypi.python.org/pypi/pdfgpt\r\n\r\n.. image:: https://readthedocs.org/projects/pdfgpt/badge/?version=latest\r\n        :target: https://pdfgpt.readthedocs.io/en/latest/?version=latest\r\n        :alt: Documentation Status\r\n\r\n.. image:: https://pepy.tech/badge/pdfgpt\r\n        :target: https://pepy.tech/badge/pdfgpt\r\n        :alt: Downloads\r\n\r\n.. image:: https://static.pepy.tech/badge/pdfgpt/month\r\n        :target: https://pepy.tech/badge/pdfgpt/month\r\n        :alt: Downloads\r\n\r\npdfgpt is a Python package that provides users with the ability to engage in natural language conversations with their PDF documents.\r\n\r\n\r\n* Free software: MIT license\r\n* Documentation: https://pdfgpt.readthedocs.io.\r\n\r\n**Source:** Openai - https://github.com/openai/openai-cookbook\r\n\r\nHow to install\r\n---------------\r\n\r\n**Environments -> base (root) -> open terminal -> pip install pdfgpt**\r\n\r\n* pip install pdfgpt\r\n\r\nExample\r\n-------\r\n\r\n.. code-block:: python\r\n\r\n    from pdfgpt import *\r\n\r\n    d = PDFBot(openai_key='OPENAI_KEY')\r\n\r\n    print('Example')\r\n    extracted_text, num_pages = d.generateText(file_path='tests/epanet_matlab_toolkit.pdf')\r\n    df = d.generateEmbeddings(extracted_text)\r\n\r\n    print('USER: What is EPANET?')\r\n    prompt = d.generatePrompt(df, num_pages, 'What is EPANET?')\r\n    response = d.sendPrompt(prompt, model=\"gpt-3.5-turbo\")\r\n    print('AI')\r\n    print(response, '\\n')\r\n\r\nWhat is EPANET?\r\n\r\nEPANET is a software for modeling water distribution systems' hydraulic and quality dynamics, initially developed by the US Environmental Protection Agency in the C programming language in 1994. It uses a geometric representation of the pipe network, along with a set of initial conditions, rules of operation, and uses this information to compute flows, pressures, and water quality throughout the network, for a certain period of time.\r\n\r\n.. code-block:: python\r\n\r\n    print('USER: Give me the command to load a network?')\r\n    prompt = d.generatePrompt(df, num_pages, 'Give me the command to load a network?')\r\n    response = d.sendPrompt(prompt, model=\"gpt-3.5-turbo\", temperature=0.9)\r\n    print('AI')\r\n    print(response)\r\n\r\nWhat is the command to load a network?\r\n\r\nThe command to load a network is:\r\n\r\nG = epanet( \u00e2\u20ac\u2122BWSN_Network_1 .inp\u00e2\u20ac\u2122);%Load EPANET Input file\r\n\r\nG.loadMSXFile( \u00e2\u20ac\u2122Arsenite .msx\u00e2\u20ac\u2122);%Load MSX file\r\n\r\nFeatures\r\n--------\r\n\r\n* TODO\r\n\r\nCredits\r\n-------\r\n\r\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\r\n\r\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\r\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\r\n\r\n\r\n=======\r\nHistory\r\n=======\r\n\r\n0.1.0 (2023-05-11)\r\n------------------\r\n\r\n* First release on PyPI.\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "pdfgpt is a Python package that provides users with the ability to engage in natural language conversations with their PDF documents.",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/Mariosmsk/pdfgpt"
    },
    "split_keywords": [
        "pdfgpt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e95cdee5b5f8019764ce8e33aa6957fc9d194762b38600d5ddea60d2dbf9101",
                "md5": "6004c263563e70970e64c97b0c529990",
                "sha256": "e6e28302261cc766b90e21dd2e5618f9ec7c1e7b5f412aa27120dab0eaa35fc5"
            },
            "downloads": -1,
            "filename": "pdfgpt-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6004c263563e70970e64c97b0c529990",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3272691,
            "upload_time": "2023-07-06T13:18:41",
            "upload_time_iso_8601": "2023-07-06T13:18:41.369732Z",
            "url": "https://files.pythonhosted.org/packages/4e/95/cdee5b5f8019764ce8e33aa6957fc9d194762b38600d5ddea60d2dbf9101/pdfgpt-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-06 13:18:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Mariosmsk",
    "github_project": "pdfgpt",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "pdfgpt"
}
        
Elapsed time: 0.11510s