跳到正文

代码解释器

在沙箱中运行 Python,仅在宿主显式启用时注册。

由固定提交的图表源码生成(1aa5e22)。工具说明保留模型实际收到的英文原文,不做翻译。

code_interpreter

Run Python修改图表按序执行可选源码

Execute Python code in an isolated sandbox with numpy and pandas available and outbound network disabled. Read inputs from $INPUT_DIR and write files you want returned into $OUTPUT_DIR.

参数

字段类型必填约束说明
codestring是min length 1Python source to execute. Only the standard library plus numpy and pandas are available.
filesobject[]—max items 16
files[].namestring—min length 1; max length 255
files[].contentstring——
files[].encodingenum—one of "utf8", "base64"
timeoutMsinteger—≥ 1; ≤ 60000

最小输入 · 仅含必填字段,占位值由 schema 推导。

{
  "code": "<code>"
}
JSON Schema
…

本页内容