Add cache point

This commit is contained in:
Kwaroran
2025-03-08 17:49:19 +09:00
parent 02fb780395
commit 93a53da983
6 changed files with 70 additions and 6 deletions

View File

@@ -40,6 +40,7 @@ export interface OpenAIChat{
attr?:string[]
multimodals?: MultiModal[]
thoughts?: string[]
cachePoint?: boolean
}
export interface MultiModal{
@@ -635,6 +636,9 @@ export async function sendChat(chatProcessIndex = -1,arg:{
supaMemoryCardUsed = true
break
}
case 'cache':{
break
}
}
}
}
@@ -1142,6 +1146,22 @@ export async function sendChat(chatProcessIndex = -1,arg:{
}
pushPrompts(pmt)
break
}
case 'cache':{
let pointer = formated.length - 1
let depthRemaining = card.depth
while(pointer >= 0){
if(depthRemaining === 0){
break
}
if(formated[pointer].role === card.role || card.role === 'all'){
formated[pointer].cachePoint = true
depthRemaining--
}
}
break
}
}
}