Add E2B as an optional code sandbox provider

- Specify E2B api key and template to use via env variables
- Try load, use e2b library when E2B api key set
- Fallback to try use terrarium sandbox otherwise
- Enable more python packages in e2b sandbox like rdkit via custom e2b template

- Use Async E2B Sandbox
- Parallelize file IO with sandbox
- Add documentation on how to enable E2B as code sandbox instead of Terrarium
This commit is contained in:
Debanjum
2025-02-15 03:11:15 +05:30
parent b4183c7333
commit 45fb85f1df
7 changed files with 157 additions and 18 deletions

View File

@@ -68,7 +68,7 @@ dependencies = [
"authlib == 1.2.1",
"llama-cpp-python == 0.2.88",
"itsdangerous == 2.1.2",
"httpx == 0.25.0",
"httpx == 0.27.2",
"pgvector == 0.2.4",
"psycopg2-binary == 2.9.9",
"lxml == 4.9.3",
@@ -92,6 +92,7 @@ dependencies = [
"pyjson5 == 1.6.7",
"resend == 1.0.1",
"email-validator == 2.2.0",
"e2b-code-interpreter ~= 1.0.0",
]
dynamic = ["version"]