Rename removePunctuationHypa and change functionality
This commit is contained in:
@@ -505,5 +505,5 @@ export const languageEnglish = {
|
|||||||
openrouterFallback: "Openrouter Fallback",
|
openrouterFallback: "Openrouter Fallback",
|
||||||
openrouterMiddleOut: "Openrouter Middle Out",
|
openrouterMiddleOut: "Openrouter Middle Out",
|
||||||
geminiApiKey: "Gemini API Key",
|
geminiApiKey: "Gemini API Key",
|
||||||
removePunctuationHypa: "Remove Punctuation for HypaMemory",
|
removePunctuationHypa: "Memory Punctuation Removal",
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex items-center mt-4">
|
<div class="flex items-center mt-4">
|
||||||
<Check bind:check={$DataBase.removePunctuationHypa} name={language.removePunctuationHypa}>
|
<Check bind:check={$DataBase.removePunctuationHypa} name={language.removePunctuationHypa}>
|
||||||
<Help key="removePunctuationHypa"/><Help key="experimental"/>
|
<Help key="removePunctuationHypa"/>
|
||||||
</Check>
|
</Check>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center mt-4">
|
<div class="flex items-center mt-4">
|
||||||
|
|||||||
@@ -125,7 +125,11 @@ export async function supaMemory(
|
|||||||
i += 1
|
i += 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
supaMemory = data
|
supaMemory = data
|
||||||
|
if(db.removePunctuationHypa){
|
||||||
|
supaMemory = supaMemory.replace(/[\.,\/#!$%\^&\*;:{}=\-_`~()]/g,"")
|
||||||
|
}
|
||||||
currentTokens += await tokenize(supaMemory)
|
currentTokens += await tokenize(supaMemory)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -376,6 +376,7 @@ export function setDatabase(data:Database){
|
|||||||
data.proomptSettings.maxThoughtTagDepth ??= -1
|
data.proomptSettings.maxThoughtTagDepth ??= -1
|
||||||
data.openrouterFallback ??= true
|
data.openrouterFallback ??= true
|
||||||
data.openrouterMiddleOut ??= false
|
data.openrouterMiddleOut ??= false
|
||||||
|
data.removePunctuationHypa ??= true
|
||||||
|
|
||||||
changeLanguage(data.language)
|
changeLanguage(data.language)
|
||||||
DataBase.set(data)
|
DataBase.set(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user