立即开始
Code Interpreter Tools

Codeinterpreter Execute Code

通过 Aident Loadout 使用 Code Interpreter Tools 的 Codeinterpreter Execute Code。执行前查看输入、输出、设置、价格和风险。

写入操作风险等级 2/5Aident 托管访问

服务提供商说明

Execute python code in a sandbox and return any result, stdout, stderr, and error. Use /home/user folder to write/read files. Try to not use plt.show() as the code is executed remotely. Use files for image/chart output instead.

价格与限制

价格
免费操作
统一支付
此免费操作无需统一支付

输入

  • timeoutinteger
    The timeout in seconds for the execution of the code.
  • keep_aliveinteger
    The number of seconds to keep the sandbox alive after execution. Default is 300 seconds (5 minutes). Can be between 0 and 3600.
  • sandbox_idstring
    The ID of the sandbox to execute the code in. Try to find an existing sandbox ID from context in order to access the previous modification session. In case not found, this value might be omitted, a new sandbox will be created.
  • code_to_executestring
    必填
    The python code to execute in a single cell. If a file is to be saved, it should be saved under /home/user/ directory. At the end of the code, a success message print is good to have.

可观察输出

  • data
    必填
    Data from the action execution
  • errorstring
    Error if any occurred during the execution of the action
  • successfulboolean
    必填
    Whether or not the action execution was successful or not

使用此操作的技能

相关使用场景

尚未关联经过验证的相关使用场景。

官方来源

服务提供商来源