Documentation
¶
Overview ¶
Package promptdiff computes structural and token diffs between two prompt versions, with README-matching output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CostLine ¶
type CostLine struct {
Model string `json:"model"`
Old float64 `json:"old"`
New float64 `json:"new"`
Delta float64 `json:"delta"`
// Approx is true when Model has no known BPE vocabulary, so the token
// counts behind Old/New/Delta are approximated with cl100k_base rather
// than the model's real tokenizer.
Approx bool `json:"approx"`
}
CostLine is one model row of the cost projection.
type Diff ¶
type Diff struct {
TokenDelta int `json:"token_delta"`
TokenPercent float64 `json:"token_percent"`
Costs []CostLine `json:"costs"`
AddedSections []string `json:"added_sections,omitempty"`
RemovedSections []string `json:"removed_sections,omitempty"`
ModifiedVars []VarChange `json:"modified_vars,omitempty"`
AddedVars []string `json:"added_vars,omitempty"`
RemovedVars []string `json:"removed_vars,omitempty"`
}
Diff is the result of comparing two versions of a prompt.
Click to show internal directories.
Click to hide internal directories.