Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b9f32e6

Browse files
modify readme
1 parent c6a4132 commit b9f32e6

File tree

2 files changed

+147
-14
lines changed

2 files changed

+147
-14
lines changed

‎README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Codeinterpreter-Codebox
2+
3+
This is Codeinterpreter-codebox, a cloud service for executing Code Interpreter code.
4+
5+
# Features
6+
1. **Independent Jupyter Sandbox Environment**
7+
A completely isolated Jupyter sandbox environment that supports state-preserving code execution. Supports file uploads and downloads.
8+
2. **Dockerized One-click Deployment**
9+
3. **Completely Free and Open Source**
10+
4. **Information Security**
11+
Supports completely private deployments without the need to upload files to external servers.
12+
5. **More Flexible**
13+
Supports the opening of more ports to achieve more custom functionality requirements, such as: connecting to databases, connecting to the internet, connecting to other servers.
14+
15+
## Function Descriptions
16+
1. Execute Python code.
17+
2. Supports reading of uploaded files ([Upload and Analyze Files](./examples/client/codeinterpreter_session.py)).
18+
```
19+
if name=='main':
20+
session=CodeinterpreterSession()
21+
try:
22+
session.upload_files(['./../data/test_data.csv'])
23+
session.chat('How many columns are in the uploaded file?')
24+
finally:
25+
session.close()
26+
```
27+
3. Supports downloading files from the sandbox.
28+
4. Supports dynamic scaling for commercial deployments.
29+
5. Supports custom feature modifications, open ports, network connections, etc., supports web crawlers.
30+
31+
## Related Projects and Differences
32+
1. [Code Interpreter api](https://github.com/shroominic/codeinterpreter-api)
33+
2. [open-interpreter](https://github.com/KillianLucas/open-interpreter)
34+
3. [E2B](https://github.com/e2b-dev/e2b)
35+
36+
| Feature/Project | [Codeinterpreter-Codebox](https://github.com/zhangzhejian/codeinterpreter-codebox) | [Code Interpreter api](https://github.com/shroominic/codeinterpreter-api) | [open-interpreter](https://github.com/KillianLucas/open-interpreter) | [E2B](https://github.com/e2b-dev/e2b) |
37+
|---|---|---|---|---|
38+
| **Private Commercial Deployment** |||||
39+
| **Remote Invocation** |||||
40+
| **Fully Open Source** |||||
41+
| **Free of Charge** |||||
42+
| **Custom Modifications** |||||
43+
| **Information Security** |||||
44+
| **Supports Multiple Programming Languages** |||||
45+
| **Supports Local Execution** |||||
46+
| **Direct Invocation Without Deployment** |||||
47+
48+
## Code Examples
49+
1. [jupyter server communicate](./examples/jupyter/jupyter_api_test.ipynb) showcases the details of interaction between the server and the Jupyter container.
50+
2. [jupyter call](./examples/jupyter/execute_dynamic_code.ipynb) demonstrates how to invoke a web service via an HTTP request, execute code, and retrieve results.
51+
```
52+
test_code="""
53+
import docker
54+
print(docker.version)
55+
56+
"""
57+
execute(test_code)
58+
59+
#output
60+
Execute Result= {"output_type":"text/plain","content":"6.1.3\n","files":null}
61+
```
62+
3. [client session invocation](./examples/client/codeinterpreter_session.py) shows how to allow LLM to invoke and execute code in a project through session and HTTP request.
63+
```
64+
session=CodeinterpreterSession()
65+
try:
66+
session.upload_files(['./../data/test_data.csv'])
67+
session.chat('How many columns are in the uploaded file?')
68+
finally:
69+
session.close()
70+
```
71+
72+
73+
## Deployment
74+
In [docker compose](./app/docker_dev.yml), replace 'CODEBOX_ROOT_PATH' and 'YOUR_MNT_PATH:/codebox' with your own file path for 'YOUR_MNT_PATH' to mount.
75+
76+
## Contact
77+
WeChat: zjajzzj1996
78+
Email: [zhangzhehian@gmail.com](zhangzhehian@gmail.com)

‎README_zh.md

Lines changed: 69 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,85 @@
11
# Codeinterpreter-codebox
22

3-
这是一个通过docker构建的云服务,实现了code interpreter的后端功能,以便部署调用。Sandbox环境语言独立,可以用其他编程语言重写。
4-
实现了企业化的code interpreter代码执行的自我部署的实现,提供了更好的信息安全性和基于云的可拓展性和可用性。
5-
## 相关项目和差异
6-
1. [Code Interpreter api](https://github.com/shroominic/codeinterpreter-api)提供了基于langchain的agent调用,但是codebox为闭源收费。
7-
2. [open-interpreter](https://github.com/KillianLucas/open-interpreter) 提供了更多的编程语言支持,但是支持本地化运行,不支持远程调用。在商业化或者企业化的项目中无法应用
8-
3. [E2B](https://github.com/e2b-dev/e2b) 支持更多编程语言的云服务,闭源
3+
这是Codeinterpreter-codebox,作为执行code interpreter代码的云服务。<br>
4+
95

6+
# Features
7+
1. 独立的jupyter沙盒环境
8+
完全隔离的jupyter沙盒环境,支持状态保持的执行代码。支持文件上传、下载。
9+
2. docker化一键部署<br>
1010

11+
3. 完全免费开源<br>
12+
4. 信息安全<br>
13+
支持完全私有化部署,无需上传文件到外部服务器<br>
14+
5. 更灵活 <br>
15+
支持开放更多端口以实现更多自定义功能需求,如:连接数据库、连接互联网、连接其他服务器
1116

1217
## 功能描述
13-
1. 通过支持启动、运行、上传文件、安装python package、结束等接口,方便客户端对于codeinterpreter-codebox的调用
14-
2. 提供了docker化的虚拟环境作为代码执行的沙盒环境
15-
3. 可以增加调用管理的数据库模块功能
18+
1. 执行python代码
19+
2. 支持上传文件的读取([上传文件并分析](./examples/client/codeinterpreter_session.py))
20+
```
21+
if __name__=='__main__':
22+
session=CodeinterpreterSession()
23+
try:
24+
session.upload_files(['./../data/test_data.csv'])
25+
session.chat('上传的文件中有多少列数据')
26+
finally:
27+
session.close()
28+
```
29+
3. 支持下载沙盒中的文件
30+
4. 支持动态扩容的商业化部署
31+
5. 支持自定义功能修改,开放端口、网络连接等,支持爬虫。
32+
33+
## 相关项目和差异
34+
1. [Code Interpreter api](https://github.com/shroominic/codeinterpreter-api)
35+
2. [open-interpreter](https://github.com/KillianLucas/open-interpreter)
36+
3. [E2B](https://github.com/e2b-dev/e2b)
37+
38+
39+
| 特点/项目 | [Codeinterpreter-Codebox](https://github.com/zhangzhejian/codeinterpreter-codebox) | [Code Interpreter api](https://github.com/shroominic/codeinterpreter-api) | [open-interpreter](https://github.com/KillianLucas/open-interpreter) | [E2B](https://github.com/e2b-dev/e2b) |
40+
|---|---|---|---|---|
41+
| **私有商业化部署** |||||
42+
| **远程调用** |||||
43+
| **完全开源** |||||
44+
| **免费** |||||
45+
| **自定义修改** |||||
46+
| **信息安全** |||||
47+
| **多编程语言支持** |||||
48+
| **支持本地化运行** |||||
49+
| **无需部署直接调用** |||||
50+
51+
1652

17-
## 部署
18-
[docker compose](./app/docker_dev.yml)中使用自己的文件路径替代'CODEBOX_ROOT_PATH'和 'YOUR_MNT_PATH:/codebox' 中的'YOUR_MNT_PATH'来挂载自己的文件路径
1953
## 代码示例
2054

2155
1. [jupyter server communicate](./examples/jupyter/jupyter_api_test.ipynb) 中展示了server和jupyter container交互的细节
22-
2. [jupyter 调用](./examples/jupyter/execute_dynamic_code.ipynb)中展示了如何通过http request的方式调用web服务,执行代码获取结果
23-
3. [client session调用](./examples/client/codeinterpreter_session.py)中展示了在项目中如何以session和http request的方式让LLM调用执行代码。
56+
2. [jupyter 调用](./examples/jupyter/execute_dynamic_code.ipynb)中展示了如何通过http request的方式调用web服务,执行代码获取结果
57+
```
58+
test_code="""
59+
import docker
60+
print(docker.__version__)
61+
62+
"""
63+
execute(test_code)
2464
2565
66+
#output
67+
Execute Result= {"output_type":"text/plain","content":"6.1.3\n","files":null}
68+
```
69+
3. [client session调用](./examples/client/codeinterpreter_session.py)中展示了在项目中如何以session和http request的方式让LLM调用执行代码。
70+
```
71+
session=CodeinterpreterSession()
72+
try:
73+
session.upload_files(['./../data/test_data.csv'])
74+
session.chat('上传的文件中有多少列数据')
75+
finally:
76+
session.close()
77+
```
78+
79+
## 部署
80+
[docker compose](./app/docker_dev.yml)中使用自己的文件路径替代'CODEBOX_ROOT_PATH'和 'YOUR_MNT_PATH:/codebox' 中的'YOUR_MNT_PATH'来挂载自己的文件路径
2681

2782

2883
## 联系方式
29-
微信:zjajzzj1996
84+
微信:zjajzzj1996
3085
Email: [zhangzhehian@gmail.com](zhangzhehian@gmail.com)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /