Documentation
¶
Overview ¶
Package modelfacts keeps what Blitz has learned about models from their own refusals (spec_056_conversation_adapters CA-13, CA-14): a model that refused tools, images, a setting or a stream, or stated its context window or maximum output, has the fact saved per provider and model in ~/.blitz/models.learned.toml, with when and why, so every workspace and every restart knows it. A fact is tried again after Recheck, and `blitz models forget <ref>` clears a model's.
Index ¶
Constants ¶
const ( NoTools = "no_tools" // the model doesn't call tools NoImages = "no_images" // the model doesn't read images NoStream = "no_stream" // the model (or its server) doesn't stream NoParam = "no_param" // the model refuses a setting: Value names it ContextWindow = "context_window" // the model's context window: Value in tokens MaxOutput = "max_output" // the model's maximum output: Value in tokens NoSystem = "no_system" // the model refuses system instructions NoStructured = "no_structured" // the model refuses a response schema NoThinking = "no_thinking" // the model refuses thinking or effort settings NoProvTool = "no_provider_tool" // the model refuses a provider tool: Value names it )
The facts a refusal teaches.
const Recheck = 30 * 24 * time.Hour
Recheck is how long a learned fact holds before the model is asked again: servers and models are updated.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fact ¶
type Fact struct {
Kind string `toml:"kind"`
Value string `toml:"value,omitempty"`
Why string `toml:"why"`
At time.Time `toml:"at"`
}
Fact is one thing learned about a model.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the learned facts, in one file.
func Open ¶
Open is the store at path; the file is read on first use and again whenever it changes (another process learned or forgot something).
func (*Store) Facts ¶
Facts are what's known of provider's model, without those due to be asked again.