@deepagents/text2sql 0.8.1 → 0.9.0

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.js CHANGED
@@ -2372,15 +2372,6 @@ Break the question into its semantic aspects, and let the SQL specialist figure
2372
2372
  }
2373
2373
  });
2374
2374
 
2375
- // packages/text2sql/src/lib/synthesis/types.ts
2376
- async function toPairs(producer) {
2377
- const pairs = [];
2378
- for await (const chunk of producer.produce()) {
2379
- pairs.push(...chunk);
2380
- }
2381
- return pairs;
2382
- }
2383
-
2384
2375
  // packages/text2sql/src/lib/teach/teachings.ts
2385
2376
  function guidelines(options = {}) {
2386
2377
  const { date = "strict" } = options;
@@ -2618,7 +2609,7 @@ var Text2Sql = class {
2618
2609
  */
2619
2610
  async toPairs(factory) {
2620
2611
  const producer = factory(this.#config.adapter);
2621
- return toPairs(producer);
2612
+ return producer.toPairs();
2622
2613
  }
2623
2614
  // public async suggest() {
2624
2615
  // const [introspection, adapterInfo] = await Promise.all([
@@ -3081,7 +3072,7 @@ async function withChat(history, params, messages, streamFn) {
3081
3072
  } else if (ToolCallRepairError.isInstance(error)) {
3082
3073
  return "The model tried to call a tool with invalid arguments, but it was repaired.";
3083
3074
  } else {
3084
- return "An unknown error occurred.";
3075
+ return JSON.stringify(error);
3085
3076
  }
3086
3077
  },
3087
3078
  sendStart: true,