Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOff = errors.New("LLM analysis is off (llm.provider = none)") ErrBudget = errors.New("LLM budget for this change is used up") )
Functions ¶
func EstimateTokens ¶
EstimateTokens uses about 4 characters per token, which is close enough for a budget guard.
Types ¶
type Budget ¶
type Client ¶
Client adds the cache, the budget guard and the JSON validation to a provider.
type Mock ¶
type Mock struct {
Requests []Request
Respond func(Request) (string, error)
// contains filtered or unexported fields
}
Mock is a deterministic provider for tests. Respond decides the reply; it records every request so tests can check what would leave the machine.
type Provider ¶
Click to show internal directories.
Click to hide internal directories.