rlm

package
v0.0.0-...-cb3f5c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvokeToolLoop

func InvokeToolLoop(ctx context.Context, invoker Invoker, systemPrompt, userPrompt string, tool tools.Definition, audit *transparency.ContextAudit, maxIterations int) (*oneshot.Result, *transparency.Trace, error)

InvokeToolLoop retries tool calls with a guidance prompt when missing a tool invocation.

Types

type CommitRunner

type CommitRunner struct {
	// contains filtered or unexported fields
}

CommitRunner executes commit generation with an RLM-style retry loop.

func NewCommitRunner

func NewCommitRunner(cfg CommitRunnerConfig) *CommitRunner

NewCommitRunner creates a commit runner.

func (*CommitRunner) Run

Run executes the commit generation flow with validation retries.

func (*CommitRunner) RunSimple

func (r *CommitRunner) RunSimple(ctx context.Context) (*commit.CommitResult, error)

RunSimple is a convenience method for simple usage.

type CommitRunnerConfig

type CommitRunnerConfig struct {
	Invoker       Invoker
	Ledger        *transparency.CostLedger
	MaxIterations int
}

CommitRunnerConfig configures the commit runner.

type Invoker

type Invoker interface {
	Invoke(ctx context.Context, systemPrompt, userPrompt string, tool tools.Definition, audit *transparency.ContextAudit) (*oneshot.Result, *transparency.Trace, error)
}

Invoker issues model requests for a one-shot tool call.

type PRRunner

type PRRunner struct {
	// contains filtered or unexported fields
}

PRRunner executes PR generation with an RLM-style retry loop.

func NewPRRunner

func NewPRRunner(cfg PRRunnerConfig) *PRRunner

NewPRRunner creates a PR runner.

func (*PRRunner) Run

func (r *PRRunner) Run(ctx context.Context, opts pr.ContextOptions) (*pr.RunResult, error)

Run executes the PR generation flow with validation retries.

func (*PRRunner) RunSimple

func (r *PRRunner) RunSimple(ctx context.Context) (*pr.PRResult, error)

RunSimple is a convenience method for simple usage.

type PRRunnerConfig

type PRRunnerConfig struct {
	Invoker       Invoker
	Ledger        *transparency.CostLedger
	MaxIterations int
}

PRRunnerConfig configures the PR runner.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL