note

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 14 Imported by: 1 module, 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 note is the model stage that drafts a model read's note where no person wrote one: questions for the read to answer, why the item was likely saved, how it bears on the owner's current work, a summary and a one-line idea, with how sure the draft is. It reads the item's title, URL and the opening of its reading parse under the read decision's lens, beside that lens's context where a reader is opened for it. Its prompt and answer schema are prompts.Note, one prompt for each lens.

The read gate queues the draft where a read by a model carries no note, and serve's route.AfterDraft decides the read from it once it ends. A draft is a model's answer over outsider text, so it stays on the note's output and never reaches a decision's note.

Index

Constants

View Source
const (
	// Capability is the capability of every note task.
	Capability = store.StageNote
	// Producer names the note's outputs, whose version is the prompt's under
	// the output's lens.
	Producer = "note"
	// DefaultModel and DefaultEffort are what the draft's run is asked for
	// where config names neither.
	DefaultModel  = "haiku"
	DefaultEffort = "medium"
)

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(port modelport.Port, client *worker.Client, contexts lens.Readers, settings modelstage.Settings, log *slog.Logger) worker.Handler

NewHandler is the worker handler that drafts each note through port under modelstage's dispatch-once protocol. It reads each task's parse through client, and its lens's context through contexts.

Types

type Answer

type Answer struct {
	route.Draft
	Relation string `json:"relation"`
	Summary  string `json:"summary"`
	Idea     string `json:"idea"`
}

Answer is the model's answer, as prompts/note/answer.schema.json holds it.

func DecodeAnswer

func DecodeAnswer(raw json.RawMessage) (Answer, error)

DecodeAnswer decodes a stored answer without checking it against this build's schema, which its run's schema checked when it arrived.

func ReadAnswer

func ReadAnswer(p prompts.Prompt, raw json.RawMessage) (Answer, error)

ReadAnswer checks raw against the schema of p, the prompt it answered, and decodes it.

Jump to

Keyboard shortcuts

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