Codeinterpreter

Learn how to use Codeinterpreter with Composio

Overview

Enum

CODEINTERPRETER

Description

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

Authentication Details

Actions

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

Action Parameters

sandbox_id
stringRequired
file
objectRequired
destination_path
stringRequired
overwrite
boolean

Action Response

data
object
successful
boolean
error

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

Action Parameters

sandbox_id
string
command
stringRequired
timeout
integer
keep_alive
integerDefaults to 300

Action Response

data
object
successful
boolean
error

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.

Action Parameters

sandbox_id
string
code_to_execute
stringRequired
timeout
integerDefaults to 60
keep_alive
integerDefaults to 300

Action Response

data
object
successful
boolean
error

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

Action Parameters

sandbox_id
stringRequired
file_path
stringRequired
timeout
integer

Action Response

data
object
successful
boolean
error