feat: add hypav2 button

This commit is contained in:
kwaroran
2024-05-23 07:02:16 +09:00
parent 53b7771ed4
commit 5b7e66723f
4 changed files with 71 additions and 10 deletions

View File

@@ -145,8 +145,10 @@ export async function hypaMemoryV2(
const processer = new HypaProcesser("nomic")
await processer.addText(data.chunks.map((v) => {
return "search_document: " + v.text
await processer.addText(data.chunks.filter(v => {
return v.text.trim().length > 0
}).map((v) => {
return "search_document: " + v.text.trim()
}))
let scoredResults:{[key:string]:number} = {}