@querypanel/node-sdk 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -704,6 +704,22 @@ interface AskOptions {
704
704
  * - "v2": Improved pipeline with intent planning, hybrid retrieval, schema linking, and SQL reflection
705
705
  */
706
706
  pipeline?: "v1" | "v2";
707
+ /**
708
+ * Optional OpenAI model id for v2 SQL generation. Omit to use server default.
709
+ */
710
+ model?: string;
711
+ /**
712
+ * Optional additional system prompt text for the v2 pipeline.
713
+ *
714
+ * This is appended to the backend's SQL generator/reflection system prompts
715
+ * (it does not change tenant isolation mechanics; it only guides the LLM).
716
+ *
717
+ * Use this for tenant-specific policies (e.g. retention windows) that must
718
+ * be enforced on every query.
719
+ *
720
+ * Only sent when `pipeline: "v2"`.
721
+ */
722
+ systemPrompt?: string;
707
723
  }
708
724
  /**
709
725
  * Intent analysis result from the v2 pipeline.
package/dist/index.d.ts CHANGED
@@ -704,6 +704,22 @@ interface AskOptions {
704
704
  * - "v2": Improved pipeline with intent planning, hybrid retrieval, schema linking, and SQL reflection
705
705
  */
706
706
  pipeline?: "v1" | "v2";
707
+ /**
708
+ * Optional OpenAI model id for v2 SQL generation. Omit to use server default.
709
+ */
710
+ model?: string;
711
+ /**
712
+ * Optional additional system prompt text for the v2 pipeline.
713
+ *
714
+ * This is appended to the backend's SQL generator/reflection system prompts
715
+ * (it does not change tenant isolation mechanics; it only guides the LLM).
716
+ *
717
+ * Use this for tenant-specific policies (e.g. retention windows) that must
718
+ * be enforced on every query.
719
+ *
720
+ * Only sent when `pipeline: "v2"`.
721
+ */
722
+ systemPrompt?: string;
707
723
  }
708
724
  /**
709
725
  * Intent analysis result from the v2 pipeline.
package/dist/index.js CHANGED
@@ -1721,7 +1721,9 @@ async function ask(client, queryEngine, question, options, signal) {
1721
1721
  ...options.maxRetry ? { max_retry: options.maxRetry } : {},
1722
1722
  ...tenantSettings ? { tenant_settings: tenantSettings } : {},
1723
1723
  ...databaseName ? { database: databaseName } : {},
1724
- ...metadata?.dialect ? { dialect: metadata.dialect } : {}
1724
+ ...metadata?.dialect ? { dialect: metadata.dialect } : {},
1725
+ ...options.model?.trim() ? { model: options.model.trim() } : {},
1726
+ ...options.pipeline === "v2" && options.systemPrompt?.trim() ? { system_prompt: options.systemPrompt.trim() } : {}
1725
1727
  },
1726
1728
  tenantId,
1727
1729
  options.userId,