fix: add length check before summarization in HypaV3
This commit is contained in:
@@ -442,6 +442,7 @@ export async function hypaMemoryV3(
|
||||
}
|
||||
|
||||
// Attempt summarization
|
||||
if (toSummarize.length > 0) {
|
||||
const summarizeResult = await retryableSummarize(toSummarize);
|
||||
|
||||
if (!summarizeResult.success) {
|
||||
@@ -458,6 +459,7 @@ export async function hypaMemoryV3(
|
||||
chatMemos: new Set(toSummarize.map((chat) => chat.memo)),
|
||||
isImportant: false,
|
||||
});
|
||||
}
|
||||
|
||||
currentTokens -= toSummarizeTokens;
|
||||
startIdx = endIdx;
|
||||
|
||||
Reference in New Issue
Block a user