CodeGenExample

org.llm4s.codegen.CodeGenExample

Example demonstrating how to use the CodeWorker to perform code tasks.

The workspace runner runs each command without a shell, and only programs on its allowlist (#1756). sbt is not on the default list, so this example adds it with CodeWorker's extraAllowedCommands, which the container receives as WORKSPACE_EXTRA_COMMANDS=sbt. An added program has no option rules of its own: sbt run runs the project's code, so add a build tool only for a workspace you are prepared to let the agent build and run.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def main(args: Array[String]): Unit

Concrete fields

val ExtraAllowedCommands: Set[String]

The programs this example needs besides the runner's default allowlist.

The programs this example needs besides the runner's default allowlist.

Attributes

val Task: String

The task given to the agent. Each command it names is one program and its arguments, as the runner requires.

The task given to the agent. Each command it names is one program and its arguments, as the runner requires.

Attributes