feat: add hypav2 button
This commit is contained in:
@@ -6,7 +6,7 @@ import { Capacitor } from "@capacitor/core"
|
||||
import { DataBase, type MessageGenerationInfo } from "./storage/database"
|
||||
|
||||
interface alertData{
|
||||
type: 'error'| 'normal'|'none'|'ask'|'wait'|'selectChar'|'input'|'toast'|'wait2'|'markdown'|'select'|'login'|'tos'|'cardexport'|'requestdata'|'addchar'
|
||||
type: 'error'| 'normal'|'none'|'ask'|'wait'|'selectChar'|'input'|'toast'|'wait2'|'markdown'|'select'|'login'|'tos'|'cardexport'|'requestdata'|'addchar'|'hypaV2',
|
||||
msg: string,
|
||||
submsg?: string
|
||||
}
|
||||
@@ -275,4 +275,11 @@ export function alertRequestData(info:AlertGenerationInfoStoreData){
|
||||
'type': 'requestdata',
|
||||
'msg': info.genInfo.generationId ?? 'none'
|
||||
})
|
||||
}
|
||||
|
||||
export function showHypaV2Alert(){
|
||||
alertStore.set({
|
||||
'type': 'hypaV2',
|
||||
'msg': ""
|
||||
})
|
||||
}
|
||||
@@ -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} = {}
|
||||
|
||||
Reference in New Issue
Block a user