Running code from a reply
A reply's Python blocks get a ▶ button. The code runs in its own
Python — a separate runtime from the one holding the model, so nothing it does can
disturb a conversation.
Enable running code
Let the model use this runtime itself
With this on, the model is told the runtime exists and can run code,
add modules or restart it in the middle of an answer — and is asked again with what
came back, so it can compute instead of guessing. Every call and its result is shown
in the reply. Off by default: a model acting on its own initiative is a different
thing from one that answers, and only models whose chat template documents tools can
use it at all.
Modules to have ready
Loaded when the page opens, not when you press Run — a first
import pandas otherwise costs a long pause with nothing to look at.
Any name works: what the Pyodide distribution ships (scipy, sympy, scikit-learn,
pillow, networkx, …) is taken from there, and anything else is fetched from PyPI if a
pure-Python wheel exists. A module you import without listing it still loads on
demand, just not instantly. Plots are captured and shown under the code.
Apply & load
Restart runtime
Add a wheel from this device
For a package that is neither in the distribution nor a pure-Python
wheel on PyPI — one you built for Pyodide yourself. Anything reachable by name is
already handled above: the box takes any name, and what the distribution does not
ship is fetched from PyPI.
Choose a .whl…
status: off