[feat] add supamemory

This commit is contained in:
kwaroran
2023-05-16 01:56:12 +09:00
parent f157693fbc
commit a68cbfda03
7 changed files with 209 additions and 17 deletions

View File

@@ -9,7 +9,7 @@ import { globalFetch } from "../globalApi";
interface requestDataArgument{
formated: OpenAIChat[]
bias: {[key:number]:number}
currentChar: character
currentChar?: character
temperature?: number
maxTokens?:number
PresensePenalty?: number
@@ -110,7 +110,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
case "textgen_webui":{
let DURL = db.textgenWebUIURL
let bodyTemplate:any
const proompt = stringlizeChat(formated, currentChar.name)
const proompt = stringlizeChat(formated, currentChar?.name ?? '')
const isNewAPI = DURL.includes('api')
const stopStrings = [`\nUser:`,`\nuser:`,`\n${db.username}:`]