Python ChatGPT exception hook powered by ChatGPT
BSD-3-CLAUSE License
Python global error handler powered by ChatGPT to enhance errors resolutions.
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.
Install using pip
:
pip install pychaterr
This module requires a OpenAI API Key:
export OPENAPI_API_KEY=sk-...
Then import the module in your code with:
import pychaterr
Define PYCHATERR_DISABLED=yes
environment var to disable this library.
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
See LICENSE file for details.