Add option to remove punctuation for HypaMemory
This commit is contained in:
@@ -142,6 +142,11 @@ export async function supaMemory(
|
||||
if(hypaChunks.length > 0){
|
||||
await hypa.addText(hypaChunks.filter((value, index, self) => {
|
||||
return self.indexOf(value) === index;
|
||||
}).map((value) => {
|
||||
if(db.removePunctuationHypa){
|
||||
value = value.replace(/[\.,\/#!$%\^&\*;:{}=\-_`~()]/g,"")
|
||||
}
|
||||
return value
|
||||
}))
|
||||
const filteredChat = chats.filter((r) => r.role !== 'system' && r.role !== 'function')
|
||||
const s = await hypa.similaritySearch(stringlizeChat(filteredChat.slice(0, 4), char?.name ?? '', false))
|
||||
|
||||
@@ -592,7 +592,8 @@ export interface Database{
|
||||
},
|
||||
top_k:number
|
||||
claudeAws:boolean
|
||||
lastPatchNoteCheckVersion?:string
|
||||
lastPatchNoteCheckVersion?:string,
|
||||
removePunctuationHypa?:boolean
|
||||
}
|
||||
|
||||
export interface customscript{
|
||||
|
||||
Reference in New Issue
Block a user