HyperV2 Custom settings enhancement (#511)

# PR Checklist
- [x] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [x] Did you added a type def?

# Description
~No bug, work as intended. But, haven't checked actual summary with it.
Very unstable, need confirmation/check.~
### **NO bug, work as intended, summarizes correctly, moving mainChunks
to chunks works well, no re-summarization issues. It works!**


Added new variable to database.ts, which indicates if HypaV2 Memory is
activated or not.
hypav2: boolean
This was added to stop overlapping of memoryType, when HypaV2 Memory is
selected and supaMemoryModel is changed.

Added supaMemoryType selection, HypaMemoryType selection,
supaMemoryPrompt changing section on OtherBotSettings.svelte, and
implemented on hypav2.ts.
Also added OpenAI key when summarization model is GPT 3.5 instruct.
Also suggested memoryAlgorithmType:string variable on database.ts, to
further add more memory types.

![image](https://github.com/kwaroran/RisuAI/assets/73149145/5d167b03-d7e7-41a1-8875-1780561cd3ac)

fixed minor punctuations, and changed summarize function of
hypav2.ts(same as the one on supaMemory.ts)
This commit is contained in:
kwaroran
2024-06-19 03:49:19 +09:00
committed by GitHub
7 changed files with 305 additions and 178 deletions

View File

@@ -230,8 +230,8 @@ export function setDatabase(data:Database){
if(checkNullish(data.supaMemoryKey)){
data.supaMemoryKey = ""
}
if(checkNullish(data.supaMemoryType)){
data.supaMemoryType = "none"
if(checkNullish(data.supaModelType)){
data.supaModelType = "none"
}
if(checkNullish(data.askRemoval)){
data.askRemoval = true
@@ -527,7 +527,7 @@ export interface Database{
useStreaming:boolean
palmAPI:string,
supaMemoryKey:string
supaMemoryType:string
supaModelType:string
textScreenColor?:string
textBorder?:boolean
textScreenRounded?:boolean
@@ -569,6 +569,8 @@ export interface Database{
useAdditionalAssetsPreview:boolean,
usePlainFetch:boolean
hypaMemory:boolean
hypav2:boolean
memoryAlgorithmType:string // To enable new memory module/algorithms
proxyRequestModel:string
ooba:OobaSettings
ainconfig: AINsettings