Documentation
¶
Overview ¶
Package system2 defines the provider-neutral interface to slow, deliberate reasoning models. Each provider lives in its own subpackage.
Index ¶
- Variables
- func RemoveEmDashes(s string) string
- type About
- type Act
- type Correction
- type Feedback
- type Format
- type GoalTaken
- type LessonLearned
- type Memory
- type Move
- type Permission
- type Promise
- type Reasoner
- type Reminder
- type Request
- type Response
- type Role
- type Send
- type Taste
- type Turn
- type Usage
Constants ¶
This section is empty.
Variables ¶
var ActSchema = map[string]any{"type": "object", "additionalProperties": false, "required": []string{"tool", "args", "why"}, "properties": map[string]any{ "tool": map[string]any{"type": "string", "description": "the tool's name, as listed"}, "args": map[string]any{"type": "string", "description": "its arguments, a JSON object"}, "why": map[string]any{"type": "string", "description": "why, in a few words"}, }}
ActSchema is one tool it proposes to use that changes things.
var ErrCutOff = errors.New("the answer was cut off before it was finished")
Functions ¶
func RemoveEmDashes ¶
RemoveEmDashes punctuates the way a person would without em dashes: a comma between words, a space after other punctuation, nothing at a line's ends. JSON stays valid: an em dash is never part of its syntax.
Types ¶
type Act ¶
type Act struct {
Tool string // e.g. "notes.write_file"
Args string // its arguments, a JSON object
Why string
}
Act is a tool that changes things, proposed: run only once allowed.
type Correction ¶
type LessonLearned ¶
type Move ¶
type Move struct {
Promise string // its ref in the note, e.g. "p1"
By string // local time, "2006-01-02T15:04", or "now"
}
Move is a new time for a promise it already made.
type Permission ¶
type Promise ¶
type Promise struct {
By string // when it will send it, local time, "2006-01-02T15:04"
What string
Ability string // the ability it needs, e.g. "read_article"; "" if it only writes
Query string
As string // the file it sends it as, e.g. "pdf"; "" for a message
Work string // the ref in the note of a work it already made that this sends, e.g. "w2"; "" to make one
}
type Reasoner ¶
func WithoutEmDashes ¶
WithoutEmDashes wraps r so nothing it writes has an em dash. The prompts ask for none; this catches the ones a model writes anyway.
type Request ¶
type Request struct {
Instructions string
History []Turn // oldest first
Note string
Message string // "" when the agent speaks first
MaxOutputTokens int // the most it may write, reasoning included; 0: the provider's default
// CollectFacts asks for the structured fields of Response alongside the reply.
CollectFacts bool
// Format asks for JSON in Response.Text. Not used with CollectFacts.
Format *Format
}
type Response ¶
type Response struct {
Provider string
Text string
// Remember to Goals are filled only with CollectFacts. Permissions,
// Feedback, Lessons, Tastes and Goals count only from the owner.
Remember []Memory
// WhoTheyAre is one sentence with names ("Ada is Daniel's cousin."); "" if not told.
WhoTheyAre string
Reminders []Reminder
Promises []Promise
Permissions []Permission
Corrections []Correction
// Misread is the intent choice the speaker's previous message really was,
// when they said it was misread; "" if not.
Misread string
Feedback []Feedback
Lessons []LessonLearned
Tastes []Taste
Goals []GoalTaken
Send Send
Moves []Move
Acts []Act
Usage Usage
CostUSD float64 // 0 when no price is configured
}