A Python package to handle exceptions and suggest resolutions using OpenAI
Project description
TryExceptAI
A Python package to handle exceptions and suggest resolutions using OpenAI.
Installation
Install the package using Poetry:
poetry add try-except-ai
Usage
Add export OPENAI_API_KEY={your openai api key here} to your .zshrc or .bash_profile file.
Then test it with the following
from try_except_ai import TryExceptAI
def test_function():
try:
# Code that might raise an exception
result = 1 / 0
print(result)
except Exception as e:
TryExceptAI().handle_exception(e)
if __name__ == "__main__":
test_function()
License
This project is licensed under the MIT License. See the 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 try-except-ai-0.1.1.tar.gz.
File metadata
- Download URL: try-except-ai-0.1.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5db95268fbed5d128f41108bed3ebb9e79cbc23bee7c5734b1298e90f73aa536
|
|
| MD5 |
2abf703ad2f0a32b17644d7cea8b7e42
|
|
| BLAKE2b-256 |
266a5b4b8c4b4ab0f5939f1eab9ae84de8b69e4b9e1cf24e0c921d43326bb4cc
|
File details
Details for the file try_except_ai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: try_except_ai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61305b0e129121067a6aa15a3cb7c6059ab0984666af8593ef46458e6bbfa51f
|
|
| MD5 |
841fb1813671274479673517292497eb
|
|
| BLAKE2b-256 |
74d0072601c5b209dee5408232aead9e5da4afeabb048b1e8ae88af580903055
|