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

Source
CodeGenExample.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

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

Attributes

Source
CodeGenExample.scala

Concrete fields

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

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

Attributes

Source
CodeGenExample.scala

sbt fetches the build's dependencies, so its commands need the network (design §4.39).

sbt fetches the build's dependencies, so its commands need the network (design §4.39).

Attributes

Source
CodeGenExample.scala
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

Source
CodeGenExample.scala