Documentation
¶
Overview ¶
Package suggest provides opt-in LLM-assisted query repair hints. Suggestions are printed to STDERR only and never alter deterministic generate output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct {
// SQL is the raw query text that triggered diagnostics.
SQL string
// Diagnostics is a list of human-readable diagnostic strings.
Diagnostics []string
// SchemaSummary is a short, text representation of relevant schema tables.
SchemaSummary string
}
Input holds the context needed to generate a suggestion.
type Suggester ¶
Suggester generates a repair hint for a query.
func Anthropic ¶
Anthropic returns a Suggester backed by the Anthropic Messages API if ANTHROPIC_API_KEY is set; returns (nil, false) when unconfigured.
func AnthropicWithBaseURL ¶
AnthropicWithBaseURL returns a Suggester using the given base URL instead of the default Anthropic API endpoint. This allows tests to inject a local httptest.Server without making real network calls.
Click to show internal directories.
Click to hide internal directories.