CodeWorker
org.llm4s.codegen.CodeWorker
class CodeWorker(sourceDirectory: String, imageName: String, hostPort: Int, client: LLMClient, extraAllowedCommands: Set[String]) extends AutoCloseable
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
- 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
- sourceDirectory
-
The directory containing the codebase to work with
Attributes
- Graph
-
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass Any
Members list
In this article