Last active 1730821964

knox revised this gist 1730821963. Go to revision

1 file changed, 7 insertions

E2B-4.ts(file created)

@@ -0,0 +1,7 @@
1 + import { Sandbox } from '@e2b/code-interpreter'
2 +
3 + const sandbox = await Sandbox.create()
4 + await sbx.runCode('x = 1')
5 +
6 + const execution = await sbx.runCode('x+=1; x')
7 + console.log(execution.text) // outputs 2
Newer Older