MyGit

e2b-dev/E2B

Fork: 465 Star: 7077 (更新于 2024-12-02 16:06:35)

license: Apache-2.0

Language: MDX .

Secure open source cloud runtime for AI apps & AI agents

最后发布版本: @e2b/cli@0.5.10 ( 2024-08-27 17:30:28)

官方网址 GitHub网址

e2b logo

Last 1 month downloads for the Python SDK Last 1 month downloads for the JavaScript SDK

What is E2B?

E2B is an open-source infrastructure that allows you to run AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our JavaScript SDK or Python SDK.

[!NOTE] This repository contains the core E2B SDK that's used in our main E2B Code Interpreter SDK.

Run your first Sandbox

1. Install SDK

JavaScript / TypeScript

npm i @e2b/code-interpreter

Python

pip install e2b-code-interpreter

2. Get your E2B API key

  1. Sign up to E2B here.
  2. Get your API key here.
  3. Set environment variable with your API key
E2B_API_KEY=e2b_***

3. Execute code with code interpreter inside Sandbox

JavaScript / TypeScript

import { Sandbox } from '@e2b/code-interpreter'

const sandbox = await Sandbox.create()
await sbx.runCode('x = 1')

const execution = await sbx.runCode('x+=1; x')
console.log(execution.text)  // outputs 2

Python

from e2b_code_interpreter import Sandbox

with Sandbox() as sandbox:
    sandbox.run_code("x = 1")
    execution = sandbox.run_code("x+=1; x")
    print(execution.text)  # outputs 2

4. Check docs

Visit E2B documentation.

5. E2B cookbook

Visit our Cookbook to get inspired by examples with different LLMs and AI frameworks.

最近版本更新:(数据更新于 2024-09-11 21:26:07)

2024-08-27 17:30:28 @e2b/cli@0.5.10

2024-08-27 17:07:26 @e2b/cli@0.5.9

2024-08-07 17:52:57 @e2b/cli@0.5.8

2024-08-05 21:53:33 e2b@0.16.2

2024-08-05 21:53:30 @e2b/cli@0.5.7

2024-07-25 03:04:16 @e2b/cli@0.5.6

2024-06-11 19:56:47 @e2b/cli@0.5.5

2024-06-11 19:35:56 @e2b/cli@0.5.4

2024-05-31 23:03:14 @e2b/python-sdk@0.17.1

2024-05-10 07:35:25 e2b@0.16.1

主题(topics):

agent, ai, ai-agent, ai-agents, code-interpreter, copilot, development, devtools, gpt, gpt-4, javascript, llm, nextjs, openai, python, react, software, typescript

e2b-dev/E2B同语言 MDX最近更新仓库

2023-10-24 02:31:49 uidotdev/usehooks

2023-09-29 19:14:55 yewstack/yew

2023-07-29 03:23:36 react-native-elements/react-native-elements

2023-03-29 21:48:13 trigaten/Learn_Prompting

2022-04-08 23:22:39 ademilter/homepage

1970-01-01 00:00:00 withastro/docs