diff --git a/src/lang/en.ts b/src/lang/en.ts index 0e14e5db..0dfb71bf 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -109,6 +109,7 @@ export const languageEnglish = { genTimes: "This option is used to set the number of responses to generate on support models. other then first response will be act as cached reroll. this can reduce the cost of the model, but it can also increase the cost if you use it without reroll.", requestretrys: "This option is used to set the number of request retrys when request fails.", emotionPrompt: "This option is used to set the prompt that is used to detect emotion. if it is blank, it will use the default prompt.", + removePunctuationHypa: "If enabled, it will remove punctuation before executing HypaMemory.", }, setup: { chooseProvider: "Choose AI Provider", @@ -504,4 +505,5 @@ export const languageEnglish = { openrouterFallback: "Openrouter Fallback", openrouterMiddleOut: "Openrouter Middle Out", geminiApiKey: "Gemini API Key", + removePunctuationHypa: "Remove Punctuation for HypaMemory", } \ No newline at end of file diff --git a/src/lib/Setting/Pages/AdvancedSettings.svelte b/src/lib/Setting/Pages/AdvancedSettings.svelte index 2724fa96..07e302a9 100644 --- a/src/lib/Setting/Pages/AdvancedSettings.svelte +++ b/src/lib/Setting/Pages/AdvancedSettings.svelte @@ -92,6 +92,11 @@ +
+ + + +
{ // access code is "tendo" diff --git a/src/ts/process/memory/supaMemory.ts b/src/ts/process/memory/supaMemory.ts index 905e1b03..5b46f87c 100644 --- a/src/ts/process/memory/supaMemory.ts +++ b/src/ts/process/memory/supaMemory.ts @@ -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)) diff --git a/src/ts/storage/database.ts b/src/ts/storage/database.ts index c1b4b2e9..8fca57ff 100644 --- a/src/ts/storage/database.ts +++ b/src/ts/storage/database.ts @@ -592,7 +592,8 @@ export interface Database{ }, top_k:number claudeAws:boolean - lastPatchNoteCheckVersion?:string + lastPatchNoteCheckVersion?:string, + removePunctuationHypa?:boolean } export interface customscript{