mirascope.tools.system._docker_operation¶
DockerOperationToolKitConfig
¶
Bases: _ConfigurableToolConfig
Configuration for DockerOperationToolKit
toolkit
DockerOperation
¶
DockerContainer
¶
Bases: BaseModel
DockerOperationToolKit
¶
Bases: ConfigurableToolKit[DockerOperationToolKitConfig]
ToolKit for executing Python code and shell commands in a Docker container.
ExecutePython
¶
Bases: DockerOperation
Tool for executing Python code in a Docker container.
call
¶
call() -> str
Executes Python code in a Docker container.
docker_image: {self.config.docker_image} allow_network: {self.config.allow_network}
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
Output of the code execution |
Source code in mirascope/tools/system/_docker_operation.py
ExecuteShell
¶
Bases: DockerOperation
Tool for executing shell commands in a Docker container.
call
¶
call() -> str
Executes shell commands in a Docker container.
docker_image: {self.config.docker_image} allow_network: {self.config.allow_network}
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
Output of the command execution |
Source code in mirascope/tools/system/_docker_operation.py
create_tools
¶
The method to create the tools.