AskSQL API Reference (core v0.10.0)
    Preparing search index...

    Type Alias ChatStreamEvent

    ChatStreamEvent:
        | { stage: string; type: "stage" }
        | { text: string; type: "token" }
        | {
            autoLimited: boolean;
            collection?: string;
            explanation?: string;
            sql: string;
            type: "sql";
        }
        | { code: string; retryable: boolean; type: "error"; userMessage: string }
        | { type: "done" }

    Streaming event emitted by POST /chat (SSE).

    Type Declaration

    • { stage: string; type: "stage" }
    • { text: string; type: "token" }
    • {
          autoLimited: boolean;
          collection?: string;
          explanation?: string;
          sql: string;
          type: "sql";
      }
      • ReadonlyautoLimited: boolean
      • Optional Readonlycollection?: string

        MongoDB only: the collection the pipeline runs against, required to execute it.

      • Optional Readonlyexplanation?: string
      • Readonlysql: string
      • Readonlytype: "sql"
    • { code: string; retryable: boolean; type: "error"; userMessage: string }
    • { type: "done" }