The modern replacement for Jupyter Notebooks
Modern, open-source Jupyter alternative.
Try it here »
Discord
·
Website
·
Issues
·
Contact
https://github.com/pretzelai/pretzelai/assets/121360087/ff4643b1-c931-410e-aa0b-9233e0766223
Pretzel is a fork of Jupyter with the goal to improve Jupyter's capabilities. We've added AI code generation and editing, inline tab completion, sidebar chat and error fixing to Jupyter for now with a lot more to come.
Switching to Pretzel from Jupyter is extremely easy since it's simply an improved version of Jupyter. All of your Jupyter config, settings, keybindings, and extensions will work out of the box.
pip install pretzelai then run pretzel lab to open the web interface. OR, use our free hosted version: pretzelai.app@ to trigger auto-complete with function and variable names.Our roadmap includes building features such as:
Install Pretzel with pip
pip install pretzelaiFor conda, install pip first with conda install pip and then pip install pretzelai.
Then, start Pretzel with:
pretzel labYou'll be able to access the Pretzel interface via the provided URL.
To use your own AI model, see the Configuration section.
If you're having trouble installing Pretzel (for eg on Windows), you can run it in a Docker container.
FROM python:3.9-slim
RUN apt-get update && apt-get install -y \
build-essential \
gcc \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /root/pretzel
RUN pip install pretzelai
EXPOSE 8888
CMD ["pretzel", "lab", "--ip=0.0.0.0", "--allow-root", "--notebook-dir=/root/pretzel", "--ServerApp.allow_remote_access=True", "--ServerApp.token=''", "--no-browser"]In the same folder where you have your Dockerfile, run docker build -t pretzel .
To run pretzel, you can run: docker run --name pretzel -p 8888:8888 pretzel and once the container is running, you can access it at http://localhost:8888/lab. To stop the container, press Ctrl + C followed by docker stop pretzel.
If you want to access your local folder in Pretzel, you can run: docker run --rm -p 8888:8888 -v $(pwd):/root/pretzel pretzel - this will map your current directory to the docker container's /root/pretzel folder. Make sure Docker has access to your current directory.
To update Pretzel to the latest version, just rebuild the Docker image with the --no-cache flag: docker build --no-cache -t pretzel . and now you can run docker like step 3.
You can use this Dockerfile to build and run the bleeding edge version. Follow the steps (starting at step 2) in the section Running within a docker container
If you get an error during installation that looks like this:
Failed to build installable wheels for some pyproject.toml based projects (pystemmer)That means the installation failed to install the dependency PyStemmer. This usually happens because you don't have the right build tools installed. To fix this:
sudo apt-get update && sudo apt-get install build-essential python3-devbrew install gcc. If this doesn't work, you may also need to run xcode-select --installOnce this is done, you should be able to pip install pretzelai to install Pretzel.
The default Pretzel AI Server uses Mistral's Codestral but you can switch the inline completion model in Pretzel AI Settings. See the configuration section.
Cmd+K (Mac) / Ctrl+K (Windows/Linux) or click "Ask AI" to open AI prompt textbox and write your code generation/editing instruction@ to get a dropdown of available variables in your session. Adding this @vairable to the prompt will send its value to the AICtrl+Cmd+B (Mac) / Ctrl+Alt+B (Linux/Windows) or the Pretzel Icon on the right sidebar to activate the AI Sidebar@ syntax to refer to variables and dataframes in memory, similar to the notebook cellsExample uses of AI Sidebar:
my_function to be more efficient" ← this will find the function my_function in the whole notebook and modify itsales_data dataframeinject or ij (case-insensitive) - this tells the AI to only add new code and not edit the existing code in the cellPretzel works out-of-the-box, no configuration needed. We DO NOT store any code or data you send to the Pretzel AI Server.
Still, if you want to use a different AI model, you can configure Pretzel to use AI models from multiple different vendors, including local models. In this case, the AI request goes directly from your computer to the AI service (OpenAI, Anthropic etc).
Settings menu in the top menubar, then click Pretzel AI SettingsUnder the section Configure AI Services, you can
Remember to save your settings after making changes. Pretzel will validate your configuration to ensure everything is set up correctly.
Please note: We haven't tested Azure Enterprise OpenAI models yet. If you find any bugs, please report them in GitHub issues and we'll fix them ASAP.
The original Jupyter documentation is available here and the Jupyterlab README is available here.
We collect no personal information. We use basic telemetry for only the AI features we've built - for example, when you click on "Ask AI", we receive an event that someone clicked on "Ask AI". We only associate an anonymous ID to your user. If you allow cookies, that helps us tell that it's the same user across multiple browser sessions (which is very helpful!). If you don't allow cookies, every time you open a browser, you're a new anonymous user to us.
We also collect prompts (but not the responses) for the AI features we've built. This can be turned off in the settings (Settings > Pretzel AI > Uncheck Prompt Telemetry) but we'd really appreciate if you didn't - this is very helpful in improving our prompts.
We do not collect any code whatsoever. Even when you use Pretzel's cloud AI server for completions, we don't store any of this code.
If you use the hosted version of Pretzel (https://pretzelai.app), we create a user for you based on your email address. You can always simply log-in and delete any data you may have stored on our hosted server. We make no backups or copies of your data.
Our hosted server is free to use. However, we will delete your data and your account 30 days after your last login. If you'd like to delete your account sooner, please email us at [email protected] with the subject line "Account Deletion" and we'll delete your account immediately.
Q. _What happened to the old version of Pretzel AI - the vis
No open issues yet, or sync has not completed.