Generate and debug Python code- with some help from AI
For all sort of information, have a look at the official website.
We update our latest, most stable and best build on PyPI regularly. You can fetch the latest one simply by doing:
pip install epsilon-code
Note: Usage of Epsilon-Code needs an OpenAI API Key in all cases. Get yours here.
To use our Python module "epcode", follow the following process:
You need to use the function "getcode". Here's how to do it:
from epsilon_code import epcode
epcode.getcode("Your OpenAI API Key goes here (with the quotes)", "A brief description of what you want your code to do (specify any specific methods/libraries/APIs you want the code to use)")
The generated code will be saved as a .py
file in the current working directory. If you run the function multiple times, that file will be appended with all the code.
You need to use the function "getdebug". Here's how to do it:
from epsilon_code import epcode
epcode.getdebug("Your OpenAI API Key goes here (with the quotes)", "Final line of the traceback with the exact error message.")
The generated debugging instructions will be saved as a .txt file in the current working directory. If you run the function multiple times, that file will be appended with all the text.
After installation is complete, you can also use our conversational command line UI to do the same. Activate it simply by doing:
epsilon.sh
The main bash file that redirects you to the appropriate .py
files upon selection in the command line UI.
Takes conversational input (code-description) in a chat form and sends it via an API call to the OpenAI API (GPT-3) along with the priming data that is hackable. Receives the completion, formats it and prints it in the command line itself.
Takes conversational input (error message/Traceback) in a chat form and sends it via an API call to the OpenAI API (GPT-3) along with the priming data that is hackable. Receives the completion, formats it and prints it in the command line itself.
The main Python module that contains the getcode()
& getdebug()
functions.
They are basically wrappers of the previous two files code-gen.py
and debug.py
respectively described in a callable function format.