GPT Developer Tools
A CLI utility based on OpenAI's ChatGPT that helps developers in:
- Debugging
- Explaning/Documenting an undocumented script
- Creating new scripts based on prompt
Installation
Prerequisites
python3andpython3-pippackages should be installed.- OpenAI API Key. You can generate one by visiting beta.openai.com
Local Installation
- Install
gpt-developer-toolsPyPI package usingpip.
python3 -m pip install gpt-developer-tools
- Export
OPENAI_API_KEYenvironment variable.
export OPENAI_API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
- Run
gdtcommand with arguments and options.
gdt explain --path ./gpt_developer_tools.py
Usage
- To debug a script with
gdt
gdt debug --path ./setup.py
- To debug first 7 lines of a script
gdt debug --path ./setup.py --line-end 7
- To debug specific lines of a script
gdt debug --path ./setup.py --line-start 7 --line-end 17
- To debug a script with a different prompt
gdt debug --path ./setup.py --line-start 7 --line-end 17 --prompt-message "Debug this script"
- To fetch an explanation/documentation for a script
gdt explain --path ./setup.py --line-start 7 --line-end 17 --prompt-message "Explain this script to me line by line"
- To create and save a script
gdt create -pm "Write a merge sort program in Java" -w --path ./sorting.java
Sample Output
Input Script: ./gpt_developer_tools.py
ChatGPT's Response:
if __name__ == '__main__':
cli()
This script is used to debug or explain a script using ChatGPT. The script uses the click library
to create a command line interface and import the requester and utils modules from the src package.
The cli() function is used to create the command line group. The debug() and explain() functions are
used to debug or explain a script respectively. Both functions take in the path to the script, the
starting and ending line of the script, the model engine, max tokens, number of outputs, temperature
and prompt message to be used by ChatGPT. The open_ai_api_key is retrieved from the environment
variable OPENAI_API_KEY and is used to send the request to ChatGPT. Finally, the cli() function is
called to execute the command line interface.
Development and Testing
- Create virtual environment.
python3 -m virtualenv venv
- Activate virtual environment.
source venv/bin/activate
- Install CLI utility
gdt
python3 -m pip install --editable .
- Add your OpenAI API key as environment variable. You can generate one from beta.openai.com if you already have an OpenAI account.
export OPENAI_API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
- Run
gdtutility with target script passed as path
gdt explain --path ./gpt_developer_tools.py
Follow OpenAI's API Documentation for details related to models and predictions.
Metadata
Release files for gpt-developer-tools 0.0.1
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 |
|---|---|---|---|---|
| gpt-developer-tools-0.0.1.tar.gz | 4.9 kB | Without provenance | Details for gpt-developer-tools-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gpt_developer_tools-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for gpt_developer_tools-0.0.1-py3-none-any.whl |
Total release size: 10.9 kB
Release files / gpt-developer-tools-0.0.1.tar.gz
| Download URL | gpt-developer-tools-0.0.1.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9313bd6400abc3e6d7219082d5733b534ac4a1ff4eb0f5d4a0347e0b3969ac0
|
|
BLAKE2b-256 checksum How to use checksums |
1a1499f3d0f1541251744caffa1ca4bf3738d381cfab1ecad4fae27d65bf1e06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Release files / gpt_developer_tools-0.0.1-py3-none-any.whl
| Download URL | gpt_developer_tools-0.0.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eef7f8599a2ee7db02b6bf0f921517b8d912072ebbdcc9dc715e192227f751f8
|
|
BLAKE2b-256 checksum How to use checksums |
8494e6e36470161bb3da71cd12a461d328d7260d729eea71a8e5fa0907cd153b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Security for gpt-developer-tools 0.0.1
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.