pretzelai


Namepretzelai JSON
Version 4.2.11 PyPI version JSON
download
home_pageNone
SummaryPretzel is a fork of JupyterLab that improves the user experience of the JupyterLab computational environment.
upload_time2024-08-29 12:39:41
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licensePretzel is a fork of Project Jupyter, which is licensed under the terms of the Modified BSD License. The original code of this project, contributed by the Project Jupyter Contributors and other parties, remains under the original license. The original LICENSE text is as follows: ============================================================================== Copyright (c) 2015-2022 Project Jupyter Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Semver File License =================== The semver.py file is from https://github.com/podhmo/python-semver which is licensed under the "MIT" license. See the semver.py file for details. ============================================================================== All modifications and additions to the Jupyter codebase made by Pretzel contributors listed in the PRETZEL_CONTRIBUTORS file (found at the root of the project) are licensed under the terms of the GNU Affero General Public License v3.0. These terms can be found in the LICENSE_AGPLv3 file at the root of the project. Copyright for all new code contributions by Pretzel AI GmbH and listed contributors is held by Pretzel AI GmbH. Each new file created by Pretzel AI GmbH or its contributors is identified with a header stating the copyright and licensing under AGPLv3. ============================================================================== The contents of the folder pretzelai_visual represent an older tool, which is no longer actively developed. All files in this folder are licensed under the terms of the Apache License, Version 2.0. These terms can be found in the LICENSE file in the pretzelai_visual folder.
keywords ipython jupyter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <h3 align="center">Pretzel ๐Ÿฅจ</h3>

  <p align="center">
    Modern, open-source Jupyter alternative.
    <br />
    <a href="https://pretzelai.app" target="_blank"><strong>Try it here ยป</strong></a>
    <br />
    <br />
    <a href="https://discord.gg/bYNEgbPzRy" target="_blank">Discord</a>
    ยท
    <a href="https://withpretzel.com" target="_blank">Website</a>
    ยท
    <a href="https://github.com/pretzelai/pretzelai/issues">Issues</a>
    ยท
    <a href="mailto:founders@withpretzel.com" target="_blank">Contact</a>
  </p>
</p>

<p align="center">
   <a href="https://github.com/pretzelai/pretzelai/stargazers" target="_blank"><img src="https://img.shields.io/github/stars/pretzelai/pretzelai" alt="Github Stars"></a>
   <a href="https://pypi.org/project/pretzelai/" target="_blank"><img src="https://img.shields.io/pypi/v/pretzelai.svg?style=flat-square&label=PyPI+PretzelAI" alt="Issues"></a>
   <a href="https://discord.gg/bYNEgbPzRy" target="_blank"><img src="https://img.shields.io/badge/Discord-PretzelAI-blue?logo=discord" alt="Join Pretzel on Discord"></a>
   <a href="https://github.com/pretzelai/pretzelai/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPLv3-purple" alt="License"></a>
   <a href="https://github.com/pretzelai/pretzelai/pulse"><img src="https://img.shields.io/github/commit-activity/m/pretzelai/pretzelai" alt="Commits-per-month"></a>
</p>

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.

## Quick Start

- Installation: `pip install pretzelai` then run `pretzel lab` to open the web interface. OR, use our **free hosted version**: [pretzelai.app](https://pretzelai.app)
  - See [this](#installation-problems) if you get errors during installation
- Simply start typing in a cell to get inline tab completions
- In any Jupyter cell, click โ€œ**Ask AI**โ€ or press Cmd+K (Mac) / Ctrl+K (Linux/Windows) to prompt AI
- Use the **AI Sidebar** with Ctrl+Cmd+B (Mac) or Ctrl+Alt+B (Linux/Windows) to chat with AI, generate code, and ask questions.
- Type `@` to trigger auto-complete with function and variable names.
- To use your own model (OpenAI, Anthropic/Claude, Ollama or Groq), see the [Configuration](#configuration) section

![](assets/main.png)

---

Our roadmap includes building features such as:

- Native AI code generation and understanding features similar to [Cursor](https://cursor.sh/)
- Frictionless realtime collaboration: pair-programming, comments, version history, etc.
- SQL support (both in code cells and as a standalone SQL IDE)
- Visual analysis builder (see more [here](https://github.com/pretzelai/pretzelai/tree/main/pretzelai_visual#readme))
- VSCode like code-writing experience using [Monaco](https://github.com/microsoft/monaco-editor)
- 1-click dashboard creation and sharing from Jupyter notebooks

## Installation

### Using pip

Install Pretzel with pip

```
pip install pretzelai
```

For conda, install pip first with `conda install pip` and then `pip install pretzelai`.

Then, start Pretzel with:

```
pretzel lab
```

You'll be able to access the Pretzel interface via the provided URL.

To use your own AI model, see the [Configuration](#configuration) section.

### Running within a docker container

If you're having trouble installing Pretzel (for eg on Windows), you can run it in a Docker container.

1. Create a Dockerfile:

```dockerfile
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"]
```

2. In the same folder where you have your Dockerfile, run `docker build -t pretzel .`

3. 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.

### Bleeding Edge Version

You can use this [Dockerfile](https://github.com/pretzelai/pretzelai/blob/main/Dockerfile) to build and run the bleeding edge version. Follow the steps (starting at step 2) in the section [Running within a docker container](#running-within-a-docker-container)

### Installation problems

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:

- **On Windows**: Install Miscrosoft build tools from [here](https://visualstudio.microsoft.com/visual-cpp-build-tools/). Click on the _Download Build Tools_ button and then install it.
- **On Ubuntu (and Debian flavoured systems)**: Install the required build tools by running the following command in your terminal:
  ```
  sudo apt-get update && sudo apt-get install build-essential python3-dev
  ```
- **On macOS**: `brew install gcc`. If this doesn't work, you may also need to run `xcode-select --install`

Once this is done, you should be able to `pip install pretzelai` to install Pretzel.

## Usage

#### Inline Tab Completion

- Start typing in a cell to get inline tab completions
- Wait for 1 second to trigger completions. You'll see a little spinner just before the blue Ask AI button in the cell

The default Pretzel AI Server uses [Mistral's Codestral](https://mistral.ai/news/codestral/) but you can switch the inline completion model in Pretzel AI Settings. See the [configuration](#configuration) section.

#### Generating and editing code in notebook cells

- In a cell, press **`Cmd+K` (Mac) / `Ctrl+K` (Windows/Linux)** or **click "Ask AI"** to open AI prompt textbox and write your code generation/editing instruction
  - Type `@` to get a dropdown of available variables in your session. Adding this `@vairable` to the prompt will send its value to the AI
  - We automatically send relevant code in the current notebook as context to the AI
- If there's existing code in a cell, the prompt will edit the existing code
  - If you select/highlight some code in the cell, only the selected code will be edited
- You can accept/reject the response or edit your prompt if you want to re-submit with modifications
- Use โ†‘ / โ†“ to cycle through prompt history

#### Using the AI Sidebar

- Use **`Ctrl+Cmd+B` (Mac) / `Ctrl+Alt+B` (Linux/Windows)** or the [Pretzel Icon on the right sidebar](assets/pretzel-icon-finder.png) to activate the AI Sidebar
- You can ask questions, generate code, or search for existing code
- The AI always **uses the code in the active cell as context**. If you highlight some code in the active cell, only the highlighted code will be used as context
- We automatically send relevant code in the current notebook as context to the AI
- You can also use the `@` syntax to refer to variables and dataframes in memory, similar to the notebook cells

_Example uses of AI Sidebar_:

- "Modify the function `my_function` to be more efficient" โ† _this will find the function `my_function` in the whole notebook and modify it_
- "Where is the code that removes outliers"? โ† _this will search the notebook for code that removes outliers and show it to you_
- _(While cursor is in a cell with some code)_ "Can you explain what this code does?" โ† _this will explain the code **in the current cell**_
- "Plot a histogram of @df for age" โ† _this will generate code to plot a histogram of the 'age' column from the dataframe named 'df'_
- "Calculate the mean revenue in @sales*data for each product type" โ† \_this will generate code to calculate mean revenue by product type using the `sales_data` dataframe*

#### Adding code in the middle of existing code

- Put your cursor either on an empty line or an existing line of code. Bring up the AI prompting text box with Cmd+K
- Start your prompt with the word `inject` or `ij` (case-insensitive) - this tells the AI to only add new code and not edit the existing code in the cell
- **Code will be added one line below** where your cursor was placed

#### Fix errors with AI

- When there's an error, you'll see a button on top-right "**Fix Error with AI**". Click it try fixing the error

## Configuration

**Pretzel 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).

- Open the `Settings` menu in the top menubar, then click `Pretzel AI Settings`
- Under **AI Settings** you can pick which AI models to use for chat and for inline completion (see screenshot below)
  - We recommend using GPT-4 class models (e.g., GPT-4 Turbo, GPT-4o, Claude-3.5 Sonnet, Claude-3 Opus and Llama-3.1 405B) for the best performance

Under the section **Configure AI Services**, you can

- Enable or disable certain AI services (for eg, Azure and Ollama are disabled by default but can be enabled)
- Enter your API key or URL as needed for each service

Remember to save your settings after making changes. Pretzel will validate your configuration to ensure everything is set up correctly.

![help image here](assets/pretzel-settings.png)

Please note: We haven't tested _Azure Enterprise OpenAI_ models yet. If you find any bugs, please report them in [GitHub issues](https://github.com/pretzelai/pretzelai/issues) and we'll fix them ASAP.

## Feedback, bugs and docs

- Please report bugs here: https://github.com/pretzelai/pretzelai/issues
- Have any feedback? Any complains? We'd love feedback: founders@withpretzel.com

## Jupyter specific information

The original Jupyter documentation is available [here](https://jupyter.org/) and
the Jupyterlab README is available [here](https://github.com/jupyterlab/jupyterlab).

## Privacy Policy, Data Collection and Retention

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 founders@withpretzel.com with the subject line "Account Deletion" and we'll delete your account immediately.

## FAQ

**Q.** _What happened to the old version of Pretzel AI - the visual, in-browser data manipulation tool?_

**A.** It's available in the [`pretzelai_visual` folder here](https://github.com/pretzelai/pretzelai/tree/main/pretzelai_visual). Please see [this PR](https://github.com/pretzelai/pretzelai/pull/76) for more info.

**Q.** _What AI model does Pretzel use?_

**A.** Pretzel uses different AI models for various tasks:

1. Default model: GPT-4o

   - Offers a good balance between speed and quality
   - Can be changed in Pretzel Settings if you're using your own API key

2. Inline completions: [Mistral's Codestral model](https://mistral.ai/news/codestral/)

   - Excellent for code completion
   - Very fast performance (22B parameter model)

3. Fallback option:
   - If you're using your own API key without providing a Mistral API Key, Pretzel will use GPT-4o for inline completions as well

We're continuing to experiment with models and supporting local models and Anthropic's Claude is at the top of our list.

**Q.** _What about feature X?_

**A.** There's a ton we want to build. Please [open an issue](https://github.com/pretzelai/pretzelai/issues) and tell us what you want us to build!

**Q.** _Where's the roadmap?_

**A.** We have a rough roadmap at the top of this README. There are many features we'd like to build, but there's just two of us. So, we're collecting feedback about what would be most helpful. Please open an issue or just email us with your feedback! Based on what we find, we'll prioritize our roadmap.

**Q.** _Why are you using the AGPL license? Or, why not use MIT/BSD3 licenses?_

**A.** Our goal with building Pretzel is to make an amazing data tool that is free for both individuals and companies to use. That said, we are a two-person startup - and we don't want some third party to just take our code and sell a hosted version of it without giving back to the community. Jupyter code is licensed as BSD-3 and if we keep our new code BSD-3 licensed, there would be no way to stop a third party from doing this. As a result, we went with the AGPLv3 license for all the new code. This ensures that if someone else does want to take our code and sell it (SaaS or otherwise), they have to open-source all of their modifications under AGPLv3 as well.

**Q.** _Why a fork of Jupyter? Why not contribute into Jupyter directly?_

**A.** This deserves a longer answer but here's the short answer: We've set out to make the **new** de-facto, modern, open-source data tool. Initially, we wanted to start from scratch. However, after talking to several data professionals, we realized it will be very hard to get people to switch to a new tool, no matter how good. The best way to get people to switch is to not have them switch at all. That's why we decided to fork Jupyter - for the near zero switching costs. Also, Jupyter is a mature product, and we're shipping feature really fast - frankly, at the pace we're shipping features, the code we write won't be accepted into the Jupyter codebase ๐Ÿ˜…. There are also many downsides to this decision - we've had to spend considerable time understanding the whole Jupyter ecosystem and multiple codebases, the complex release processes, the various APIs etc. However, we think this is the right decision for us.

**Q.** _My company is worried about using an AGPLv3 licensed tool. What can I do?_

**A.** The AGPL is a barrier ONLY IF you're modifying Pretzel AND redistributing it to the public. If you're simply using it as a tool in your company (even with modifications), the AGPL DOES NOT ask you to share your code. Still, if AGPL is an issue for you, please contact us, and we can figure out something that works.

**Q.** _How are you planning on making money? OR, how are you free? I'm worried that you'll make this tool paid in the future._

**A.** We're planning on selling a hosted version of the tool to companies to make money. This hosted version will probably have some company specific features that individuals don't want or need such as data access controls, connectors for data sources, integration with GitHub, hosted and shareable dashboard, scalable and on-demand compute for large data jobs etc. We will not retroactively make Pretzel's individual version paid.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pretzelai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ipython, jupyter",
    "author": null,
    "author_email": "Pretzel AI GmbH <founders@pretzel.ai>",
    "download_url": "https://files.pythonhosted.org/packages/ca/59/fe85381867d2ae09e3cf39ec98aed40d7205919204c996c05f85beffe721/pretzelai-4.2.11.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <h3 align=\"center\">Pretzel \ud83e\udd68</h3>\n\n  <p align=\"center\">\n    Modern, open-source Jupyter alternative.\n    <br />\n    <a href=\"https://pretzelai.app\" target=\"_blank\"><strong>Try it here \u00bb</strong></a>\n    <br />\n    <br />\n    <a href=\"https://discord.gg/bYNEgbPzRy\" target=\"_blank\">Discord</a>\n    \u00b7\n    <a href=\"https://withpretzel.com\" target=\"_blank\">Website</a>\n    \u00b7\n    <a href=\"https://github.com/pretzelai/pretzelai/issues\">Issues</a>\n    \u00b7\n    <a href=\"mailto:founders@withpretzel.com\" target=\"_blank\">Contact</a>\n  </p>\n</p>\n\n<p align=\"center\">\n   <a href=\"https://github.com/pretzelai/pretzelai/stargazers\" target=\"_blank\"><img src=\"https://img.shields.io/github/stars/pretzelai/pretzelai\" alt=\"Github Stars\"></a>\n   <a href=\"https://pypi.org/project/pretzelai/\" target=\"_blank\"><img src=\"https://img.shields.io/pypi/v/pretzelai.svg?style=flat-square&label=PyPI+PretzelAI\" alt=\"Issues\"></a>\n   <a href=\"https://discord.gg/bYNEgbPzRy\" target=\"_blank\"><img src=\"https://img.shields.io/badge/Discord-PretzelAI-blue?logo=discord\" alt=\"Join Pretzel on Discord\"></a>\n   <a href=\"https://github.com/pretzelai/pretzelai/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/license-AGPLv3-purple\" alt=\"License\"></a>\n   <a href=\"https://github.com/pretzelai/pretzelai/pulse\"><img src=\"https://img.shields.io/github/commit-activity/m/pretzelai/pretzelai\" alt=\"Commits-per-month\"></a>\n</p>\n\nhttps://github.com/pretzelai/pretzelai/assets/121360087/ff4643b1-c931-410e-aa0b-9233e0766223\n\nPretzel 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.\n\nSwitching 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.\n\n## Quick Start\n\n- Installation: `pip install pretzelai` then run `pretzel lab` to open the web interface. OR, use our **free hosted version**: [pretzelai.app](https://pretzelai.app)\n  - See [this](#installation-problems) if you get errors during installation\n- Simply start typing in a cell to get inline tab completions\n- In any Jupyter cell, click \u201c**Ask AI**\u201d or press Cmd+K (Mac) / Ctrl+K (Linux/Windows) to prompt AI\n- Use the **AI Sidebar** with Ctrl+Cmd+B (Mac) or Ctrl+Alt+B (Linux/Windows) to chat with AI, generate code, and ask questions.\n- Type `@` to trigger auto-complete with function and variable names.\n- To use your own model (OpenAI, Anthropic/Claude, Ollama or Groq), see the [Configuration](#configuration) section\n\n![](assets/main.png)\n\n---\n\nOur roadmap includes building features such as:\n\n- Native AI code generation and understanding features similar to [Cursor](https://cursor.sh/)\n- Frictionless realtime collaboration: pair-programming, comments, version history, etc.\n- SQL support (both in code cells and as a standalone SQL IDE)\n- Visual analysis builder (see more [here](https://github.com/pretzelai/pretzelai/tree/main/pretzelai_visual#readme))\n- VSCode like code-writing experience using [Monaco](https://github.com/microsoft/monaco-editor)\n- 1-click dashboard creation and sharing from Jupyter notebooks\n\n## Installation\n\n### Using pip\n\nInstall Pretzel with pip\n\n```\npip install pretzelai\n```\n\nFor conda, install pip first with `conda install pip` and then `pip install pretzelai`.\n\nThen, start Pretzel with:\n\n```\npretzel lab\n```\n\nYou'll be able to access the Pretzel interface via the provided URL.\n\nTo use your own AI model, see the [Configuration](#configuration) section.\n\n### Running within a docker container\n\nIf you're having trouble installing Pretzel (for eg on Windows), you can run it in a Docker container.\n\n1. Create a Dockerfile:\n\n```dockerfile\nFROM python:3.9-slim\nRUN apt-get update && apt-get install -y \\\n    build-essential \\\n    gcc \\\n    && rm -rf /var/lib/apt/lists/*\nWORKDIR /root/pretzel\nRUN pip install pretzelai\nEXPOSE 8888\nCMD [\"pretzel\", \"lab\", \"--ip=0.0.0.0\", \"--allow-root\", \"--notebook-dir=/root/pretzel\", \"--ServerApp.allow_remote_access=True\", \"--ServerApp.token=''\", \"--no-browser\"]\n```\n\n2. In the same folder where you have your Dockerfile, run `docker build -t pretzel .`\n\n3. 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`.\n\nIf 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.\n\nTo 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.\n\n### Bleeding Edge Version\n\nYou can use this [Dockerfile](https://github.com/pretzelai/pretzelai/blob/main/Dockerfile) to build and run the bleeding edge version. Follow the steps (starting at step 2) in the section [Running within a docker container](#running-within-a-docker-container)\n\n### Installation problems\n\nIf you get an error during installation that looks like this:\n\n```\nFailed to build installable wheels for some pyproject.toml based projects (pystemmer)\n```\n\nThat 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:\n\n- **On Windows**: Install Miscrosoft build tools from [here](https://visualstudio.microsoft.com/visual-cpp-build-tools/). Click on the _Download Build Tools_ button and then install it.\n- **On Ubuntu (and Debian flavoured systems)**: Install the required build tools by running the following command in your terminal:\n  ```\n  sudo apt-get update && sudo apt-get install build-essential python3-dev\n  ```\n- **On macOS**: `brew install gcc`. If this doesn't work, you may also need to run `xcode-select --install`\n\nOnce this is done, you should be able to `pip install pretzelai` to install Pretzel.\n\n## Usage\n\n#### Inline Tab Completion\n\n- Start typing in a cell to get inline tab completions\n- Wait for 1 second to trigger completions. You'll see a little spinner just before the blue Ask AI button in the cell\n\nThe default Pretzel AI Server uses [Mistral's Codestral](https://mistral.ai/news/codestral/) but you can switch the inline completion model in Pretzel AI Settings. See the [configuration](#configuration) section.\n\n#### Generating and editing code in notebook cells\n\n- In a cell, press **`Cmd+K` (Mac) / `Ctrl+K` (Windows/Linux)** or **click \"Ask AI\"** to open AI prompt textbox and write your code generation/editing instruction\n  - Type `@` to get a dropdown of available variables in your session. Adding this `@vairable` to the prompt will send its value to the AI\n  - We automatically send relevant code in the current notebook as context to the AI\n- If there's existing code in a cell, the prompt will edit the existing code\n  - If you select/highlight some code in the cell, only the selected code will be edited\n- You can accept/reject the response or edit your prompt if you want to re-submit with modifications\n- Use \u2191 / \u2193 to cycle through prompt history\n\n#### Using the AI Sidebar\n\n- Use **`Ctrl+Cmd+B` (Mac) / `Ctrl+Alt+B` (Linux/Windows)** or the [Pretzel Icon on the right sidebar](assets/pretzel-icon-finder.png) to activate the AI Sidebar\n- You can ask questions, generate code, or search for existing code\n- The AI always **uses the code in the active cell as context**. If you highlight some code in the active cell, only the highlighted code will be used as context\n- We automatically send relevant code in the current notebook as context to the AI\n- You can also use the `@` syntax to refer to variables and dataframes in memory, similar to the notebook cells\n\n_Example uses of AI Sidebar_:\n\n- \"Modify the function `my_function` to be more efficient\" \u2190 _this will find the function `my_function` in the whole notebook and modify it_\n- \"Where is the code that removes outliers\"? \u2190 _this will search the notebook for code that removes outliers and show it to you_\n- _(While cursor is in a cell with some code)_ \"Can you explain what this code does?\" \u2190 _this will explain the code **in the current cell**_\n- \"Plot a histogram of @df for age\" \u2190 _this will generate code to plot a histogram of the 'age' column from the dataframe named 'df'_\n- \"Calculate the mean revenue in @sales*data for each product type\" \u2190 \\_this will generate code to calculate mean revenue by product type using the `sales_data` dataframe*\n\n#### Adding code in the middle of existing code\n\n- Put your cursor either on an empty line or an existing line of code. Bring up the AI prompting text box with Cmd+K\n- Start your prompt with the word `inject` or `ij` (case-insensitive) - this tells the AI to only add new code and not edit the existing code in the cell\n- **Code will be added one line below** where your cursor was placed\n\n#### Fix errors with AI\n\n- When there's an error, you'll see a button on top-right \"**Fix Error with AI**\". Click it try fixing the error\n\n## Configuration\n\n**Pretzel works out-of-the-box, no configuration needed.** We **DO NOT** store any code or data you send to the Pretzel AI Server.\n\nStill, 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).\n\n- Open the `Settings` menu in the top menubar, then click `Pretzel AI Settings`\n- Under **AI Settings** you can pick which AI models to use for chat and for inline completion (see screenshot below)\n  - We recommend using GPT-4 class models (e.g., GPT-4 Turbo, GPT-4o, Claude-3.5 Sonnet, Claude-3 Opus and Llama-3.1 405B) for the best performance\n\nUnder the section **Configure AI Services**, you can\n\n- Enable or disable certain AI services (for eg, Azure and Ollama are disabled by default but can be enabled)\n- Enter your API key or URL as needed for each service\n\nRemember to save your settings after making changes. Pretzel will validate your configuration to ensure everything is set up correctly.\n\n![help image here](assets/pretzel-settings.png)\n\nPlease note: We haven't tested _Azure Enterprise OpenAI_ models yet. If you find any bugs, please report them in [GitHub issues](https://github.com/pretzelai/pretzelai/issues) and we'll fix them ASAP.\n\n## Feedback, bugs and docs\n\n- Please report bugs here: https://github.com/pretzelai/pretzelai/issues\n- Have any feedback? Any complains? We'd love feedback: founders@withpretzel.com\n\n## Jupyter specific information\n\nThe original Jupyter documentation is available [here](https://jupyter.org/) and\nthe Jupyterlab README is available [here](https://github.com/jupyterlab/jupyterlab).\n\n## Privacy Policy, Data Collection and Retention\n\nWe 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.\n\nWe 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.\n\nWe 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.\n\nIf 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.\n\nOur 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 founders@withpretzel.com with the subject line \"Account Deletion\" and we'll delete your account immediately.\n\n## FAQ\n\n**Q.** _What happened to the old version of Pretzel AI - the visual, in-browser data manipulation tool?_\n\n**A.** It's available in the [`pretzelai_visual` folder here](https://github.com/pretzelai/pretzelai/tree/main/pretzelai_visual). Please see [this PR](https://github.com/pretzelai/pretzelai/pull/76) for more info.\n\n**Q.** _What AI model does Pretzel use?_\n\n**A.** Pretzel uses different AI models for various tasks:\n\n1. Default model: GPT-4o\n\n   - Offers a good balance between speed and quality\n   - Can be changed in Pretzel Settings if you're using your own API key\n\n2. Inline completions: [Mistral's Codestral model](https://mistral.ai/news/codestral/)\n\n   - Excellent for code completion\n   - Very fast performance (22B parameter model)\n\n3. Fallback option:\n   - If you're using your own API key without providing a Mistral API Key, Pretzel will use GPT-4o for inline completions as well\n\nWe're continuing to experiment with models and supporting local models and Anthropic's Claude is at the top of our list.\n\n**Q.** _What about feature X?_\n\n**A.** There's a ton we want to build. Please [open an issue](https://github.com/pretzelai/pretzelai/issues) and tell us what you want us to build!\n\n**Q.** _Where's the roadmap?_\n\n**A.** We have a rough roadmap at the top of this README. There are many features we'd like to build, but there's just two of us. So, we're collecting feedback about what would be most helpful. Please open an issue or just email us with your feedback! Based on what we find, we'll prioritize our roadmap.\n\n**Q.** _Why are you using the AGPL license? Or, why not use MIT/BSD3 licenses?_\n\n**A.** Our goal with building Pretzel is to make an amazing data tool that is free for both individuals and companies to use. That said, we are a two-person startup - and we don't want some third party to just take our code and sell a hosted version of it without giving back to the community. Jupyter code is licensed as BSD-3 and if we keep our new code BSD-3 licensed, there would be no way to stop a third party from doing this. As a result, we went with the AGPLv3 license for all the new code. This ensures that if someone else does want to take our code and sell it (SaaS or otherwise), they have to open-source all of their modifications under AGPLv3 as well.\n\n**Q.** _Why a fork of Jupyter? Why not contribute into Jupyter directly?_\n\n**A.** This deserves a longer answer but here's the short answer: We've set out to make the **new** de-facto, modern, open-source data tool. Initially, we wanted to start from scratch. However, after talking to several data professionals, we realized it will be very hard to get people to switch to a new tool, no matter how good. The best way to get people to switch is to not have them switch at all. That's why we decided to fork Jupyter - for the near zero switching costs. Also, Jupyter is a mature product, and we're shipping feature really fast - frankly, at the pace we're shipping features, the code we write won't be accepted into the Jupyter codebase \ud83d\ude05. There are also many downsides to this decision - we've had to spend considerable time understanding the whole Jupyter ecosystem and multiple codebases, the complex release processes, the various APIs etc. However, we think this is the right decision for us.\n\n**Q.** _My company is worried about using an AGPLv3 licensed tool. What can I do?_\n\n**A.** The AGPL is a barrier ONLY IF you're modifying Pretzel AND redistributing it to the public. If you're simply using it as a tool in your company (even with modifications), the AGPL DOES NOT ask you to share your code. Still, if AGPL is an issue for you, please contact us, and we can figure out something that works.\n\n**Q.** _How are you planning on making money? OR, how are you free? I'm worried that you'll make this tool paid in the future._\n\n**A.** We're planning on selling a hosted version of the tool to companies to make money. This hosted version will probably have some company specific features that individuals don't want or need such as data access controls, connectors for data sources, integration with GitHub, hosted and shareable dashboard, scalable and on-demand compute for large data jobs etc. We will not retroactively make Pretzel's individual version paid.\n",
    "bugtrack_url": null,
    "license": "Pretzel is a fork of Project Jupyter, which is licensed under the terms of the Modified BSD License. The original code of this project, contributed by the Project Jupyter Contributors and other parties, remains under the original license. The original LICENSE text is as follows:  ============================================================================== Copyright (c) 2015-2022 Project Jupyter Contributors All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  Semver File License ===================  The semver.py file is from https://github.com/podhmo/python-semver which is licensed under the \"MIT\" license.  See the semver.py file for details. ==============================================================================  All modifications and additions to the Jupyter codebase made by Pretzel contributors listed in the PRETZEL_CONTRIBUTORS file (found at the root of the project) are licensed under the terms of the GNU Affero General Public License v3.0. These terms can be found in the LICENSE_AGPLv3 file at the root of the project.  Copyright for all new code contributions by Pretzel AI GmbH and listed contributors is held by Pretzel AI GmbH. Each new file created by Pretzel AI GmbH or its contributors is identified with a header stating the copyright and licensing under AGPLv3.   ==============================================================================  The contents of the folder pretzelai_visual represent an older tool, which is no longer actively developed. All files in this folder are licensed under the terms of the Apache License, Version 2.0. These terms can be found in the LICENSE file in the pretzelai_visual folder.",
    "summary": "Pretzel is a fork of JupyterLab that improves the user experience of the JupyterLab computational environment.",
    "version": "4.2.11",
    "project_urls": {
        "Changelog": "https://withpretzel.com/changelog",
        "Documentation": "https://withpretzel.com/docs",
        "Homepage": "https://withpretzel.com",
        "Issues": "https://github.com/pretzelai/pretzelai/issues/new/choose",
        "Pypi": "https://pypi.org/project/pretzelai",
        "Source": "https://github.com/pretzelai/pretzelai"
    },
    "split_keywords": [
        "ipython",
        " jupyter"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "052af19a7ac02554013b66d5662dc9943ef57ca7e3b74679b79b1d417e0678aa",
                "md5": "71402527a8857975f69936bfe059939d",
                "sha256": "ce53f8fe691df6e3336c09043d6936e2b8bb41aed958b3c5aaa1bf8376229331"
            },
            "downloads": -1,
            "filename": "pretzelai-4.2.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "71402527a8857975f69936bfe059939d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15136175,
            "upload_time": "2024-08-29T12:39:38",
            "upload_time_iso_8601": "2024-08-29T12:39:38.662910Z",
            "url": "https://files.pythonhosted.org/packages/05/2a/f19a7ac02554013b66d5662dc9943ef57ca7e3b74679b79b1d417e0678aa/pretzelai-4.2.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ca59fe85381867d2ae09e3cf39ec98aed40d7205919204c996c05f85beffe721",
                "md5": "f51709b3e9d1ee23c7aa11ffed373548",
                "sha256": "e845bcdeb334b11a3eaa9a2dd90526b41599f916fb040b4ae7ed0eacc35917c4"
            },
            "downloads": -1,
            "filename": "pretzelai-4.2.11.tar.gz",
            "has_sig": false,
            "md5_digest": "f51709b3e9d1ee23c7aa11ffed373548",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 23178783,
            "upload_time": "2024-08-29T12:39:41",
            "upload_time_iso_8601": "2024-08-29T12:39:41.909451Z",
            "url": "https://files.pythonhosted.org/packages/ca/59/fe85381867d2ae09e3cf39ec98aed40d7205919204c996c05f85beffe721/pretzelai-4.2.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-29 12:39:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pretzelai",
    "github_project": "pretzelai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pretzelai"
}
        
Elapsed time: 0.31275s