TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Adding Mistral Codestral and GPT-4o to Jupyter Notebooks

269 pointsby prasoonds11 months ago
Hey HN! We’ve forked Jupyter Lab and added AI code generation features that feel native and have all the context about your notebook. You can see a demo video (2 min) here: <a href="https:&#x2F;&#x2F;www.tella.tv&#x2F;video&#x2F;clxt7ei4v00rr09i5gt1laop6&#x2F;view">https:&#x2F;&#x2F;www.tella.tv&#x2F;video&#x2F;clxt7ei4v00rr09i5gt1laop6&#x2F;view</a><p>Try a hosted version here: <a href="https:&#x2F;&#x2F;pretzelai.app" rel="nofollow">https:&#x2F;&#x2F;pretzelai.app</a><p>Jupyter is by far the most used Data Science tool. Despite its popularity, it still lacks good code-generation extensions. The flagship AI extension <i>jupyter-ai</i> lags far behind in features and UX compared to modern AI code generation and understanding tools (like <a href="https:&#x2F;&#x2F;www.continue.dev">https:&#x2F;&#x2F;www.continue.dev</a> and <a href="https:&#x2F;&#x2F;www.cursor.com" rel="nofollow">https:&#x2F;&#x2F;www.cursor.com</a>). Also, GitHub Copilot <i>still</i> isn’t supported in Jupyter, more than 2 years after its launch. We’re solving this with Pretzel.<p>Pretzel is a free and open-source fork of Jupyter. You can install it locally with “pip install pretzelai” and launch it with “pretzel lab”. We recommend creating a new python environment if you already have jupyter lab installed. Our GitHub README has more information: <a href="https:&#x2F;&#x2F;github.com&#x2F;pretzelai&#x2F;pretzelai">https:&#x2F;&#x2F;github.com&#x2F;pretzelai&#x2F;pretzelai</a><p>For our first iteration, we’ve shipped 3 features:<p>1. Inline Tab autocomplete: This works similar to GitHub Copilot. You can choose between Mistral Codestral or GPT-4o in the settings<p>2. Cell level code generation: Click Ask AI or press Cmd+K &#x2F; Ctrl+K to instruct AI to generate code in the active Jupyter Cell. We provide relevant context from the current notebook to the LLM with RAG. You can refer to existing variables in the notebook using the @variable syntax (for dataframes, it will pass the column names to the LLM)<p>3. Sidebar chat: Clicking the blue Pretzel Icon on the right sidebar opens this chat (Ctrl+Cmd+B &#x2F; Ctrl+Alt+B). This chat always has context of your current cell or any selected text. Here too, we use RAG to send any relevant context from the current notebook to the LLM<p>All of these features work out-of-the-box via our “AI Server” but you have the option of using your own OpenAI API Key. This can be configured in the settings (Menu Bar &gt; Settings &gt; Settings Editor &gt; Search for Pretzel). If you use your own OpenAI API Key but don’t have a Mistral API key, be sure to select OpenAI as the inline code completion model in the settings.<p>These features are just a start. We&#x27;re building a modern version of Jupyter. Our roadmap includes frictionless, realtime collaboration (think pair-programming, comments, version history), full-fledged SQL support (both in code cells and as a standalone SQL IDE), a visual analysis builder, a VSCode-like coding experience powered by Monaco, and 1-click dashboard creation and sharing straight from your notebooks.<p>We’d love for you to try Pretzel and send us any feedback, no matter how minor (see my bio for contact info, or file a GitHub issue here: <a href="https:&#x2F;&#x2F;github.com&#x2F;pretzelai&#x2F;pretzelai&#x2F;issues">https:&#x2F;&#x2F;github.com&#x2F;pretzelai&#x2F;pretzelai&#x2F;issues</a>)

19 comments

williamstein11 months ago
There are many other Jupyter notebooks with extensive AI integration. These are less (or not at all) open source, but more mature in some ways, having been iterated on for over a year:<p>- <a href="https:&#x2F;&#x2F;noteable.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;noteable.io&#x2F;</a> -- pretty good, but then they got acquirehired out of existence<p>- <a href="https:&#x2F;&#x2F;deepnote.com">https:&#x2F;&#x2F;deepnote.com</a> -- also extensive AI integration and realtime collaboration<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;jupyterlab&#x2F;jupyter-ai">https:&#x2F;&#x2F;github.com&#x2F;jupyterlab&#x2F;jupyter-ai</a> -- a very nice standard open source extension for gen AI in Jupyter, from an Amazon. JupyterLab of course also has fairly mature realtime collaboration now.<p>- <a href="https:&#x2F;&#x2F;colab.google&#x2F;" rel="nofollow">https:&#x2F;&#x2F;colab.google&#x2F;</a> -- has great AI integration but of course only with Google-hosted models<p>- <a href="https:&#x2F;&#x2F;cocalc.com" rel="nofollow">https:&#x2F;&#x2F;cocalc.com</a> -- very extensive AI integration everywhere with all the main hosted models, mostly free or pay as you go; also has realtime collaboration. (Disclaimer: I co-authored this.)<p>- VS Code has a great builtin Jupyter notebook, as other people have mentioned.<p>Am I missing any?
评论 #40858261 未加载
评论 #40857977 未加载
评论 #40859225 未加载
评论 #40859872 未加载
评论 #40860144 未加载
评论 #40864497 未加载
TidbitsTornado11 months ago
This is a great implementation by your team + contributors. Simple but effective. And nice to see you’ve kept it open source instead of some other Show HN submissions where they take open source work, make is closed, change a few things, and claim they’ve created something great.<p>Im curious to see if you continue building out some other features. While these are great features (copilot, chat, etc), I’d think most users would expect their IDE to have it out of the box (or with an extension) these days
评论 #40858008 未加载
评论 #40857897 未加载
ramonverse11 months ago
Ramon here, the other cofounder of Pretzel! Quick update: Based on some early feedback, we&#x27;re already working on adding support for local LLMs and Claude Sonnet 3.5. Happy to answer any questions!
评论 #40859434 未加载
评论 #40859632 未加载
lschneider11 months ago
Github Copilot is the most useful tool I&#x27;ve found in a long time and having that in Jupyter Notebooks is just awesome. I&#x27;ve been missing that for quite some time. Great work guys!
评论 #40857625 未加载
评论 #40857659 未加载
carreau11 months ago
Curious about the limitations that made you fork it instead of making an extension.
评论 #40857807 未加载
mritchie71211 months ago
&gt; GitHub Copilot still isn’t supported in Jupyter<p>What do you mean by this? I&#x27;ve been using Copilot in VS Code .ipynb files for over a year now.
评论 #40857902 未加载
评论 #40857630 未加载
评论 #40857656 未加载
morsch11 months ago
These editors all focus on programming, does anybody have a recommendation for more general note-taking?<p>I&#x27;d like to do things like organizing very rough notes, having them reformatted according to a general template, apply changes according to a prompt, maybe ask questions that refer to a collection of notes, ...
chad1n11 months ago
I don&#x27;t really get the appeal of this, I&#x27;d just use vscode with Jupyter if I really wanted &quot;ai&quot; integration since I can then access the whole ecosystem of extensions. The idea isn&#x27;t that bad, but it lacks purpose.
评论 #40862186 未加载
trungld11 months ago
your work is basically a Jupyter extension (<a href="https:&#x2F;&#x2F;github.com&#x2F;pretzelai&#x2F;pretzelai&#x2F;tree&#x2F;main&#x2F;packages&#x2F;pretzelai-extension">https:&#x2F;&#x2F;github.com&#x2F;pretzelai&#x2F;pretzelai&#x2F;tree&#x2F;main&#x2F;packages&#x2F;pr...</a>). Why don&#x27;t just create an extension like others in here (<a href="https:&#x2F;&#x2F;github.com&#x2F;jupyterlab-contrib">https:&#x2F;&#x2F;github.com&#x2F;jupyterlab-contrib</a>) instead of hard forking JupyterLab?
评论 #40864149 未加载
superkuh11 months ago
At this point I&#x27;m almost afraid to ask but my attempts to figure it out have failed. What is a Jupyter notebook? Where is the code running? On your computer? On someone elses computer?
评论 #40860887 未加载
评论 #40859935 未加载
renewiltord11 months ago
I just use PyCharm and Copilot plugin. Works like a charm.
评论 #40858677 未加载
f-lux11 months ago
Have y&#x27;all seen Jupyter AI? Seems to do the same but better (more features, more mature codebase, better UI&#x2F;UX&#x2F;DX) while being a JupyterLab extension <a href="https:&#x2F;&#x2F;github.com&#x2F;jupyterlab&#x2F;jupyter-ai">https:&#x2F;&#x2F;github.com&#x2F;jupyterlab&#x2F;jupyter-ai</a>
评论 #40862192 未加载
评论 #40864183 未加载
widepeepo811 months ago
Codeium(<a href="https:&#x2F;&#x2F;codeium.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;codeium.com&#x2F;</a>) already supports this, along with VSCode jupyter notebook extensions. It has 400k downloads on the VSCode extension store. don&#x27;t really see the point of this when codeium already exists..
评论 #40860812 未加载
dakshgupta11 months ago
Curious on why you went with Codestral for autocomplete, does it outperform other local models? How is the performance compared to GPT or Claude for autocomplete?<p>Any plans to finetune Codestral for this specific usecase?
评论 #40858798 未加载
mathiasn11 months ago
Have you seen Livebook? Best Jupyter Notebook ever!! <a href="https:&#x2F;&#x2F;livebook.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;livebook.dev&#x2F;</a>
评论 #40860836 未加载
downrightmike11 months ago
I installed it into my jupyter env and it runs fine on port 8889, but the default port 8888, it just sits waiting on the AI to generate a response.
评论 #40864237 未加载
mitjam11 months ago
Are there technical reasons for the fork or could Pretzel have been implemented as a set of extensions?
评论 #40864160 未加载
skybrian11 months ago
Are the file formats the same? Are there any Pretzel-specific extensions?
评论 #40857611 未加载
localfirst11 months ago
seems like the problem I am experiencing right now is that I&#x27;m overwhelmed by the sheer number of tools and choices its frankly exhausting<p>there is a feeling that i can do anything and everything with AI but in reality I can&#x27;t do anything because i can&#x27;t prioritize and choose anymore due to choice fatigue
评论 #40860917 未加载
评论 #40872013 未加载