NAiOS IconNAiOS Logo
Volver al catálogo

Code Interpreter

codeinterpreter

CodeInterpreter extends Python-based coding environments with integrated data analysis, enabling developers to run scripts, visualize results, and prototype solutions inside supported platforms

Acciones
5
Triggers
0
Autenticación
OAuth gestionado
No
Información técnica: el detalle de parámetros, schemas y triggers de esta página está pensado para equipos de integración. Si solo necesitas saber si tu herramienta favorita está disponible, basta con ver la lista de acciones.

Acciones disponibles (5)

Cada acción es una operación que el agente puede ejecutar contra este conector. Haz clic en una acción para ver sus parámetros.

Create SandboxCODEINTERPRETER_CREATE_SANDBOXAcción

Create a sandbox to execute python code in a jupyter notebook cell. this is useful for agents to communicate, execute code, see output, read files, write files, etc. it's like you own personal computer, but in the cloud. use /home/user folder to write/read files.

Parámetros de entrada

  • keep_aliveinteger

    The number of seconds to keep the sandbox alive after creation. Default is 300 seconds (5 minutes). Can be in between 0 and 3600.

Parámetros de salida

  • dataobjectObligatorio

    Data from the action execution

  • errorstring

    Error if any occurred during the execution of the action

  • successfulbooleanObligatorio

    Whether or not the action execution was successful or not

Execute CodeCODEINTERPRETER_EXECUTE_CODEAcción

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.

Parámetros de entrada

  • 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_executestringObligatorio

    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.

Parámetros de salida

  • dataobjectObligatorio

    Data from the action execution

  • errorstring

    Error if any occurred during the execution of the action

  • successfulbooleanObligatorio

    Whether or not the action execution was successful or not

Get FileCODEINTERPRETER_GET_FILE_CMDAcción

Get a file from the sandbox and returns the file. the files should be read from /home/user folder.

Parámetros de entrada

  • timeoutinteger

    The timeout in seconds for the command to run.

  • file_pathstringObligatorio

    The path(on the sandbox) of the file to get. Give absolute path. Should start with /home/user/

  • sandbox_idstringObligatorio

    The ID of the sandbox where the file has been created.

Parámetros de salida

  • dataobjectObligatorio

    Data from the action execution

  • errorstring

    Error if any occurred during the execution of the action

  • successfulbooleanObligatorio

    Whether or not the action execution was successful or not

Run Terminal CommandCODEINTERPRETER_RUN_TERMINAL_CMDAcción

Run a command in the terminal and returns the stdout, stderr, and error code. use /home/user folder to write/read files.

Parámetros de entrada

  • commandstringObligatorio

    The command to run in the terminal.

  • timeoutinteger

    The timeout in seconds for the command to run.

  • keep_aliveinteger

    The number of seconds to keep the sandbox alive after execution. Default is 300 seconds (5 minutes).

  • sandbox_idstring

    The ID of the sandbox to execute the code in. Try to find an existing sandbox ID from contextinorder to access the previous modification session. In case not found, this value might be omitted, a new sandbox will be created.

Parámetros de salida

  • dataobjectObligatorio

    Data from the action execution

  • errorstring

    Error if any occurred during the execution of the action

  • successfulbooleanObligatorio

    Whether or not the action execution was successful or not

Upload FileCODEINTERPRETER_UPLOAD_FILE_CMDAcción

Upload a file to the sandbox environment. the files should be uploaded to the /home/user folder.

Parámetros de entrada

  • fileobjectObligatorio

    The file to upload, containing the file name and base64-encoded content.

  • overwriteboolean

    Whether to overwrite the file if it already exists.

  • sandbox_idstringObligatorio

    The ID of the sandbox where the file will be uploaded.

  • destination_pathstringObligatorio

    The destination path in the sandbox where the file will be saved. Provide an absolute path starting with /home/user/. The file name from 'file' will be appended if destination_path is a directory.

Parámetros de salida

  • dataobjectObligatorio

    Data from the action execution

  • errorstring

    Error if any occurred during the execution of the action

  • successfulbooleanObligatorio

    Whether or not the action execution was successful or not