This guide shows how to create a tool
that call an executable in a container.
This is a flexible and secure way to run tools that may have dependencies or security concerns.
This is typically done by creating a container with a particular image (gcc here)
then reusing the container in the tool invocations. You can return the result of container.exec
from the tool and it will be handled by the runtime.
Example: GCC as a Tool
This sample uses the official GCC docker image to compile a C program as tool.
The LLM engine will invoke the tool to validate the syntax of the generated code.