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 |
Naposledy aktivní
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 |