jupyter-ai icon indicating copy to clipboard operation
jupyter-ai copied to clipboard

Option to run generated code in a sandbox

Open JasonWeill opened this issue 2 years ago • 3 comments
trafficstars

Problem

Users want to generate code with a generative AI model, then run it in a safer, sandboxed environment.

Proposed Solution

Give users the option to generate and also run code in a sandboxed environment, not the kernel.

Additional context

OpenAI's code interpreter plugin, in alpha as of 2023-05-17, provides this feature.

Consider using the LangChain Python tool.

JasonWeill avatar May 17 '23 16:05 JasonWeill

Hey @JasonWeill,

I stumbled upon this issue while researching executing AI generated code in sandboxed environment.

I don't want to shamelessly shill our project but we might be building exactly what you need. It’s called E2B. We basically give your LLM an open source cloud computer (a sandbox). We don’t do any LLM calls directly, instead, we’re focused on the code execution layer for LLMs.

One of the most frequent use cases for our users is building custom code interpreters and we have a dedicated support for that with a new version that behaves pretty much like the code interpreter functionality that ChatGPT’s has (provided you prompt the model right way). We basically run a Jupyter server inside the sandbox

We’re also completely open source and have a cloud offering.

Would love to learn if this would be helpful to you. Happy offer any support

mlejva avatar Mar 05 '24 08:03 mlejva

@mlejva Thanks for reaching out! Would love to see a pull request or other demo showing how Jupyter AI could work with your project.

JasonWeill avatar Mar 05 '24 21:03 JasonWeill

I think this would be a great feature. code interpreter is great but I can't edit the code myself.

Why does it need to happen in a sandbox environment and not the kernel? Claude code also executes code locally. You can just add a user question.

twiecki avatar Mar 03 '25 01:03 twiecki