You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-46Lines changed: 57 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,6 @@
2
2
3
3
The repository contains a template and modules for the code interpreter sandbox. It is based on the Jupyter server and implements the Jupyter Kernel messaging protocol. This allows for sharing context between code executions and improves support for plotting charts and other display-able data.
4
4
5
-
6
5
## Motivation
7
6
8
7
The code generated by LLMs is often split into code blocks, where each subsequent block references the previous one. This is a common pattern in Jupyter notebooks, where each cell can reference the variables and definitions from the previous cells. In the classical sandbox each code execution is independent and does not share the context with the previous executions.
@@ -14,56 +13,63 @@ Additionally, this new template also partly implements the [Jupyter Kernel messa
14
13
15
14
The current code interpreter allows to run Python code but each run share the context. That means that subsequent runs can reference to variables, definitions, etc from past code execution runs.
16
15
17
-
18
16
## Current state
17
+
19
18
Known limited in features such as:
19
+
20
20
- All executions share single kernel
21
21
22
22
We'll be updating this module as we gather more user feedback.
23
23
24
24
## Installation
25
25
26
-
**Python**
26
+
### Python
27
+
27
28
```sh
28
-
pip install e2b-code-interpreter
29
+
pip install e2b_code_interpreter
29
30
```
30
-
**JavaScript**
31
+
32
+
### JavaScript
33
+
31
34
```sh
32
-
npm install e2b-code-interpreter
35
+
npm install e2b_code_interpreter
33
36
```
34
37
35
38
## Examples
36
39
37
-
### Minimal example with the sharing context:
40
+
### Minimal example with the sharing context
41
+
42
+
#### Python
38
43
39
-
**Python**
40
44
```python
41
45
from e2b_code_interpreter import CodeInterpreterV2
### Pre-installed Python packages inside the sandbox
181
+
171
182
The full and always up-to-date list can be found in the [`requirements.txt`](https://github.com/e2b-dev/E2B/blob/stateful-code-interpreter/sandboxes/code-interpreter-stateful/requirements.txt) file.
0 commit comments