Python generic error handler powered by ChatGPT
Project description
PyChatErr
Python global error handler powered by ChatGPT to enhance errors resolutions.
Description
PyChatErr installs a global exception handler that will send the cached exception and related code to ChatGPT completion engine asking it to explain the issue and propose solutions.
Installation
Install using pip:
pip install pychaterr
Usage
This module requires a OpenAI API Key:
- Generate a key at https://platform.openai.com/account/api-keys
- Export it with:
export OPENAPI_API_KEY=sk-...
Then import the module in your code with:
import pychaterr
Demo
Examples
The examples/ folder contains examples showing this module behavior.
Run the samples with:
# Create and activate a virtual environment
pip install -e .
python examples/zerodivision.py
License
See LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pychaterr-0.1.0.tar.gz.
File metadata
- Download URL: pychaterr-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c32fc3a80f95a470a670bc6576d86bd2c266e63d839324444d0ad784ebb614a3
|
|
| MD5 |
24639d9ec465d2af46b8320763be1598
|
|
| BLAKE2b-256 |
001f205a64510e5cb16bdfd1650832c4f0d475ead053b13c230920bb1ee44da0
|
File details
Details for the file pychaterr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pychaterr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd5fb47d04969ef63a39027033ffb10120503998f9ff0d2759ab4fae0af24e3f
|
|
| MD5 |
0a89a3a311ec150514047f2810364540
|
|
| BLAKE2b-256 |
e78ba985194b86c9c2b4cce9d66d78bdd31d6a5204aaf4fdc98449e00a375f31
|