pipeline

command
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Demonstrates a multi-step LLM pipeline with Go-side gating. This shape pops up constantly in production agent flows:

  1. generate — ask the model for an initial draft
  2. evaluate — ask the model to score the draft 1-10
  3. gate (Go) — parse the score; decide whether to refine
  4. refine — if needed, ask the model to tighten the draft

All four calls share one opencode session so later prompts see the earlier turns as conversation history. That keeps token usage low and ensures the model is evaluating/refining the same draft it wrote a moment ago.

go run ./examples/pipeline

Jump to

Keyboard shortcuts

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