Skip to content

About

Ask an AI to explain Python error messages

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

This package ask_openai provides a single minimal implementation of a function decorator ask.

If the decorated function raises an error, the decorator asks OpenAI / GPT-3 to explain it to you.

Use as follows:

import os
from ask_openai import ask

ask = ask(api_key=os.environ['OPENAI_API_KEY'], logger=print)


@ask
def f(x):
    return 1 / 0

This will print something like:

OpenAI explanation: Division by zero is an error because a number cannot be divided by 0.

About

Ask an AI to explain Python error messages

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages