AI code completion
Project description
Pretzel AI is an Jupyter extention for context-aware AI codegen in Jupyter.
Quick start
Installation
In the same virtual environment where Jupyter is installed, run:
pip install pretzelai
Reload Jupyter to enable the extension.
Next, you need to set up the OpenAI API key. Go to Settings > Settings Editor (or press Command + ,)
Then, search for Pretzel AI in the top left search bar, select OpenAI API key
as the AI Service and set the API key.
Usage
In any cell, press Command + K
to prompt with GPT4. This opens a prompt window.
In the prompt window, type your instruction. Note that:
- you can refer to existing variables and dataframes with the
@variable
syntax (for example, if you have a dataframedf
, you can refer to it with@df
) - The AI has access to all code in your current notebook as well so you can refer to other parts of the code as well
Press Enter
or the Submit Button to get the answer. Press Command + K
again to hide the prompt window.
You can look at the AI response as a diff (if there was some code already in the cell).
You can accept this by clicking the Accept button in the prompt window. This will update the cell with the new code and run the new code!
Choosing your AI Server
You have three options for AI Servers:
- OpenAI API Key: This is the default, just set your OpenAI API key in the Settings Editor. We also allow setting a cutom URL in case your company has a local GPT-4 deployment.
- Azure AI Server: If your company is running OpenAI models on Azure, you can set the Azure URL, project name and your API key here.
- Pretzel AI Server: This is a wrapper of GPT-4 that we're running. It's free to use and the easiest way to get started. (AI responses aren't streamed with this server right now)
You can set the AI Service in the Settings Editor.
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
Hashes for pretzelai-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55fac21c63f8b1ae909c0de3d8b7289773b6328bd8f05b861a5ac6c79a13999c |
|
MD5 | 22a7122d7b3a825d3c0c269799345ed9 |
|
BLAKE2b-256 | 921f3c928f24186534f62e648a76e3ecfac08aa0930d7ab4335fcc70afe2d309 |