You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
output: "I'm sorry, but I cannot answer that question based on the provided context and chat history.",
isStream: false,
metadata: [ undefined, undefined, undefined, undefined, undefined ],
}
The text was updated successfully, but these errors were encountered:
Problem
When no relevant context is found, the retrieval process returns undefined metadata values in the final output.
Possible Fix
In the Database class:
if (allValuesUndefined) {
console.error("No answer found in the provided context.");
return []; // Return empty array instead of object with empty metadata
}
The text was updated successfully, but these errors were encountered: