Skip to main content

buge is a command-line application that uses the OpenAI API to diagnose bugs when programming.

Project description

buge

Think BUG-E, except I pronounce it 'booj'

Table of Contents

Description

buge is a command-line application that helps developers understand and troubleshoot common error messages by generating explanations and solutions using the OpenAI GPT-3 language model. Here's buge in action:

BUGE Demo

Instructions

  1. Install buge by entering pip3 install buge in your terminal.
  2. Call buge from anywhere in your terminal by entering buge.
  3. If it's your first time calling buge, you will be prompted for you OpenAI API key. You'll only need to do this once.
  4. You'll then be prompted for your error code. Paste you error code into your terminal and hit 'enter'.
  5. buge makes an API call and then returns the the meaning of the error code, possible causes, and possible solutions.

This program is free to use. However, if you would like to buy me a coffee, you can do so here:

Buy me a cofee button

Dependencies

  • OpenAI: A cloud-based platform that allows users to build various artificial intelligence models, including natural language processing models that can generate text.
  • python-dotenv: Python-dotenv reads key-value pairs from a .env file and can set them as environment variables. It helps in the development of applications following the 12-factor principles.
  • rich package: Rich is a Python library for rich text and beautiful formatting in the terminal.

How buge Works

  1. Upon running the program, buge first checks your OpenAI API key in your .env file. If this file does not exist, buge prompts the user for their key, creates the file, and writes the key to the file. The .env file is then saved in the package folder.
  2. buge then prompts the user for their error code.
  3. buge takes the user's error code and passes it to the get_error_explanation() function as a parameter. This function makes three API calls based on the user's error code. It asks text-davinci-003 for the meaning of the error code, possible causes for the error code, and possible solutions. It then prints the results to the user's console. I chose to use three seperate API calls as opposed to asking for everything at once to ensure that everything being asked for would be given its proper due by GPT-3. Bunching everything together in one prompt would have caused mixed results for users.

Contributing

Contributions to BUGE are welcome! If you encounter any issues, have suggestions for improvements, or want to add new features, feel free to submit a pull request or open an issue in the GitHub repository.

License

Copyright (c) 2018 The Python Packaging Authority

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Disclaimer

Please note that BUGE is a tool that generates explanations and solutions based on a language model, and its suggestions should be used as a starting point for troubleshooting, not as definitive solutions. It's always recommended to thoroughly understand the error messages and the underlying code before making changes. BUGE is not responsible for any unintended consequences that may arise from using its generated explanations and solutions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buge-0.0.5.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buge-0.0.5-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file buge-0.0.5.tar.gz.

File metadata

  • Download URL: buge-0.0.5.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for buge-0.0.5.tar.gz
Algorithm Hash digest
SHA256 56eb35e89deeba8a464c14497b30ea599e21f3d398c7dc2ccb31d6638f755584
MD5 b45bfc6a22769f1ba8b3cf18ec923074
BLAKE2b-256 264751a267a2666be683976747b441b34e3615d27afd589bc59fa4f52f659111

See more details on using hashes here.

File details

Details for the file buge-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: buge-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for buge-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9f98a72cc6104d156485f59e59f3e41de65eb03c045b25d508368b14f9c953ee
MD5 8e3b1e78f4b3bbd5cbf3bcf6427df98e
BLAKE2b-256 6dd1b50d6060ed171855286db261504ff373c866d516c738c231512cd1dc806e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page