org.llm4s.codegen
Members list
Type members
Classlikes
Example demonstrating how to use the CodeWorker to perform code tasks.
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
- Supertypes
- Self type
-
CodeGenExample.type
Represents a code task to be performed by the CodeWorker.
Represents a code task to be performed by the CodeWorker.
Attributes
- Source
- CodeTask.scala
- Supertypes
Represents the result of a code task execution.
A worker for code generation and manipulation tasks. CodeWorker combines a workspace environment with an LLM agent to handle tasks involving code base understanding, modification, and generation.
A worker for code generation and manipulation tasks. CodeWorker combines a workspace environment with an LLM agent to handle tasks involving code base understanding, modification, and generation.
The agent's commands run in the container without a shell, and only programs on the runner's allowlist run (#1756); a build tool the task needs, such as sbt, goes in extraAllowedCommands.
Value parameters
- client
-
The LLM that drives the agent
- containerOptions
-
How the container is started: its startup wait, resource limits and user (#3063, #3064)
- extraAllowedCommands
-
Programs the runner may run besides its default allowlist, for example
Set("sbt") - hostPort
-
The host port for the container
- imageName
-
The workspace-runner image
- sandboxConfig
-
The runner's whole sandbox config, or
Nonefor its profile - sourceDirectory
-
The directory containing the codebase to work with
Attributes
- Companion
- object
- Source
- CodeWorker.scala
- Supertypes
Attributes
- Companion
- class
- Source
- CodeWorker.scala
- Supertypes
- Self type
-
CodeWorker.type
PureConfig-based loader for workspace settings.
PureConfig-based loader for workspace settings.
This mirrors the behavior of WorkspaceSettings.load(), but is implemented in terms of llm4s.* HOCON keys and the standard PureConfig flow.
Keys (with precedence):
- llm4s.workspace.dir | WORKSPACE_DIR
- llm4s.workspace.image | WORKSPACE_IMAGE
- llm4s.workspace.port | WORKSPACE_PORT
Attributes
- Source
- WorkspaceConfigSupport.scala
- Supertypes
- Self type
Configuration settings for workspace environment.
Configuration settings for workspace environment.
Defines the directory, Docker image, and port configuration for the containerized code workspace.
Value parameters
- hostPort
-
host port for workspace communication;
0, the default, lets Docker choose a free one (#3063) - imageName
-
Docker image name for the workspace container
- workspaceDir
-
directory path containing the codebase to work with
Attributes
- See also
-
WorkspaceConfigSupport for loading settings from configuration
- Companion
- object
- Source
- WorkspaceSettings.scala
- Supertypes
Companion object with default workspace settings.
Companion object with default workspace settings.
Attributes
- Companion
- class
- Source
- WorkspaceSettings.scala
- Supertypes
- Self type
-
WorkspaceSettings.type
