mirascope.tools.system._docker_operation
Module _docker_operation
Class DockerOperationToolKitConfig
Configuration for DockerOperationToolKit toolkit
Bases:
_ConfigurableToolConfigClass DockerOperation
Base class for Docker operations.
Bases: ConfigurableTool[DockerOperationToolKitConfig], ABC
Class DockerContainer
Bases:
BaseModelAttributes
| Name | Type | Description |
|---|---|---|
| config | DockerOperationToolKitConfig | - |
| container | Container | - |
Class DockerOperationToolKit
ToolKit for executing Python code and shell commands in a Docker container.
Bases:
ConfigurableToolKit[DockerOperationToolKitConfig]Attributes
| Name | Type | Description |
|---|---|---|
| config | DockerOperationToolKitConfig | - |
| docker_container | DockerContainer | - |
Function create_tools
The method to create the tools.
Parameters
| Name | Type | Description |
|---|---|---|
| self | Any | - |
Class ExecutePython
Tool for executing Python code in a Docker container.
Bases:
DockerOperationFunction call
Executes Python code in a Docker container.
docker_image: {self.config.docker_image} allow_network: {self.config.allow_network}
Parameters
| Name | Type | Description |
|---|---|---|
| self | Any | - |
Returns
| Type | Description |
|---|---|
| str | Output of the code execution |
Class ExecuteShell
Tool for executing shell commands in a Docker container.
Bases:
DockerOperationAttributes
| Name | Type | Description |
|---|---|---|
| command | str | - |
Function call
Executes shell commands in a Docker container.
docker_image: {self.config.docker_image} allow_network: {self.config.allow_network}
Parameters
| Name | Type | Description |
|---|---|---|
| self | Any | - |
Returns
| Type | Description |
|---|---|
| str | Output of the command execution |