Add option to blacklist modules in code interpreter

Co-authored-by: KG <kahghi@users.noreply.github.com>
This commit is contained in:
Rodrigo Agundez 2025-06-05 23:21:04 +08:00
parent 5e35aab292
commit 6dd969129d

View File

@ -1711,6 +1711,16 @@ CODE_INTERPRETER_JUPYTER_TIMEOUT = PersistentConfig(
),
)
CODE_INTERPRETER_BLACKLISTED_MODULES = PersistentConfig(
"CODE_INTERPRETER_BLACKLISTED_MODULES",
"code_interpreter.blacklisted_modules",
[
library.strip()
for library in os.environ.get("CODE_INTERPRETER_BLACKLISTED_MODULES", "").split(",")
if library.strip()
],
)
DEFAULT_CODE_INTERPRETER_PROMPT = """
#### Tools Available