Add supamemory max chunk size and remove deprecated
This commit is contained in:
@@ -266,7 +266,10 @@ export async function supaMemory(
|
||||
|
||||
while(currentTokens > maxContextTokens){
|
||||
const beforeToken = currentTokens
|
||||
let maxChunkSize = maxContextTokens > 3500 ? 1200 : Math.floor(maxContextTokens / 3)
|
||||
let maxChunkSize = Math.floor(maxContextTokens / 3)
|
||||
if(db.maxSupaChunkSize > maxChunkSize){
|
||||
maxChunkSize = db.maxSupaChunkSize
|
||||
}
|
||||
let summarized = false
|
||||
let chunkSize = 0
|
||||
let stringlizedChat = ''
|
||||
|
||||
@@ -15,7 +15,7 @@ import type { OobaChatCompletionRequestParams } from '../model/ooba';
|
||||
|
||||
export const DataBase = writable({} as any as Database)
|
||||
export const loadedStore = writable(false)
|
||||
export let appVer = "1.93.4"
|
||||
export let appVer = "1.93.5"
|
||||
export let webAppSubVer = ''
|
||||
|
||||
export function setDatabase(data:Database){
|
||||
@@ -382,6 +382,7 @@ export function setDatabase(data:Database){
|
||||
data.additionalParams ??= []
|
||||
data.heightMode ??= 'normal'
|
||||
data.antiClaudeOverload ??= false
|
||||
data.maxSupaChunkSize ??= 1200
|
||||
|
||||
changeLanguage(data.language)
|
||||
DataBase.set(data)
|
||||
@@ -616,6 +617,7 @@ export interface Database{
|
||||
useAdvancedEditor:boolean
|
||||
noWaitForTranslate:boolean
|
||||
antiClaudeOverload:boolean
|
||||
maxSupaChunkSize:number
|
||||
}
|
||||
|
||||
export interface customscript{
|
||||
|
||||
Reference in New Issue
Block a user