pdfgpt
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
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.
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.
History
0.1.0 (2023-05-11)
First release on PyPI.
Metadata
Release files for pdfgpt 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdfgpt-0.2.2.tar.gz | 3.3 MB | Without provenance | Details for pdfgpt-0.2.2.tar.gz |
Release files / pdfgpt-0.2.2.tar.gz
| Download URL | pdfgpt-0.2.2.tar.gz |
|---|---|
| Size | 3.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6e28302261cc766b90e21dd2e5618f9ec7c1e7b5f412aa27120dab0eaa35fc5
|
|
BLAKE2b-256 checksum How to use checksums |
4e95cdee5b5f8019764ce8e33aa6957fc9d194762b38600d5ddea60d2dbf9101
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.8.2 requests/2.28.2 setuptools/61.2.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.9.5
|
Security for pdfgpt 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.