Add OAI prediction
This commit is contained in:
@@ -796,4 +796,5 @@ export const languageEnglish = {
|
||||
preview: "Preview",
|
||||
recommended: "Recommended",
|
||||
newChat: "New Chat",
|
||||
predictedOutput: "Predicted Output",
|
||||
}
|
||||
@@ -145,6 +145,8 @@
|
||||
<TextAreaInput bind:value={DBState.db.customPromptTemplateToggle}/>
|
||||
<span class="text-textcolor mt-4">{language.defaultVariables} <Help key='defaultVariables' /></span>
|
||||
<TextAreaInput bind:value={DBState.db.templateDefaultVariables}/>
|
||||
<span class="text-textcolor mt-4">{language.predictedOutput}</span>
|
||||
<TextAreaInput bind:value={DBState.db.OAIPrediction}/>
|
||||
<span class="text-textcolor mt-4">{language.groupInnerFormat} <Help key='groupInnerFormat' /></span>
|
||||
<TextAreaInput placeholder={`<{{char}}\'s Message>\n{{slot}}\n</{{char}}\'s Message>`} bind:value={DBState.db.groupTemplate}/>
|
||||
{#if DBState.db.jsonSchemaEnabled}
|
||||
|
||||
@@ -535,6 +535,13 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
||||
}
|
||||
}
|
||||
|
||||
if(db.OAIPrediction){
|
||||
body.prediction = {
|
||||
type: "content",
|
||||
content: db.OAIPrediction
|
||||
}
|
||||
}
|
||||
|
||||
if(aiModel === 'openrouter'){
|
||||
if(db.openrouterFallback){
|
||||
body.route = "fallback"
|
||||
|
||||
@@ -301,6 +301,7 @@ export function setDatabase(data:Database){
|
||||
data.sendWithEnter ??= true
|
||||
data.autoSuggestPrompt ??= defaultAutoSuggestPrompt
|
||||
data.autoSuggestPrefix ??= ""
|
||||
data.OAIPrediction ??= ''
|
||||
data.autoSuggestClean ??= true
|
||||
data.imageCompression ??= true
|
||||
if(!data.formatingOrder.includes('personaPrompt')){
|
||||
@@ -815,6 +816,7 @@ export interface Database{
|
||||
customGUI:string
|
||||
guiHTML:string
|
||||
logShare:boolean
|
||||
OAIPrediction:string
|
||||
}
|
||||
|
||||
export interface customscript{
|
||||
|
||||
Reference in New Issue
Block a user