llmstep

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package llmstep implements the "llm" transform primitive: a user-authored LLM step that runs a caller-supplied instruction over the pipeline's data and writes the model's response into State.Rows. Unlike describe-work (which groups commits and always returns text), llm takes its input as-is — State.Rows when an earlier primitive already produced one, otherwise the raw timeline — and its instruction and (optional) output JSON schema come entirely from the step's params.

LLMClient (interfaces.go) is a small in-package interface the engine wires to elelem; llm never talks to a model provider directly.

Index

Constants

View Source
const Name = "llm"

Name is the primitive's registry key.

Variables

View Source
var ErrMissingDependency = errors.New("llm missing required dependency")

ErrMissingDependency is returned by New when llm is nil — the llm primitive cannot run without a client.

View Source
var ErrMissingInstruction = errors.New("llm missing required instruction param")

ErrMissingInstruction is returned by New when the step params omit the required "instruction" field.

Functions

func New

func New(llm LLMClient, rawParams []byte) (transform.Primitive, error)

New builds an llm primitive from llm — the engine's wired LLMClient — and its JSON params, shaped {"instruction": string, "schema": object, "name": string}. instruction is required; schema defaults to nil (plain text output); name defaults to "llm". Returns ErrMissingDependency when llm is nil, or ErrMissingInstruction when instruction is empty.

Types

type LLMClient

type LLMClient interface {
	Complete(
		ctx context.Context,
		instruction, data string,
		schema []byte,
	) (string, error)
}

LLMClient runs one user-authored LLM step over serialized data. schema nil/empty selects a plain-text response; a non-empty schema selects JSON-schema-constrained structured output. The engine wires this to elelem; llm never talks to a model provider directly.

Jump to

Keyboard shortcuts

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