Documentation
¶
Index ¶
Constants ¶
const BASH = "bash"
A unique name for bash (the shell)
const GOLANG = "go"
A unique name for bash (the shell)
const PYTHON = "python"
A unique name for bash (the shell)
const RETURN = "return"
A unique name for return command
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cmd ¶
type Cmd struct {
// [Required] A unique name for the command, used as a reference by LLMs (e.g., "bash").
Cmd string
// [Required] A description of the command and its purpose.
// Used to define the command registry for LLMs.
About string
// [Required] Concise instructions on the command's syntax.
// For example: "bash <command>".
Syntax string
// The actual command execution function, which can be defined statically or
// dynamically upon registration.
Run func(*chatter.Reply) (float64, CmdOut, error)
}
A Command defines an external tool or utility available to the agent for task-solving. To ensure usability, each command must include a usage definition and description.
type CmdOne ¶
type CmdOne struct{}
The cmd (command) reasoner set the goal for agent to execute a single command. It returns right after the command return results.
type CmdOut ¶
type CmdOut struct {
// A unique name of the command, used to getnerate output.
Cmd string
// Output of the command.
Output string
}
Container for command results.
type CmdSeq ¶
type CmdSeq struct{}
The sequence of cmd (commands) reasoner set the goal for agent to execute a sequence of commands. The reason returns only after LLM uses return command.
func NewReasonerCmdSeq ¶
func NewReasonerCmdSeq() *CmdSeq
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
The command registry, used by the application to define available tools and commands for workflows. It automates the advertisement of registered commands and their usage rules.
func (*Registry) Decode ¶
Transform LLM response into the command invokation, returns the result of command.