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 ¶
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 ¶
ReadAnswer checks raw against the schema of p, the prompt it answered, and decodes it.