[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-pretzelai--pretzelai":3,"tool-pretzelai--pretzelai":65},[4,18,28,40,49,57],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":24,"last_commit_at":25,"category_tags":26,"status":17},9989,"n8n","n8n-io\u002Fn8n","n8n 是一款面向技术团队的公平代码（fair-code）工作流自动化平台，旨在让用户在享受低代码快速构建便利的同时，保留编写自定义代码的灵活性。它主要解决了传统自动化工具要么过于封闭难以扩展、要么完全依赖手写代码效率低下的痛点，帮助用户轻松连接 400 多种应用与服务，实现复杂业务流程的自动化。\n\nn8n 特别适合开发者、工程师以及具备一定技术背景的业务人员使用。其核心亮点在于“按需编码”：既可以通过直观的可视化界面拖拽节点搭建流程，也能随时插入 JavaScript 或 Python 代码、调用 npm 包来处理复杂逻辑。此外，n8n 原生集成了基于 LangChain 的 AI 能力，支持用户利用自有数据和模型构建智能体工作流。在部署方面，n8n 提供极高的自由度，支持完全自托管以保障数据隐私和控制权，也提供云端服务选项。凭借活跃的社区生态和数百个现成模板，n8n 让构建强大且可控的自动化系统变得简单高效。",184740,2,"2026-04-19T23:22:26",[16,14,13,15,27],"插件",{"id":29,"name":30,"github_repo":31,"description_zh":32,"stars":33,"difficulty_score":24,"last_commit_at":34,"category_tags":35,"status":17},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85267,"2026-04-18T11:00:28",[15,16,36,27,13,37,38,14,39],"视频","其他","语言模型","音频",{"id":41,"name":42,"github_repo":43,"description_zh":44,"stars":45,"difficulty_score":46,"last_commit_at":47,"category_tags":48,"status":17},5784,"funNLP","fighting41love\u002FfunNLP","funNLP 是一个专为中文自然语言处理（NLP）打造的超级资源库，被誉为\"NLP 民工的乐园”。它并非单一的软件工具，而是一个汇集了海量开源项目、数据集、预训练模型和实用代码的综合性平台。\n\n面对中文 NLP 领域资源分散、入门门槛高以及特定场景数据匮乏的痛点，funNLP 提供了“一站式”解决方案。这里不仅涵盖了分词、命名实体识别、情感分析、文本摘要等基础任务的标准工具，还独特地收录了丰富的垂直领域资源，如法律、医疗、金融行业的专用词库与数据集，甚至包含古诗词生成、歌词创作等趣味应用。其核心亮点在于极高的全面性与实用性，从基础的字典词典到前沿的 BERT、GPT-2 模型代码，再到高质量的标注数据和竞赛方案，应有尽有。\n\n无论是刚刚踏入 NLP 领域的学生、需要快速验证想法的算法工程师，还是从事人工智能研究的学者，都能在这里找到急需的“武器弹药”。对于开发者而言，它能大幅减少寻找数据和复现模型的时间；对于研究者，它提供了丰富的基准测试资源和前沿技术参考。funNLP 以开放共享的精神，极大地降低了中文自然语言处理的开发与研究成本，是中文 AI 社区不可或缺的宝藏仓库。",79857,1,"2026-04-08T20:11:31",[38,16,37],{"id":50,"name":51,"github_repo":52,"description_zh":53,"stars":54,"difficulty_score":46,"last_commit_at":55,"category_tags":56,"status":17},5773,"cs-video-courses","Developer-Y\u002Fcs-video-courses","cs-video-courses 是一个精心整理的计算机科学视频课程清单，旨在为自学者提供系统化的学习路径。它汇集了全球知名高校（如加州大学伯克利分校、新南威尔士大学等）的完整课程录像，涵盖从编程基础、数据结构与算法，到操作系统、分布式系统、数据库等核心领域，并深入延伸至人工智能、机器学习、量子计算及区块链等前沿方向。\n\n面对网络上零散且质量参差不齐的教学资源，cs-video-courses 解决了学习者难以找到成体系、高难度大学级别课程的痛点。该项目严格筛选内容，仅收录真正的大学层级课程，排除了碎片化的简短教程或商业广告，确保用户能接触到严谨的学术内容。\n\n这份清单特别适合希望夯实计算机基础的开发者、需要补充特定领域知识的研究人员，以及渴望像在校生一样系统学习计算机科学的自学者。其独特的技术亮点在于分类极其详尽，不仅包含传统的软件工程与网络安全，还细分了生成式 AI、大语言模型、计算生物学等新兴学科，并直接链接至官方视频播放列表，让用户能一站式获取高质量的教育资源，免费享受世界顶尖大学的课堂体验。",79792,"2026-04-08T22:03:59",[37,15,16,14],{"id":58,"name":59,"github_repo":60,"description_zh":61,"stars":62,"difficulty_score":10,"last_commit_at":63,"category_tags":64,"status":17},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[13,15,14,38,37],{"id":66,"github_repo":67,"name":68,"description_en":69,"description_zh":70,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":68,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":80,"owner_twitter":79,"owner_website":81,"owner_url":82,"languages":83,"stars":121,"forks":122,"last_commit_at":123,"license":124,"difficulty_score":46,"env_os":125,"env_gpu":126,"env_ram":126,"env_deps":127,"category_tags":132,"github_topics":133,"view_count":24,"oss_zip_url":79,"oss_zip_packed_at":79,"status":17,"created_at":154,"updated_at":155,"faqs":156,"releases":192},10054,"pretzelai\u002Fpretzelai","pretzelai","The modern replacement for Jupyter Notebooks","Pretzel 是一款现代化的开源 Jupyter Notebook 替代方案，旨在为数据科学和代码开发带来更流畅的智能体验。它并非完全重构的新平台，而是基于 Jupyter 的深度优化版本，因此用户原有的配置文件、快捷键设置及扩展插件均可无缝兼容，无需迁移成本即可直接升级。\n\n针对传统 Jupyter 在编码效率与交互上的不足，Pretzel 原生集成了强大的 AI 辅助功能。它支持行内代码自动补全、智能错误修复以及侧边栏 AI 对话，开发者只需按下快捷键或输入特定指令，即可让 AI 协助生成代码、解释逻辑或解答疑问。此外，它还支持接入 OpenAI、Claude、Ollama 等多种主流大模型，满足不同用户的个性化需求。\n\n这款工具特别适合数据科学家、算法工程师、科研人员以及任何习惯使用 Jupyter 进行数据分析与模型训练的开发者。对于希望在不改变现有工作流的前提下，显著提升编码效率并享受类似 Cursor 般智能编程体验的用户而言，Pretzel 是一个理想选择。其未来路线图还涵盖了实时协作、SQL 支持及可视化分析构建器等进阶功能，致力于打造一个更全能的数据开发环境。","\u003Cp align=\"center\">\n  \u003Ch3 align=\"center\">Pretzel 🥨\u003C\u002Fh3>\n\n  \u003Cp align=\"center\">\n    Modern, open-source Jupyter alternative.\n    \u003Cbr \u002F>\n    \u003Ca href=\"https:\u002F\u002Fpretzelai.app\" target=\"_blank\">\u003Cstrong>Try it here »\u003C\u002Fstrong>\u003C\u002Fa>\n    \u003Cbr \u002F>\n    \u003Cbr \u002F>\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FbYNEgbPzRy\" target=\"_blank\">Discord\u003C\u002Fa>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fwithpretzel.com\" target=\"_blank\">Website\u003C\u002Fa>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\">Issues\u003C\u002Fa>\n    ·\n    \u003Ca href=\"mailto:founders@withpretzel.com\" target=\"_blank\">Contact\u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fstargazers\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpretzelai\u002Fpretzelai\" alt=\"Github Stars\">\u003C\u002Fa>\n   \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fpretzelai\u002F\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpretzelai.svg?style=flat-square&label=PyPI+PretzelAI\" alt=\"Issues\">\u003C\u002Fa>\n   \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FbYNEgbPzRy\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-PretzelAI-blue?logo=discord\" alt=\"Join Pretzel on Discord\">\u003C\u002Fa>\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-AGPLv3-purple\" alt=\"License\">\u003C\u002Fa>\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fpulse\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcommit-activity\u002Fm\u002Fpretzelai\u002Fpretzelai\" alt=\"Commits-per-month\">\u003C\u002Fa>\n\u003C\u002Fp>\n\nhttps:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fassets\u002F121360087\u002Fff4643b1-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:\u002F\u002Fpretzelai.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 “**Ask AI**” or press Cmd+K (Mac) \u002F Ctrl+K (Linux\u002FWindows) to prompt AI\n- Use the **AI Sidebar** with Ctrl+Cmd+B (Mac) or Ctrl+Alt+B (Linux\u002FWindows) 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\u002FClaude, Ollama or Groq), see the [Configuration](#configuration) section\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fpretzelai_pretzelai_readme_8ae8700c0c09.png)\n\n---\n\nOur roadmap includes building features such as:\n\n- Native AI code generation and understanding features similar to [Cursor](https:\u002F\u002Fcursor.sh\u002F)\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:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Ftree\u002Fmain\u002Fpretzelai_visual#readme))\n- VSCode like code-writing experience using [Monaco](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmonaco-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 \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*\nWORKDIR \u002Froot\u002Fpretzel\nRUN pip install pretzelai\nEXPOSE 8888\nCMD [\"pretzel\", \"lab\", \"--ip=0.0.0.0\", \"--allow-root\", \"--notebook-dir=\u002Froot\u002Fpretzel\", \"--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:\u002F\u002Flocalhost:8888\u002Flab`. 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):\u002Froot\u002Fpretzel pretzel` - this will map your current directory to the docker container's `\u002Froot\u002Fpretzel` 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:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fblob\u002Fmain\u002FDockerfile) 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:\u002F\u002Fvisualstudio.microsoft.com\u002Fvisual-cpp-build-tools\u002F). 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:\u002F\u002Fmistral.ai\u002Fnews\u002Fcodestral\u002F) 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) \u002F `Ctrl+K` (Windows\u002FLinux)** or **click \"Ask AI\"** to open AI prompt textbox and write your code generation\u002Fediting 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\u002Fhighlight some code in the cell, only the selected code will be edited\n- You can accept\u002Freject the response or edit your prompt if you want to re-submit with modifications\n- Use ↑ \u002F ↓ to cycle through prompt history\n\n#### Using the AI Sidebar\n\n- Use **`Ctrl+Cmd+B` (Mac) \u002F `Ctrl+Alt+B` (Linux\u002FWindows)** or the [Pretzel Icon on the right sidebar](assets\u002Fpretzel-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\" ← _this will find the function `my_function` in the whole notebook and modify it_\n- \"Where is the code that removes outliers\"? ← _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?\" ← _this will explain the code **in the current cell**_\n- \"Plot a histogram of @df for age\" ← _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\" ← \\_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](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fpretzelai_pretzelai_readme_f9e8ec66211a.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:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues) and we'll fix them ASAP.\n\n## Feedback, bugs and docs\n\n- Please report bugs here: https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\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:\u002F\u002Fjupyter.org\u002F) and\nthe Jupyterlab README is available [here](https:\u002F\u002Fgithub.com\u002Fjupyterlab\u002Fjupyterlab).\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:\u002F\u002Fpretzelai.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:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Ftree\u002Fmain\u002Fpretzelai_visual). Please see [this PR](https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fpull\u002F76) 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:\u002F\u002Fmistral.ai\u002Fnews\u002Fcodestral\u002F)\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:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues) 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\u002FBSD3 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 😅. 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","\u003Cp align=\"center\">\n  \u003Ch3 align=\"center\">Pretzel 🥨\u003C\u002Fh3>\n\n  \u003Cp align=\"center\">\n    现代化的开源 Jupyter 替代方案。\n    \u003Cbr \u002F>\n    \u003Ca href=\"https:\u002F\u002Fpretzelai.app\" target=\"_blank\">\u003Cstrong>立即体验 »\u003C\u002Fstrong>\u003C\u002Fa>\n    \u003Cbr \u002F>\n    \u003Cbr \u002F>\n    \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FbYNEgbPzRy\" target=\"_blank\">Discord\u003C\u002Fa>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fwithpretzel.com\" target=\"_blank\">官网\u003C\u002Fa>\n    ·\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\">问题追踪\u003C\u002Fa>\n    ·\n    \u003Ca href=\"mailto:founders@withpretzel.com\" target=\"_blank\">联系我们\u003C\u002Fa>\n  \u003C\u002Fp>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fstargazers\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpretzelai\u002Fpretzelai\" alt=\"GitHub 星标\">\u003C\u002Fa>\n   \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fpretzelai\u002F\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpretzelai.svg?style=flat-square&label=PyPI+PretzelAI\" alt=\"PyPI 版本\">\u003C\u002Fa>\n   \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002FbYNEgbPzRy\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-PretzelAI-blue?logo=discord\" alt=\"加入 Pretzel Discord 社区\">\u003C\u002Fa>\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-AGPLv3-purple\" alt=\"许可证\">\u003C\u002Fa>\n   \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fpulse\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcommit-activity\u002Fm\u002Fpretzelai\u002Fpretzelai\" alt=\"每月提交次数\">\u003C\u002Fa>\n\u003C\u002Fp>\n\nhttps:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fassets\u002F121360087\u002Fff4643b1-c931-410e-aa0b-9233e0766223\n\nPretzel 是 Jupyter 的一个分支项目，旨在增强 Jupyter 的功能。目前，我们已经为 Jupyter 添加了 AI 代码生成与编辑、内联 Tab 补全、侧边栏聊天以及错误修复等功能，并且未来还将推出更多新特性。\n\n从 Jupyter 切换到 Pretzel 非常简单，**因为它只是 Jupyter 的一个改进版本**。您现有的 Jupyter 配置、设置、快捷键绑定和扩展都将开箱即用。\n\n## 快速开始\n\n- 安装：运行 `pip install pretzelai`，然后执行 `pretzel lab` 即可打开 Web 界面。或者，您也可以使用我们的**免费托管版本**：[pretzelai.app](https:\u002F\u002Fpretzelai.app)\n  - 如果在安装过程中遇到错误，请参阅[此处](#installation-problems)。\n- 在单元格中直接输入内容即可获得内联 Tab 补全提示。\n- 在任意 Jupyter 单元格中，点击“**Ask AI**”或按下 Cmd+K（Mac）\u002F Ctrl+K（Linux\u002FWindows）来调用 AI 助手。\n- 使用 **AI 侧边栏**，通过 Ctrl+Cmd+B（Mac）或 Ctrl+Alt+B（Linux\u002FWindows）打开，与 AI 聊天、生成代码并提问。\n- 输入 `@` 可触发函数和变量名的自动补全。\n- 若要使用您自己的模型（OpenAI、Anthropic\u002FClaude、Ollama 或 Groq），请参阅[配置](#configuration)部分。\n\n![](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fpretzelai_pretzelai_readme_8ae8700c0c09.png)\n\n---\n\n我们的路线图包括构建以下功能：\n\n- 原生 AI 代码生成与理解功能，类似于 [Cursor](https:\u002F\u002Fcursor.sh\u002F)；\n- 无缝实时协作：结对编程、评论、版本历史等；\n- SQL 支持（既可在代码单元格中使用，也可作为独立的 SQL IDE）；\n- 可视化分析构建器（详情请参见[这里](https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Ftree\u002Fmain\u002Fpretzelai_visual#readme))；\n- 类似 VSCode 的代码编写体验，基于 [Monaco](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fmonaco-editor) 编辑器；\n- 从 Jupyter 笔记本一键创建和分享仪表板。\n\n## 安装\n\n### 使用 pip\n\n通过 pip 安装 Pretzel：\n\n```\npip install pretzelai\n```\n\n对于 conda 用户，请先运行 `conda install pip` 安装 pip，然后再执行 `pip install pretzelai`。\n\n安装完成后，启动 Pretzel：\n\n```\npretzel lab\n```\n\n您将可以通过提供的 URL 访问 Pretzel 界面。\n\n如需使用自定义 AI 模型，请参阅[配置](#configuration)部分。\n\n### 在 Docker 容器中运行\n\n如果您在安装 Pretzel 时遇到困难（例如在 Windows 上），可以将其部署到 Docker 容器中运行。\n\n1. 创建 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 \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*\nWORKDIR \u002Froot\u002Fpretzel\nRUN pip install pretzelai\nEXPOSE 8888\nCMD [\"pretzel\", \"lab\", \"--ip=0.0.0.0\", \"--allow-root\", \"--notebook-dir=\u002Froot\u002Fpretzel\", \"--ServerApp.allow_remote_access=True\", \"--ServerApp.token=''\", \"--no-browser\"]\n```\n\n2. 在包含 Dockerfile 的同一目录下，运行 `docker build -t pretzel .`。\n\n3. 启动 Pretzel 容器：`docker run --name pretzel -p 8888:8888 pretzel`。容器启动后，您可以通过 `http:\u002F\u002Flocalhost:8888\u002Flab` 访问界面。要停止容器，按 `Ctrl + C`，然后执行 `docker stop pretzel`。\n\n若希望在 Pretzel 中访问本地文件夹，可以运行：`docker run --rm -p 8888:8888 -v $(pwd):\u002Froot\u002Fpretzel pretzel`。这会将您当前目录映射到容器内的 `\u002Froot\u002Fpretzel` 文件夹。请确保 Docker 具有访问您当前目录的权限。\n\n要将 Pretzel 更新至最新版本，只需使用 `--no-cache` 标志重新构建镜像：`docker build --no-cache -t pretzel .`，然后按照步骤 3 启动容器即可。\n\n### 极限测试版\n\n您可以使用此 [Dockerfile](https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fblob\u002Fmain\u002FDockerfile) 来构建并运行极限测试版。请按照[在 Docker 容器中运行](#running-within-a-docker-container)一节中的步骤（从第 2 步开始）操作。\n\n### 安装问题\n\n如果在安装过程中出现类似以下的错误：\n\n```\nFailed to build installable wheels for some pyproject.toml based projects (pystemmer)\n```\n\n这意味着安装未能成功安装依赖项 `PyStemmer`。通常这是因为您尚未安装正确的编译工具。解决方法如下：\n\n- **Windows**：从[此处](https:\u002F\u002Fvisualstudio.microsoft.com\u002Fvisual-cpp-build-tools\u002F)下载并安装 Microsoft Build Tools。点击“Download Build Tools”按钮进行安装。\n- **Ubuntu（及 Debian 系列系统）**：在终端中运行以下命令以安装必要的编译工具：\n  ```\n  sudo apt-get update && sudo apt-get install build-essential python3-dev\n  ```\n- **macOS**：运行 `brew install gcc`。如果仍无法解决问题，可能还需要运行 `xcode-select --install`。\n\n完成上述操作后，您应该能够顺利执行 `pip install pretzelai` 来安装 Pretzel。\n\n## 使用方法\n\n#### 内联补全\n\n- 在单元格中开始输入即可获得内联补全建议\n- 等待1秒以触发补全。您会在单元格中蓝色的“Ask AI”按钮前看到一个小加载动画\n\n默认的Pretzel AI服务器使用[Mistral的Codestral](https:\u002F\u002Fmistral.ai\u002Fnews\u002Fcodestral\u002F)，但您可以在Pretzel AI设置中切换内联补全模型。请参阅[配置](#configuration)部分。\n\n#### 在笔记本单元格中生成和编辑代码\n\n- 在单元格中，按下**`Cmd+K`（Mac）\u002F `Ctrl+K`（Windows\u002FLinux）**或**点击“Ask AI”**以打开AI提示文本框，并写下您的代码生成\u002F编辑指令\n  - 输入`@`可弹出当前会话中可用变量的下拉菜单。将`@变量`添加到提示中会将其值发送给AI\n  - 我们会自动将当前笔记本中的相关代码作为上下文发送给AI\n- 如果单元格中已有代码，提示将编辑现有代码\n  - 如果您在单元格中选择或高亮显示部分代码，则仅该部分代码会被编辑\n- 您可以接受或拒绝AI的回答，也可以修改提示后重新提交\n- 使用↑\u002F↓键可在提示历史中循环浏览\n\n#### 使用AI侧边栏\n\n- 使用**`Ctrl+Cmd+B`（Mac）\u002F `Ctrl+Alt+B`（Linux\u002FWindows）**或[右侧边栏上的Pretzel图标](assets\u002Fpretzel-icon-finder.png)来激活AI侧边栏\n- 您可以提问、生成代码或搜索现有代码\n- AI始终**以活动单元格中的代码作为上下文**。如果您在活动单元格中高亮显示部分代码，则仅该部分代码会被用作上下文\n- 我们会自动将当前笔记本中的相关代码作为上下文发送给AI\n- 您还可以使用`@`语法引用内存中的变量和数据框，与笔记本单元格中的用法类似\n\n_AI侧边栏的使用示例_：\n\n- “将函数`my_function`修改得更高效” ← _这将在整个笔记本中找到`my_function`并对其进行修改_\n- “哪里有去除异常值的代码？” ← _这将在笔记本中搜索去除异常值的代码并显示给您_\n- _(光标位于包含代码的单元格时)_ “你能解释一下这段代码的作用吗？” ← _这将解释**当前单元格**中的代码_\n- “为@df绘制年龄的直方图” ← _这将生成代码，绘制名为‘df’的数据框中‘年龄’列的直方图_\n- “计算@sales*data中每种产品的平均收入” ← \\_这将生成代码，使用`sales_data`数据框按产品类型计算平均收入*\n\n#### 在现有代码中间插入代码\n\n- 将光标置于空行或现有代码行上。通过Cmd+K调出AI提示文本框\n- 提示开头使用单词`inject`或`ij`（不区分大小写）——这会告诉AI只添加新代码，而不编辑单元格中的现有代码\n- **代码将被添加到光标所在位置的下一行**\n\n#### 使用AI修复错误\n\n- 当出现错误时，您会在右上角看到一个“使用AI修复错误”的按钮。点击它即可尝试修复错误。\n\n## 配置\n\n**Pretzel开箱即用，无需任何配置。**我们**不会**存储您发送到Pretzel AI服务器的任何代码或数据。\n\n尽管如此，如果您想使用不同的AI模型，可以配置Pretzel以**使用来自多个不同供应商的AI模型，包括本地模型。**在这种情况下，AI请求将直接从您的计算机发送到AI服务提供商（如OpenAI、Anthropic等）。\n\n- 打开顶部菜单栏中的“设置”菜单，然后点击“Pretzel AI设置”\n- 在**AI设置**中，您可以选择用于聊天和内联补全的AI模型（见下方截图）\n  - 我们建议使用GPT-4级别的模型（例如GPT-4 Turbo、GPT-4o、Claude-3.5 Sonnet、Claude-3 Opus以及Llama-3.1 405B），以获得最佳性能\n\n在**配置AI服务**部分，您可以\n\n- 启用或禁用某些AI服务（例如，Azure和Ollama默认是禁用的，但可以启用）\n- 根据需要为每个服务输入API密钥或URL\n\n请务必在更改设置后保存。Pretzel会验证您的配置，以确保一切设置正确。\n\n![帮助图片在这里](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fpretzelai_pretzelai_readme_f9e8ec66211a.png)\n\n请注意：我们尚未测试过_Azure Enterprise OpenAI_模型。如果您发现任何问题，请在[Github问题页面](https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues)上报，我们会尽快修复。\n\n## 反馈、Bug报告及文档\n\n- 请在此处报告Bug：https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\n- 您有任何反馈或意见吗？我们非常期待您的反馈：founders@withpretzel.com\n\n## Jupyter特定信息\n\nJupyter的原始文档可在[这里](https:\u002F\u002Fjupyter.org\u002F)找到，\n而Jupyterlab的README可在[这里](https:\u002F\u002Fgithub.com\u002Fjupyterlab\u002Fjupyterlab)查看。\n\n## 隐私政策、数据收集与保留\n\n我们不会收集任何个人信息。我们仅对我们开发的AI功能使用基本遥测数据——例如，当您点击“Ask AI”时，我们会收到一条事件，表明“有人”点击了“Ask AI”。我们只会为您的用户关联一个匿名ID。如果您允许使用Cookie，这有助于我们在多个浏览器会话中识别出同一用户（这一点非常有用！）。如果您不允许使用Cookie，每次打开浏览器时，您对我们来说都是一个新的匿名用户。\n\n我们还会收集AI功能的提示内容（**但不包括响应**）。您可以在设置中关闭此功能（设置 > Pretzel AI > 取消勾选“提示遥测”），但我们非常希望您不要关闭它——这对改进我们的提示非常有帮助。\n\n我们绝不会收集任何代码。即使您使用Pretzel的云端AI服务器进行代码补全，我们也绝不会存储这些代码。\n\n如果您使用Pretzel的托管版本（https:\u002F\u002Fpretzelai.app），我们将根据您的电子邮件地址为您创建一个用户账户。您随时可以登录并删除您可能存储在我们托管服务器上的任何数据。我们不会对您的数据进行备份或复制。\n\n我们的托管服务器可免费使用。不过，我们会在您上次登录后的30天后删除您的数据和账户。如果您希望提前删除账户，请发送邮件至founders@withpretzel.com，主题注明“账户删除”，我们将立即为您删除账户。\n\n## 常见问题解答\n\n**问：** _Pretzel AI 的旧版本——那个基于浏览器的可视化数据处理工具——现在怎么样了？_\n\n**答：** 它仍然可以在 [这里的 `pretzelai_visual` 文件夹](https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Ftree\u002Fmain\u002Fpretzelai_visual) 中找到。更多信息请参阅 [这篇 PR](https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fpull\u002F76)。\n\n**问：** _Pretzel 使用哪种 AI 模型？_\n\n**答：** Pretzel 根据不同任务使用不同的 AI 模型：\n\n1. 默认模型：GPT-4o  \n   - 在速度和质量之间提供了良好的平衡  \n   - 如果您使用自己的 API 密钥，可以在 Pretzel 设置中更改此模型  \n\n2. 内联补全：[Mistral 的 Codestral 模型](https:\u002F\u002Fmistral.ai\u002Fnews\u002Fcodestral\u002F)  \n   - 非常适合代码补全  \n   - 性能极快（220 亿参数模型）  \n\n3. 备用选项：  \n   - 如果您使用自己的 API 密钥但未提供 Mistral API 密钥，Pretzel 也会使用 GPT-4o 进行内联补全  \n\n我们仍在不断尝试不同的模型，并计划支持本地模型，Anthropic 的 Claude 也在我们的优先考虑之列。\n\n**问：** _功能 X 呢？_\n\n**答：** 我们想实现的功能还有很多。请 [提交一个问题](https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues)，告诉我们您希望我们开发哪些功能吧！\n\n**问：** _路线图在哪里？_\n\n**答：** 我们在本 README 的顶部有一个大致的路线图。我们有很多想要实现的功能，但目前只有我们两个人在做。因此，我们正在收集关于哪些功能最实用的反馈。请提交一个问题，或者直接给我们发邮件提出您的建议！我们会根据收到的反馈来确定路线图的优先级。\n\n**问：** _为什么你们使用 AGPL 许可证？为什么不使用 MIT 或 BSD-3 许可证呢？_\n\n**答：** 我们开发 Pretzel 的目标是打造一款出色的数据工具，供个人和公司免费使用。然而，我们是一家只有两个人的小型初创公司，不希望第三方仅仅拿走我们的代码，然后将其托管并出售，而不回馈社区。Jupyter 的代码采用 BSD-3 许可证，如果我们也将新代码保持为 BSD-3 许可证，就无法阻止第三方这样做。因此，我们决定对所有新代码采用 AGPLv3 许可证。这确保了如果有人确实想拿走我们的代码并进行销售（无论是 SaaS 还是其他形式），他们也必须将所有修改后的代码以 AGPLv3 开源。\n\n**问：** _为什么选择分叉 Jupyter？为什么不直接为 Jupyter 做贡献呢？_\n\n**答：** 这个问题需要更详细的回答，但简而言之：我们立志打造 **新的**、事实上的现代开源数据工具。最初，我们曾打算从头开始开发。然而，在与多位数据专业人士交流后，我们意识到，无论新工具多么优秀，让人们切换到它都非常困难。最好的方式就是让人们根本不需要切换。这就是我们决定分叉 Jupyter 的原因——这样切换成本几乎为零。此外，Jupyter 已经是一个成熟的产品，而我们开发功能的速度非常快，坦率地说，按照我们目前的开发节奏，我们编写的代码很可能不会被接受进入 Jupyter 的代码库 😅。当然，这个决定也有许多缺点——我们不得不花费大量时间去理解整个 Jupyter 生态系统及其多个代码库、复杂的发布流程以及各种 API 等等。不过，我们认为这对我们的项目来说是正确的选择。\n\n**问：** _我的公司担心使用 AGPLv3 许可证的工具。我该怎么办？_\n\n**答：** AGPL 许可证只会在以下情况下构成限制：您对 Pretzel 进行了修改，并且将修改后的版本重新发布给公众。如果您只是在公司内部将它作为工具使用（即使进行了修改），AGPL 并不要求您公开自己的代码。尽管如此，如果您仍然对 AGPL 存在顾虑，请联系我们，我们可以一起探讨一个可行的解决方案。\n\n**问：** _你们打算如何盈利？或者说，为什么它是免费的？我担心将来会变成收费工具。_\n\n**答：** 我们计划向企业销售该工具的托管版本以获取收入。这个托管版本可能会包含一些个人用户不需要或不感兴趣的特定于企业的功能，例如数据访问控制、数据源连接器、与 GitHub 的集成、托管且可共享的仪表板、用于大型数据作业的可扩展按需计算等。我们绝不会追溯性地将 Pretzel 的个人版变为付费版本。","# PretzelAI 快速上手指南\n\nPretzelAI 是一个现代化的开源 Jupyter 替代方案，它在保留 Jupyter 所有配置、快捷键和扩展兼容性的基础上，原生集成了 AI 代码生成、行内补全、侧边栏对话及错误修复功能。\n\n## 环境准备\n\n*   **操作系统**：Windows, macOS, Linux (Ubuntu\u002FDebian)\n*   **Python 版本**：推荐 Python 3.8 及以上\n*   **前置依赖**：\n    *   需安装 `pip` 包管理工具。\n    *   **构建工具**（若安装报错缺少编译环境）：\n        *   **Windows**: 安装 [Microsoft C++ Build Tools](https:\u002F\u002Fvisualstudio.microsoft.com\u002Fvisual-cpp-build-tools\u002F)\n        *   **Ubuntu\u002FDebian**: 运行 `sudo apt-get update && sudo apt-get install build-essential python3-dev`\n        *   **macOS**: 运行 `brew install gcc` (若无效则运行 `xcode-select --install`)\n*   **可选**：Docker（适用于无法直接安装依赖的环境）\n\n## 安装步骤\n\n### 方法一：使用 pip 安装（推荐）\n\n1.  打开终端或命令行工具，执行以下命令安装：\n    ```bash\n    pip install pretzelai\n    ```\n    *(注：国内用户若下载缓慢，可添加国内镜像源，例如：`pip install pretzelai -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple`)*\n\n2.  安装完成后，启动 Pretzel 实验室界面：\n    ```bash\n    pretzel lab\n    ```\n\n3.  浏览器将自动打开，或手动访问终端中提供的 URL（通常为 `http:\u002F\u002Flocalhost:8888\u002Flab`）。\n\n### 方法二：使用 Docker 运行\n\n若本地环境配置困难，可使用 Docker 容器运行：\n\n1.  创建 `Dockerfile`：\n    ```dockerfile\n    FROM python:3.9-slim\n    RUN apt-get update && apt-get install -y \\\n        build-essential \\\n        gcc \\\n        && rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*\n    WORKDIR \u002Froot\u002Fpretzel\n    RUN pip install pretzelai\n    EXPOSE 8888\n    CMD [\"pretzel\", \"lab\", \"--ip=0.0.0.0\", \"--allow-root\", \"--notebook-dir=\u002Froot\u002Fpretzel\", \"--ServerApp.allow_remote_access=True\", \"--ServerApp.token=''\", \"--no-browser\"]\n    ```\n\n2.  构建镜像：\n    ```bash\n    docker build -t pretzel .\n    ```\n\n3.  运行容器（映射当前目录以便访问本地文件）：\n    ```bash\n    docker run --rm -p 8888:8888 -v $(pwd):\u002Froot\u002Fpretzel pretzel\n    ```\n    启动后访问 `http:\u002F\u002Flocalhost:8888\u002Flab`。\n\n## 基本使用\n\nPretzel 完全兼容 Jupyter 操作习惯，无需额外配置即可使用默认 AI 功能（基于 Mistral Codestral）。\n\n### 1. 行内代码补全 (Inline Tab Completion)\n*   **操作**：在单元格中开始输入代码。\n*   **效果**：等待约 1 秒，系统将自动显示灰色的行内补全建议。按 `Tab` 键接受建议。\n*   **变量提示**：输入 `@` 符号可触发当前会话中变量和数据框的名称自动补全。\n\n### 2. AI 代码生成与编辑\n*   **唤起方式**：在任意单元格中按下 `Cmd+K` (Mac) 或 `Ctrl+K` (Linux\u002FWindows)，或点击单元格上方的 \"**Ask AI**\" 按钮。\n*   **生成代码**：在空白单元格中输入自然语言指令（如“绘制 df 的年龄列直方图”），AI 将生成对应代码。\n*   **编辑代码**：\n    *   若单元格已有代码，AI 会根据指令修改现有代码。\n    *   若选中部分代码，AI 仅修改选中部分。\n    *   **插入代码**：将光标置于某行，使用 `Cmd+K`\u002F`Ctrl+K`，并以 `inject` 或 `ij` 开头输入指令，AI 将在光标下方新增代码而不修改原有内容。\n*   **上下文引用**：在提示词中使用 `@变量名`（如 `@df`），可将该变量的值作为上下文发送给 AI。\n\n### 3. AI 侧边栏对话 (AI Sidebar)\n*   **唤起方式**：按下 `Ctrl+Cmd+B` (Mac) 或 `Ctrl+Alt+B` (Linux\u002FWindows)，或点击右侧边栏的 Pretzel 图标。\n*   **功能**：\n    *   **全局搜索与修改**：例如输入 \"Modify the function `my_function` to be more efficient\"，AI 会查找并优化整个 Notebook 中的该函数。\n    *   **代码解释**：选中某段代码后询问 \"Can you explain what this code does?\"。\n    *   **基于数据的分析**：输入 \"Plot a histogram of @df for age\"，AI 会利用内存中的 `df` 数据生成绘图代码。\n*   **上下文机制**：AI 默认将当前激活单元格中的代码（或选中代码）作为对话上下文。\n\n### 4. 一键修复错误\n*   当代码运行报错时，错误信息右上角会出现 \"**Fix Error with AI**\" 按钮，点击即可让 AI 自动分析并尝试修复代码。\n\n> **提示**：如需使用 OpenAI、Claude、Ollama 等自定义模型，可在顶部菜单栏 `Settings` > `Pretzel AI Settings` 中配置 API Key 和模型选择。","数据分析师小林正在处理一份复杂的销售数据集，需要快速清洗数据、构建可视化图表并撰写分析报告。\n\n### 没有 pretzelai 时\n- **代码编写效率低**：每写一个 Pandas 转换函数或 Matplotlib 绘图代码，都需要频繁切换浏览器搜索语法，打断分析思路。\n- **调试过程繁琐**：遇到报错时，必须手动复制错误信息到外部 AI 对话框或 StackOverflow，粘贴上下文后再将解决方案拷回笔记本，来回折腾耗时耗力。\n- **文档与代码割裂**：在单元格中解释分析逻辑时，缺乏智能辅助，往往写完代码后还要额外花大量时间补全注释和 Markdown 说明。\n- **变量记忆负担重**：在处理多步骤数据流时，经常忘记前序单元格定义的复杂变量名，导致反复滚动查看历史代码。\n\n### 使用 pretzelai 后\n- **智能行内补全**：只需输入 `df.` 或部分函数名，pretzelai 即刻提供基于上下文的代码补全建议，甚至直接生成完整的绘图代码块，让小林专注于业务逻辑而非语法细节。\n- **一键修复报错**：代码运行出错时，直接点击单元格旁的\"Ask AI\"或快捷键，pretzelai 自动读取错误堆栈并给出修复方案，一键应用即可解决问题。\n- **侧边栏协同编程**：通过快捷键唤出 AI 侧边栏，小林可以直接对话要求“为这段回归分析添加详细注释”或“解释这个异常值的含义”，AI 即时生成对应的 Markdown 文档插入文中。\n- **上下文感知提示**：输入 `@` 符号即可自动列出当前所有可用的变量和函数名，彻底消除记忆负担，确保代码引用准确无误。\n\npretzelai 将原本割裂的“编码 - 搜索 - 调试 - 文档”流程融合为流畅的自然交互，让数据分析师从繁琐的语法记忆中解放，真正回归数据洞察本身。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fpretzelai_pretzelai_8ae8700c.png","Pretzel AI","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fpretzelai_a41bdd86.png","Building AI tooling",null,"founders@withpretzel.com","https:\u002F\u002Fgetlumen.dev","https:\u002F\u002Fgithub.com\u002Fpretzelai",[84,88,92,96,100,104,108,111,115,118],{"name":85,"color":86,"percentage":87},"TypeScript","#3178c6",86.4,{"name":89,"color":90,"percentage":91},"Python","#3572A5",4.8,{"name":93,"color":94,"percentage":95},"CSS","#663399",4.6,{"name":97,"color":98,"percentage":99},"JavaScript","#f1e05a",2.3,{"name":101,"color":102,"percentage":103},"Jupyter Notebook","#DA5B0B",1.2,{"name":105,"color":106,"percentage":107},"Shell","#89e051",0.3,{"name":109,"color":110,"percentage":107},"HTML","#e34c26",{"name":112,"color":113,"percentage":114},"PowerShell","#012456",0,{"name":116,"color":117,"percentage":114},"Makefile","#427819",{"name":119,"color":120,"percentage":114},"Dockerfile","#384d54",2184,157,"2026-04-13T08:37:00","NOASSERTION","Linux, macOS, Windows","未说明",{"notes":128,"python":129,"dependencies":130},"该工具是 JupyterLab 的增强版（Fork），主要通过 pip 安装。在 Windows 上安装若报错，需安装 Microsoft Build Tools；Ubuntu 需安装 build-essential 和 python3-dev；macOS 需安装 gcc。支持通过 Docker 容器运行以简化环境配置。AI 功能默认使用云端模型（Mistral Codestral），也可配置为使用本地模型（如 Ollama）或第三方 API（OpenAI, Anthropic 等），若使用本地大模型则需自行满足相应的 GPU 和内存需求。","3.9+",[131],"pystemmer",[16,37],[134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153],"duckdb","open-source","prql","wasm","analytics","business-intelligence","businessintelligence","dashboard","data","data-analysis","data-analytics","data-science","data-visualization","reporting","sql","sql-editor","sql-editor-online","visualization","notebooks","artificial-intelligence","2026-03-27T02:49:30.150509","2026-04-20T16:47:46.288132",[157,162,167,172,177,182,187],{"id":158,"question_zh":159,"answer_zh":160,"source_url":161},45173,"Pretzel AI 默认使用哪个 GPT 模型？我可以更改它吗？","默认情况下，Pretzel 对所有编码任务使用 GPT-4o 模型。为了方便没有 API 密钥的用户，它通过官方包装器运行。如果您想使用自己的密钥或选择其他模型，可以在设置中切换到您自己的 OpenAI API 密钥。此外，最新版本还支持配置非 OpenAI 模型（如 Anthropic, Groq, Mistral）以及通过 Ollama 运行的本地模型。具体配置方法请参阅 README 中的配置部分。","https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\u002F86",{"id":163,"question_zh":164,"answer_zh":165,"source_url":166},45174,"如何在 macOS 上安装 Pretzel 并解决 'command not found: pretzel' 错误？","如果在运行 `pip install pretzelai` 后遇到 `zsh: command not found: pretzel` 错误，可能是因为安装了旧的包版本。请尝试再次运行 `pip install pretzelai` 以获取最新版本（v4.2.0 及以上），维护者已修复了 PyPI 上的默认版本问题。安装完成后，在终端运行 `pretzel lab` 启动服务。启动后，左侧边栏显示的文件目录即为您运行命令时所在的当前文件夹。您可以在 Jupyter 单元格中运行 `!pwd` 来验证当前路径。","https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\u002F85",{"id":168,"question_zh":169,"answer_zh":170,"source_url":171},45175,"是否支持使用本地的 Ollama 或 llama.cpp 模型？","是的，从 v4.2.8 版本开始，Pretzel 已添加对 Ollama 以及其他模型（Anthropic, Groq, Mistral）的支持。请先运行 `pip install --upgrade pretzelai` 升级到最新版本。然后在配置中启用 Ollama 即可使用本地模型。需要注意的是，如果使用较小的模型（例如参数量低于 33B 的系列），由于当前提示词（prompt）较为复杂，输出效果可能不佳；团队正在优化以适应更小的模型。","https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\u002F114",{"id":173,"question_zh":174,"answer_zh":175,"source_url":176},45176,"AI 生成的代码总是删除我原有的注释，如何解决？","这是一个已知问题，AI 有时会不一致地移除代码中的注释行，甚至在提示中明确要求“不要删除注释”也可能失效。这通常与底层提示词模板有关。虽然目前还没有完美的自动修复方案，但用户反馈表明这种行为会严重影响代码的可接受度。建议用户在提交问题时提供具体的复现示例给维护者，以便进一步调试提示词逻辑（例如修改 prompt.ts 中的相关指令）。","https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\u002F89",{"id":178,"question_zh":179,"answer_zh":180,"source_url":181},45177,"CSV 文件中字面量字符串 \"null\" 被错误解析为空值怎么办？","该问题已在后续更新（PR #47）中修复。此前系统会假设 CSV 中的 \"null\" 字符串是生成错误并将其视为缺失值，但现在可以正确地将字面量 \"null\" 解析并存储为字符串 \"null\"，而不是空值。如果您遇到此类数据解析问题，请确保您的 Pretzel 版本已更新到包含此修复的版本。","https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\u002F22",{"id":183,"question_zh":184,"answer_zh":185,"source_url":186},45178,"是否支持处理 Parquet 和 Arrow 格式的文件？","社区强烈请求添加对 Parquet 和 Arrow 文件的支持。根据讨论，通过 DuckDB WASM 处理约 6500 万条 Parquet 记录运行良好，但超过 1 亿条记录时速度会变慢。维护者已注意到该需求并正在评估优先支持 Parquet 还是同时支持两者。建议关注后续版本更新以获取原生支持。","https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\u002F30",{"id":188,"question_zh":189,"answer_zh":190,"source_url":191},45179,"如何在本地 Docker 容器中运行 Pretzel？","您可以创建一个 Dockerfile，基础镜像使用 `python:3.12-slim-bookworm`，然后运行 `RUN python -m pip install pretzelai` 安装工具，并设置 `CMD pretzel lab` 作为启动命令。构建镜像后，运行容器时需映射端口（如 `-p 8888:8888`）并将本地工作目录挂载到容器中（例如 `-v \"$(pwd):\u002Fhome\u002Fjovyan\u002Fwork\"`），以便在 Web UI 中访问本地文件。","https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fissues\u002F121",[193,198,203,208,213,218,223,228,233],{"id":194,"version":195,"summary_zh":196,"released_at":197},360044,"v4.2.11","* 支持通过剪贴板粘贴和上传图片，用于侧边栏及受支持型号的 Cmd K 功能\n* Cmd K 提示的历史记录现已在笔记本级别持久化保存，包括图片\n* 设置版本为 v1.2，并为托管版新增订阅选项\n\n**完整更新日志**：https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fcompare\u002Fv4.2.10...v4.2.11","2024-08-29T13:12:34",{"id":199,"version":200,"summary_zh":201,"released_at":202},360045,"v4.2.10","生活质量提升\n* 侧边栏更加紧凑，历史记录功能正常，即使没有笔记本也能正常使用侧边栏，\n* 侧边栏的代码按钮现在改为悬停按钮\n* 更改文件夹对侧边栏历史记录生效\n* 允许使用 `@变量` 语法将函数和类发送给 AI\n\n**完整更新日志**：https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fcompare\u002Fv4.2.9...v4.2.10","2024-08-21T15:49:35",{"id":204,"version":205,"summary_zh":206,"released_at":207},360046,"v4.2.9","## 变更内容\n• 在侧边栏中新增了用于变量引用的 `@` 语法\n• 在提示框和侧边栏中实现了 `@变量` 下拉菜单\n• 使用 Cmd K 生成的差异现在会直接显示在 Jupyter 单元格中\n• 大单元格下的 Cmd K 行为得到大幅优化：如果单元格较小，则向上滚动一点；如果单元格较大，则显示悬浮输入栏\n• 在“向 AI 提问”按钮前方添加了内联补全指示器\n• 其他多项使用体验优化\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fcompare\u002Fv4.2.8...v4.2.9","2024-08-15T17:11:49",{"id":209,"version":210,"summary_zh":211,"released_at":212},360047,"v4.2.8","## 变更内容\n* 新增设置页面（菜单栏 > 设置 > Pretzel AI 设置）。相比 Jupyter 的设置界面，这一新界面体验大幅提升。\n* 增加了对通过 Ollama 使用本地模型以及对 Anthropic 模型的支持。\n* 在使用 Anthropic、Azure 或 Ollama 时，支持本地嵌入向量的创建。\n* 可为 AI 聊天选择任意模型，同时为内联标签补全选择其他模型。\n* 重构了设置，并由 @ramonverse 在 https:\u002F\u002Fgithub.com\u002Fpretzelai\u002Fpretzelai\u002Fpull\u002F120 中添加了对 JupySQL PostgreSQL 的支持——目前该功能已禁用，但很快就会启用。","2024-07-30T17:00:26",{"id":214,"version":215,"summary_zh":216,"released_at":217},360048,"v4.2.7","在本次发布中，我们新增了基于 [Codestral](https:\u002F\u002Fmistral.ai\u002Fnews\u002Fcodestral\u002F) 的内联补全功能——Codestral 是 Mistral AI 推出的一款代码补全模型。Codestral 能够提供快速且高质量的补全建议。\n\n在我们的 AI 服务器上，代码补全服务完全免费。您也可以使用自己的 Mistral API Key。如果您没有 Mistral API Key，我们将自动回退到 GPT-4o（补全速度较慢）。","2024-07-02T13:16:31",{"id":219,"version":220,"summary_zh":221,"released_at":222},360049,"v4.2.5","这是一次相当重大的版本更新：\n- 新增 AI 侧边栏（Mac 上为 Cmd+Ctrl+B，Windows\u002FLinux 上为 Ctrl+Alt+B）\n  - 始终以当前单元格为上下文；只需在提示中提及 `@notebook`，即可将其他单元格纳入检索增强生成（RAG）范围。\n  - 可将生成的任何代码块复制到当前单元格，或通过在上方\u002F下方插入新单元格来实现。\n  - 按快捷键即可轻松在 AI 侧边栏与活动单元格之间切换。\n  - 所有 AI 对话历史均本地存储（路径为 `\u003Cnotebook_dir>\u002F.pretzel\u002Fchat_history.json`）。\n- 为 AI 提示框中的所有功能新增了快捷键和工具提示（Cmd + K \u002F Ctrl + K）。\n- AI 提示框中新增提示历史记录（基于浏览器会话——浏览器刷新后会重置）。\n- 提示优化显著：注释不再被移除，导入语句也得以保留。","2024-06-12T14:43:59",{"id":224,"version":225,"summary_zh":226,"released_at":227},360050,"v4.2.3","请参阅 PR #90 中的完整更改\n\n摘要：\n- 在提示输入方面，我们从使用 `textarea` 切换到了 CodeMirror Markdown 编辑器\n  - 支持细粒度的撤销\u002F重做\n  - 支持格式化\n- 增加了提示历史支持：如果您之前曾在单元格中运行过某个提示，再次打开 AI 提示框时，将显示上次运行的提示内容。\n- 完全支持深色模式\n- 使 UI 元素符合 Jupyter 的样式规范。","2024-05-29T14:21:31",{"id":229,"version":230,"summary_zh":231,"released_at":232},360051,"v4.2.2","- 允许选择是“接受并运行”AI生成的代码，还是“仅接受”而不运行\n- 新增帮助提示工具\n- 对提示词进行了显著优化：\n  - 不重复现有代码\n  - 不删除注释\n  - 更好地复用现有函数、变量和导入语句\n- 允许在单元格中间插入代码（此前只能编辑现有代码）\n  - 任何以 `inject` 或 `ij` 开头的提示词（不区分大小写）都会将新代码插入到现有代码的中间\n- 设置中新增模型选择功能（仅限使用您自己的 OpenAI API Key 时）\n- 将关于页面中的项目名称由 Jupyter 更新为 Pretzel\n- 更新 README，添加常见问题解答等内容","2024-05-24T14:48:11",{"id":234,"version":235,"summary_zh":236,"released_at":237},360052,"v4.2.0","在本次首个版本中，我们在 Jupyter 的分支中新增了类似 Cursor（cursor.sh）的 AI 功能：\n- 按 Cmd+K（mac）\u002F Ctrl+K（Windows\u002FLinux）打开 AI 提示框\n- 在提示框中指示 AI 生成代码\n  - 使用 `@变量` 语法引用内存中的变量或 DataFrame\n- 用自然语言描述笔记本中的其他代码。我们会进行基础的 RAG 检索，以找到笔记本中已有的代码\n- 编辑现有代码：如果笔记本单元格中已有代码，或者您选中了单元格中的部分代码，AI 提示框可以对代码进行编辑\n- 通过单击一个按钮自动修复错误\n- 开箱即用，免费使用我们的 AI 服务器提供的 AI 功能（基于 GPT-4o）\n- 支持 OpenAI API Key 和 Azure，以保障数据隐私，适用于组织内部使用及其他模型","2024-05-21T09:34:12"]