Repository: Significant-Gravitas/Auto-GPT
File: autogpt_platform/backend/backend/blocks/code_executor.py (Python)

Code before:
            description="Enter your api key for the E2B Sandbox. You can get it in here - https://e2b.dev/docs",
        )

        # Todo : Option to run commond in background
        commands: list[str] = SchemaField(
            description="Run these commands in the sandbox before running the code, You can use `curl` or `git` to install your desired debian based package manager. pip and npm is pre installed\n Currently, none of these commands work in the background.",
            placeholder="pip install cowsay",
            default=[],
            advanced=False,
        )

        code: str = SchemaField(
            description="Code to execute in the sandbox",
            placeholder="print('Hello, World!')",
            default="",
            advanced=False,
        )

        language: ProgrammingLanguage = SchemaField(
            description="Programming language to execute",
            default=ProgrammingLanguage.PYTHON,
            advanced=False,
        )

        timeout: int = SchemaField(
            description="Sandbox timeout in seconds", default=300
        )

        template_id: str = SchemaField(
            description="Create a pre Customized sandbox template. and Enter the template id here, Check more about it in here - https://e2b.dev/docs/sandbox-template",
            default="",
            advanced=True,
        )

    class Output(BlockSchema):
        response: str = SchemaField(description="Response from code execution")
        stdout_logs: str = SchemaField(
            description="Standard output logs from execution"
        )
        stderr_logs: str = SchemaField(description="Standard error logs from execution")
        error: str = SchemaField(description="Error message if execution failed")

    def __init__(self):
        super().__init__(
            id="0b02b072-abe7-11ef-8372-fb5d162dd712",
            description="Executes Python code commands in an isolated sandbox environment. Every sandbox has access to internet",
            categories={BlockCategory.DEVELOPER_TOOLS},
            input_schema=CodeExecutionBlock.Input,
            output_schema=CodeExecutionBlock.Output,
            test_credentials=TEST_CREDENTIALS,
            test_input={

Review comment (suggestion):
```suggestion
            description="Execution timeout in seconds", default=300
```

Code after:
            CredentialsField(
                provider="e2b",
                supported_credential_types={"api_key"},
                description="Enter your api key for the E2B Sandbox. You can get it in here - https://e2b.dev/docs",
            )
        )

        # Todo : Option to run commond in background
        setup_commands: list[str] = SchemaField(
            description=(
                "Shell commands to set up the sandbox before running the code. "
                "You can use `curl` or `git` to install your desired Debian based "
                "package manager. `pip` and `npm` are pre-installed.\n\n"
                "These commands are executed with `sh`, in the foreground."
            ),
            placeholder="pip install cowsay",
            default=[],
            advanced=False,
        )

        code: str = SchemaField(
            description="Code to execute in the sandbox",
            placeholder="print('Hello, World!')",
            default="",
            advanced=False,
        )

        language: ProgrammingLanguage = SchemaField(
            description="Programming language to execute",
            default=ProgrammingLanguage.PYTHON,
            advanced=False,
        )

        timeout: int = SchemaField(
            description="Execution timeout in seconds", default=300
        )

        template_id: str = SchemaField(
            description=(
                "You can use an E2B sandbox template by entering its ID here. "
                "Check out the E2B docs for more details: "
                "[E2B - Sandbox template](https://e2b.dev/docs/sandbox-template)"
            ),
            default="",
            advanced=True,
        )

    class Output(BlockSchema):
        response: str = SchemaField(description="Response from code execution")
        stdout_logs: str = SchemaField(
            description="Standard output logs from execution"