Member Junction
    Preparing search index...

    Interface for LLM-based fallback SQL conversion. Consumers implement this to plug in their LLM provider.

    interface ILLMFallback {
        FixConversion(
            originalSQL: string,
            failedConversion: string,
            error: string,
            sourceDialect: string,
            targetDialect: string,
        ): Promise<{ model?: string; sql: string }>;
    }

    Implemented by

    Index

    Methods

    • Attempt to fix a failed SQL conversion using an LLM.

      Parameters

      • originalSQL: string

        The original source dialect SQL

      • failedConversion: string

        The sqlglot conversion that failed verification

      • error: string

        The error message from verification

      • sourceDialect: string

        Source SQL dialect

      • targetDialect: string

        Target SQL dialect

      Returns Promise<{ model?: string; sql: string }>

      The LLM-corrected SQL, or null if unable to fix