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
try-except-ai-0.1.1.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for try_except_ai-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61305b0e129121067a6aa15a3cb7c6059ab0984666af8593ef46458e6bbfa51f |
|
MD5 | 841fb1813671274479673517292497eb |
|
BLAKE2b-256 | 74d0072601c5b209dee5408232aead9e5da4afeabb048b1e8ae88af580903055 |