jupyterlab / jupyter-ai

A generative AI extension for JupyterLab
https://jupyter-ai.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
3.12k stars 307 forks source link

Option to run generated code in a sandbox #175

Open JasonWeill opened 1 year ago

JasonWeill commented 1 year ago

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.

mlejva commented 6 months ago

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

JasonWeill commented 6 months ago

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