最后活跃于 1730821964

knox 修订了这个 Gist 1730821963. 跳至此修订

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
更新 更早