inference

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lib

func Lib() (fs.FS, error)

Types

type Bundle

type Bundle struct {
	ID    string
	Input []byte
}

type BundleRenderer

type BundleRenderer interface {
	RenderBundles(template string, specJSON string, previousJSON string) ([]Bundle, error)
}

type Job

type Job interface {
	Name() string
	Build(ctx context.Context, spec SpecDocument, previous Results) ([]Task, error)
}

type Pipeline

type Pipeline struct {
	Jobs     []Job
	Runner   Runner
	Store    Store
	Force    bool
	Limit    int
	Progress Progress
}

func (Pipeline) Exec

func (p Pipeline) Exec(ctx context.Context, spec SpecDocument) (Results, error)

type Progress

type Progress func(jobName, taskID string, cached bool)

type Results

type Results map[string]string

type Runner

type Runner interface {
	Exec(ctx context.Context, task Task) ([]byte, error)
}

type SpecDocument

type SpecDocument struct {
	JSON string
}

type SpecLoader

type SpecLoader interface {
	LoadSpec(ctx context.Context, ref string) (SpecDocument, error)
}

type Store

type Store interface {
	Load(jobName string, taskID string) ([]byte, bool, error)
	Save(jobName string, taskID string, output []byte) error
	LoadAll(jobName string) (string, error)
}

type Task

type Task struct {
	JobName      string
	ID           string
	Input        []byte
	Prompt       string
	OutputSchema []byte
}

Jump to

Keyboard shortcuts

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