[feat] topp
This commit is contained in:
@@ -299,6 +299,8 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
frequency_penalty: arg.frequencyPenalty || (db.frequencyPenalty / 100),
|
||||
logit_bias: bias,
|
||||
stream: false,
|
||||
topP: db.top_p,
|
||||
|
||||
})
|
||||
|
||||
if(db.generationSeed > 0){
|
||||
@@ -670,6 +672,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
'stopping_strings': stopStrings,
|
||||
'seed': -1,
|
||||
add_bos_token: db.ooba.add_bos_token,
|
||||
topP: db.top_p,
|
||||
prompt: proompt
|
||||
}
|
||||
|
||||
@@ -775,7 +778,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
max_tokens: maxTokens,
|
||||
stop: stopStrings,
|
||||
temperature: temperature,
|
||||
top_p: db.topP
|
||||
topP: db.top_p,
|
||||
}
|
||||
|
||||
const url = new URL(db.textgenWebUIBlockingURL)
|
||||
|
||||
@@ -351,6 +351,7 @@ export function setDatabase(data:Database){
|
||||
data.reverseProxyOobaArgs ??= {
|
||||
mode: 'instruct'
|
||||
}
|
||||
data.top_p ??= 1
|
||||
changeLanguage(data.language)
|
||||
DataBase.set(data)
|
||||
}
|
||||
@@ -542,6 +543,7 @@ export interface Database{
|
||||
huggingfaceKey:string
|
||||
allowAllExtentionFiles?:boolean
|
||||
translatorPrompt:string
|
||||
top_p: number,
|
||||
}
|
||||
|
||||
export interface customscript{
|
||||
@@ -737,6 +739,7 @@ export interface botPreset{
|
||||
localStopStrings?: string[]
|
||||
customProxyRequestModel?: string
|
||||
reverseProxyOobaArgs?: OobaChatCompletionRequestParams
|
||||
top_p?: number
|
||||
|
||||
}
|
||||
|
||||
@@ -930,7 +933,8 @@ export const presetTemplate:botPreset = {
|
||||
ainconfig: cloneDeep(defaultAIN),
|
||||
reverseProxyOobaArgs: {
|
||||
mode: 'instruct'
|
||||
}
|
||||
},
|
||||
top_p: 1
|
||||
|
||||
}
|
||||
|
||||
@@ -986,7 +990,8 @@ export function saveCurrentPreset(){
|
||||
localStopStrings: db.localStopStrings,
|
||||
autoSuggestPrompt: db.autoSuggestPrompt,
|
||||
customProxyRequestModel: db.customProxyRequestModel,
|
||||
reverseProxyOobaArgs: cloneDeep(db.reverseProxyOobaArgs) ?? null
|
||||
reverseProxyOobaArgs: cloneDeep(db.reverseProxyOobaArgs) ?? null,
|
||||
top_p: db.top_p ?? 1
|
||||
}
|
||||
db.botPresets = pres
|
||||
setDatabase(db)
|
||||
@@ -1055,6 +1060,7 @@ export function setPreset(db:Database, newPres: botPreset){
|
||||
db.reverseProxyOobaArgs = cloneDeep(newPres.reverseProxyOobaArgs) ?? {
|
||||
mode: 'instruct'
|
||||
}
|
||||
db.top_p = newPres.top_p ?? 1
|
||||
return db
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user