updates on the changes and fix on the all the pages
This commit is contained in:
@@ -386,7 +386,7 @@ const fetchBookingsInRange = async (start, end) => {
|
||||
let lastPageFetched = 1;
|
||||
|
||||
for (let page = 2; page <= budget && !stoppedEarly; page += 1) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
|
||||
const next = await getBookingsPageCached(page);
|
||||
lastPageFetched = page;
|
||||
if (!next.rows.length) {
|
||||
@@ -2126,7 +2126,7 @@ const matchAndRun = async (text) => {
|
||||
for (const intent of INTENTS) {
|
||||
const params = intent.match(text);
|
||||
if (!params) continue;
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
|
||||
const result = await intent.run(params);
|
||||
if (result) return { ...result, intentId: intent.id, params };
|
||||
}
|
||||
@@ -2194,7 +2194,7 @@ const answerMultiPart = async (text) => {
|
||||
if (segments.length < 2) return null;
|
||||
const results = [];
|
||||
for (const segment of segments) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
|
||||
const r = await matchAndRun(segment);
|
||||
if (r) results.push(r);
|
||||
}
|
||||
@@ -2243,7 +2243,7 @@ export async function answerQuestion(text, context = {}) {
|
||||
// WHAT. Embeddings are good at the former and unreliable at the latter.
|
||||
const params = intent?.match(normalized);
|
||||
if (intent && params) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
|
||||
const result = await intent.run(params);
|
||||
if (result) return { ...result, intentId: intent.id, params, routing: routed };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user