Metadata-Version: 2.1
Name: PyChatErr
Version: 0.0.1
Summary: Python generic error handler powered by ChatGPT
Project-URL: Homepage, https://github.com/omab/pychaterr
Project-URL: Bug Tracker, https://github.com/omab/pychaterr/issues
Author-email: Matías Aguirre <matiasaguirre@gmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Requires-Dist: openai
Description-Content-Type: text/markdown

# 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`:

```shell
pip install pychaterr
```

# Usage

This module requires a OpenAI API Key:

1. Generate a key at https://platform.openai.com/account/api-keys
2. Export it with:
   ```
   export OPENAPI_API_KEY=sk-...
   ```

Then import the module in your code with:

```python
import pychaterr
```

# Examples

The [examples/](examples/) folder contains examples showing this module behavior.

Run the samples with:

```shell
# Create and activate a virtual environment
pip install -e .
python examples/zerodivision.py
```

# License

See [LICENSE](LICENSE) file for details.