Skip to main content

ask

Function ask 

Source
pub fn ask(
    conn: &Connection,
    question: &str,
    config: &AskConfig,
) -> Result<AskResponse, AskError>
Expand description

One-shot natural-language → SQL.

Walks conn’s schema, builds a cache-friendly prompt, calls the configured LLM, parses the JSON-shaped reply into AskResponse.

The library does not execute the returned SQL — that’s the caller’s call. See module docs for rationale.