From 1da5ea528016e8ba2932232f19803e656d7b44e2 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:40:38 +0300 Subject: [PATCH 01/18] #988 Experimental fix for 11labs --- public/scripts/extensions/tts/elevenlabs.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/public/scripts/extensions/tts/elevenlabs.js b/public/scripts/extensions/tts/elevenlabs.js index 72c180cee..fce176b32 100644 --- a/public/scripts/extensions/tts/elevenlabs.js +++ b/public/scripts/extensions/tts/elevenlabs.js @@ -1,3 +1,5 @@ +import { deepClone } from "../../utils.js"; + export { ElevenLabsTtsProvider } class ElevenLabsTtsProvider { @@ -47,18 +49,20 @@ class ElevenLabsTtsProvider { loadSettings(settings) { // Pupulate Provider UI given input settings - if (Object.keys(settings).length == 0) { + if (!settings || Object.keys(settings).length == 0) { console.info("Using default TTS Provider settings") } // Only accept keys defined in defaultSettings - this.settings = this.defaultSettings + this.settings = deepClone(this.defaultSettings); - for (const key in settings){ - if (key in this.settings){ - this.settings[key] = settings[key] - } else { - throw `Invalid setting passed to TTS Provider: ${key}` + if (settings) { + for (const key in settings) { + if (key in this.settings) { + this.settings[key] = settings[key] + } else { + throw `Invalid setting passed to TTS Provider: ${key}` + } } } From 252be20c164a48ba7d602d0881c6b63149c70942 Mon Sep 17 00:00:00 2001 From: Stefan Daniel Schwarz Date: Tue, 22 Aug 2023 23:40:47 +0200 Subject: [PATCH 02/18] Return of the Roleplay Context --- default/settings.json | 2 +- public/context/Roleplay.json | 6 ++++++ public/instruct/! Roleplay.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 public/context/Roleplay.json diff --git a/default/settings.json b/default/settings.json index 49f065a64..dff1428c7 100644 --- a/default/settings.json +++ b/default/settings.json @@ -135,7 +135,7 @@ "instruct": { "enabled": false, "preset": "🧙 Roleplay", - "system_prompt": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.\n\nAvoid repetition, don't loop. Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions.\n\n### Input:", + "system_prompt": "Avoid repetition, don't loop. Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions.", "input_sequence": "\n### Instruction:", "output_sequence": "\n### Response:", "last_output_sequence": "\n### Response (2 paragraphs, engaging, natural, authentic, descriptive, creative):", diff --git a/public/context/Roleplay.json b/public/context/Roleplay.json new file mode 100644 index 000000000..058f0abfe --- /dev/null +++ b/public/context/Roleplay.json @@ -0,0 +1,6 @@ +{ + "name": "🧙 Roleplay", + "story_string": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.\n\n{{#if system}}{{system}}\n\n{{/if}}### Input:\n{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", + "chat_start": "### New Roleplay:", + "example_separator": "### New Roleplay:" +} diff --git a/public/instruct/! Roleplay.json b/public/instruct/! Roleplay.json index 45d202d02..d2ba52874 100644 --- a/public/instruct/! Roleplay.json +++ b/public/instruct/! Roleplay.json @@ -1,6 +1,6 @@ { "name": "🧙 Roleplay", - "system_prompt": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.\n\nAvoid repetition, don't loop. Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions.\n\n### Input:", + "system_prompt": "Avoid repetition, don't loop. Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions.", "input_sequence": "\n### Instruction:", "output_sequence": "\n### Response:", "last_output_sequence": "\n### Response (2 paragraphs, engaging, natural, authentic, descriptive, creative):", From 2ccf029c9b51d6b1e7f5a9c13b88ff3eca63936a Mon Sep 17 00:00:00 2001 From: qHiyokop Date: Thu, 24 Aug 2023 04:08:28 +1000 Subject: [PATCH 03/18] Added Italian translation by qHiyokop --- public/i18n.json | 559 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 557 insertions(+), 2 deletions(-) diff --git a/public/i18n.json b/public/i18n.json index 1df6d2434..be835f3c4 100644 --- a/public/i18n.json +++ b/public/i18n.json @@ -3,7 +3,8 @@ "zh-cn", "ja-jp", "ko-kr", - "ru-ru" + "ru-ru", + "it-it" ], "zh-cn": { "clickslidertips": "点击滑块右侧数字可手动输入", @@ -2227,5 +2228,559 @@ "Select this as default persona for the new chats.": "Выбрать эту как стартовую личность", "Change persona image": "Сменить изображение личности", "Delete persona": "Удалить личность" - } + }, + "it-it": { + "clickslidertips": "consigli per gli slider", + "kobldpresets": "Preset Kobold", + "guikoboldaisettings": "settaggi KoboldAI", + "novelaipreserts": "Preset NovelAI", + "default": "default", + "openaipresets": "Preset OpenAI", + "text gen webio(ooba) presets": "Preset text gen webio(ooba)", + "response legth(tokens)": "lunghezza risposta (in Token)", + "select": "seleziona", + "context size(tokens)": "dimensione contesto (in Token)", + "unlocked": "sbloccato", + "only select modls support context sizes greater than 2048 tokens. proceed only is you know you're doing": "Seleziona il supporto ai modls soltanto se le dimenzioni contesto sono più grandi di 2048 token. Procedi soltanto se sai cosa stai facendo.", + "rep.pen": "rep.pen", + "rep.pen range": "rep.pen range", + "temperature": "temperature", + "Encoder Rep. Pen.": "Encoder Rep. Pen.", + "No Repeat Ngram Size": "Dimensione N-gramma senza ripetizioni", + "Min Length": "lunghezza minima", + "OpenAI Reverse Proxy": "OpenAI Reverse Proxy", + "Alternative server URL (leave empty to use the default value).": "URL del server alternativo (lasciare il campo vuoto per i valori predefiniti).", + "Remove your real OAI API Key from the API panel BEFORE typing anything into this box": "Rimuovi la chiave API di OpenAI dal pannello API PRIMA di scrivere qualsiasi cosa in questa casella", + "We cannot provide support for problems encountered while using an unofficial OpenAI proxy": "Non possiamo offrire supporto per problemi incontrati durante l'utilizzo di un proxy non ufficiale di OpenAI", + "Legacy Streaming Processing": "Processo Streaming Legacy", + "Enable this if the streaming doesn't work with your proxy": "Spunta la casella se lo streaming non funziona con il tuo proxy.", + "Context Size (tokens)": "Grandezza del contesto (in Token)", + "Max Response Length (tokens)": "Lunghezza risposta massima (in Token)", + "Temperature": "Temperature", + "Frequency Penalty": "Frequency Penalty", + "Presence Penalty": "Presence Penalty", + "Top-p": "Top-p", + "Display bot response text chunks as they are generated": "Mostra la risposta del bot mano a mano che viene generata.", + "Top A": "Top A", + "Typical Sampling": "Typical Sampling", + "Tail Free Sampling": "Tail Free Sampling", + "Rep. Pen. Slope": "Rep. Pen. Slope", + "Single-line mode": "Single-line mode", + "Top K": "Top K", + "Top P": "Top P", + "Typical P": "Typical P", + "Do Sample": "Do Sample", + "Add BOS Token": "Aggiungi BOS Token", + "Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative.": "Aggiungi bos_token all'inizio di un prompt. Disabilitarlo potrebbe rendere le risposte più creative.", + "Ban EOS Token": "Blocca EOS Token", + "Ban the eos_token. This forces the model to never end the generation prematurely": "Blocca eos_token. Questo costringe il modello a non concludere prematuramente la generazione del testo.", + "Skip Special Tokens": "Salta Token speciali", + "Beam search": "Ricerca Beam", + "Number of Beams": "Numero di Beam", + "Length Penalty": "Length Penalty", + "Early Stopping": "Early Stoppinga", + "Contrastive search": "Contrastive search", + "Penalty Alpha": "Penalty Alpha", + "Seed": "Seed", + "Inserts jailbreak as a last system message.": "Inserisci il Jailbreak come ultimo messaggio di sistema.", + "This tells the AI to ignore its usual content restrictions.": "Questo suggerisce alla IA di ignorare le restrizioni contestualizzate nella chat.", + "NSFW Encouraged": "Stimolare le risposte NSFW", + "Tell the AI that NSFW is allowed.": "Dice all'IA che il materiale NSFW è permesso.", + "NSFW Prioritized": "Dai la precedenza al materiale NSFW", + "NSFW prompt text goes first in the prompt to emphasize its effect.": "Il prompt NSFW viene inviato per prima per enfatizzarne l'effetto.", + "Streaming": "Streaming", + "Display the response bit by bit as it is generated.": "Mostra la risposta mano a mano che viene generata.", + "When this is off, responses will be displayed all at once when they are complete.": "Quando questa casella è disattivata, le risposte vengono mostrate soltanto una volta che il testo è stato ultimato.", + "Enhance Definitions": "Migliora le definizioni", + "Use OAI knowledge base to enhance definitions for public figures and known fictional characters": "Usa la conoscenza di OpenAI per migliorare le definizioni di personaggi pubblici e personaggi immaginari famosi.", + "Wrap in Quotes": "Invia i messaggi tra virgolette", + "Wrap entire user message in quotes before sending.": "Tutti i messaggi verranno inviati sotto forma di dialogo prima di inviarli.", + "Leave off if you use quotes manually for speech.": "Lascia perdere questa opzione se scrivi già da te le citazioni per rappresentare i dialoghi.", + "Main prompt": "Prompt principale", + "The main prompt used to set the model behavior": "Il prompt principale usato come base per il comportamento del modello.", + "NSFW prompt": "Prompt NSFW", + "Prompt that is used when the NSFW toggle is on": "Prompt utilizzato quando l'opzione NSFW è attiva.", + "Jailbreak prompt": "Jailbreak prompt", + "Prompt that is used when the Jailbreak toggle is on": "Prompt utilizzato quando l'opzione Jailbreak è attiva.", + "Impersonation prompt": "Prompt per l'impersonificazione dell'utente", + "Prompt that is used for Impersonation function": "Prompt utilizzato per la funzione di impersonificazione dell'utente", + "Logit Bias": "Logit Bias", + "Helps to ban or reenforce the usage of certain words": "Aiuta a bloccare o rinforzare l'utilizzo di alcuni tipi di parole.", + "View / Edit bias preset": "Mostra / Modifica bias preset", + "Add bias entry": "Aggiungi voce bias", + "Jailbreak activation message": "Messaggio d'attivazione del Jailbreak", + "Message to send when auto-jailbreak is on.": "Messaggio da inviare quando l'auto-jailbreak è attivato", + "Jailbreak confirmation reply": "Risposta di conferma per il Jailbreak", + "Bot must send this back to confirm jailbreak": "Il bot deve inviare questa risposta per confermare il Jailbreak", + "Character Note": "Note del personaggio", + "Influences bot behavior in its responses": "Influenza il comportamento del bot nelle sue risposte", + "API": "API", + "KoboldAI": "KoboldAI", + "Use Horde": "Usa Horde", + "API url": "Url API", + "Register a Horde account for faster queue times": "Crea un account Horde per tempi di attesa più brevi", + "Learn how to contribute your idle GPU cycles to the Hord": "Impara come fare in modo di usare i tuoi cicli GPU in idle per contribuire a Horde", + "Adjust context size to worker capabilities": "Sistema la grandezza del contesto alle sue capacità operazionali", + "Adjust response length to worker capabilities": "Sistema la lunghezza della risposta alle sue capacità operazionali", + "API key": "Chiave API", + "Register": "Registrati", + "For privacy reasons": "Per motivi di privacy", + "Model": "Modello", + "Hold Control / Command key to select multiple models.": "Mantieni premuto il tasto Control / Comando per selezionare modelli multipli.", + "Horde models not loaded": "Modelli Horde non caricati", + "Not connected": "Non connesso", + "Novel API key": "NovelAI API key", + "Follow": "Segui", + "these directions": "questi suggerimenti", + "to get your NovelAI API key.": "per acquisire la chiave API di NovelAI.", + "Enter it in the box below": "Inserisci la chiave all'interno della casella qui sotto", + "Novel AI Model": "Modello di NovelAI", + "Euterpe": "Euterpe", + "Krake": "Krake", + "No connection": "Nessuna connessione", + "oobabooga/text-generation-webui": "oobabooga/text-generation-webui", + "Make sure you run it with": "assicurati di farlo partire con", + "Blocking API url": "Bloccare l'indirizzo API", + "Streaming API url": "Streaming dell'indirizzo API", + "to get your OpenAI API key.": "per acquisire la tua chiave API di OpenAI.", + "OpenAI Model": "Modello di OpenAI", + "View API Usage Metrics": "Mostra le metriche di utilizzo delle API", + "Bot": "Bot", + "Connect to the API": "Connettiti alle API", + "Auto-connect to Last Server": "Connessione automatica all'ultimo server", + "View hidden API keys": "Mostra le chiavi API nascoste", + "Advanced Formatting": "Formattazione avanzata", + "AutoFormat Overrides": "Sovrascrittura AutoFormat", + "Disable description formatting": "Disabilita la formattazione della descrizione", + "Disable personality formatting": "Disabilita la formattazione della personalità", + "Disable scenario formatting": "Disabilita la formattazione dello scenario", + "Disable example chats formatting": "Disabilita la formattazione degli esempi di chat", + "Disable chat start formatting": "Disabilita la formattazione della chat iniziale", + "Custom Chat Separator": "Separatore di chat personalizzato", + "Instruct mode": "Modalità istruzione", + "Enabled": "Abilita", + "Wrap Sequences with Newline": "Ogni sequenza viene rimandata a capo", + "Include Names": "Includi i nomi", + "System Prompt": "Prompt di sistema", + "Input Sequence": "Sequenza di input", + "Output Sequence": "Sequenza di output", + "System Sequence": "Sequenza di sistema", + "Stop Sequence": "Sequenza d'arresto", + "Context Formatting": "Formattazione del contesto", + "Tokenizer": "Tokenizer", + "None / Estimated": "None / Estimated", + "Sentencepiece (LLaMA)": "Sentencepiece (LLaMA)", + "Token Padding": "Token Padding", + "Always add character's name to prompt": "Aggiungi sempre il nome del personaggio al prompt", + "Keep Example Messages in Prompt": "Mantieni i messaggi d'esempio nel Prompt", + "Remove Empty New Lines from Output": "Rimuovi le linee di testo vuote dall'output", + "Pygmalion Formatting": "Formattazione Pygmalion", + "Disabled for all models": "Disabilita per tutti i modelli", + "Automatic (based on model name)": "Automatico (basato sul nome del modello)", + "Enabled for all models": "Abilita per tutti i modelli", + "Multigen": "Multigen", + "First chunk (tokens)": "Primo pacchetto (in Token)", + "Next chunks (tokens)": "Pacchetto successivo (in Token)", + "Anchors Order": "Anchors Order", + "Character then Style": "Prima il personaggio, successivamente lo stile", + "Style then Character": "Prima lo stile, successivamente il personaggio", + "Character Anchor": "Character Anchor", + "Style Anchor": "Style Anchor", + "World Info": "'Info Mondo'", + "Scan Depth": "Profondità della scansione", + "depth": "Profondità", + "Token Budget": "Budget per i Token", + "budget": "budget", + "Recursive scanning": "Analisi ricorsiva", + "Soft Prompt": "Prompt leggero", + "About soft prompts": "Riguardo i prompt leggeri", + "None": "None", + "User Settings": "Settaggi utente", + "UI Customization": "Personalizzazione dell'interfaccia grafica", + "Avatar Style": "Stile dell'avatar", + "Circle": "Cerchio", + "Rectangle": "Rettangolo", + "Chat Style": "Stile della Chat", + "Default": "Predefinito", + "Bubbles": "Bolle", + "Chat Width (PC)": "Lunghezza della chat (PC)", + "No Blur Effect": "Nessun effetto di sfocatura", + "No Text Shadows": "Nessuna ombreggiatura del testo", + "Waifu Mode": "♡ Modalità Waifu ♡", + "Message Timer": "Timer del messaggio", + "Characters Hotswap": "Hotswap dei personaggi", + "Movable UI Panels": "Pannelli dell'interfaccia grafica movibili", + "Reset Panels": "Ripristina i pannelli", + "UI Colors": "Colori UI", + "Main Text": "Testo principale", + "Italics Text": "Testo in Italic", + "Quote Text": "Testo citato", + "Shadow Color": "Colore dell'ombreggiatura", + "FastUI BG": "FastUI BG", + "Blur Tint": "Tinta della sfocatura", + "Font Scale": "Grandezza del font", + "Blur Strength": "Intensità della sfocatura", + "Text Shadow Width": "Larghezza dell'ombreggiatura del testo", + "UI Theme Preset": "Tema dell'interfaccia grafica", + "Power User Options": "Opzioni Power User", + "Swipes": "Swipes", + "Background Sound Only": "Soltanto il suono di background", + "Auto-load Last Chat": "Carica automaticamente l'ultima chat", + "Auto-save Message Edits": "Salva automaticamente i messaggi editati", + "Auto-fix Markdown": "Correggi automaticamente il testo per la formattazione in Markdown", + "Allow {{char}}: in bot messages": "Permetti {{char}}: nei messaggi del bot", + "Allow {{user}}: in bot messages": "Permetti {{user}}: nei messaggi del bot", + "Auto-scroll Chat": "scorrimento automatico della chat", + "Render Formulas": "Renderizza le formule", + "Send on Enter": "Inviare premendo Invio", + "Always disabled": "Sempre disabilitato", + "Automatic (desktop)": "Automatico (desktop)", + "Always enabled": "Sempre abilitato", + "Name": "Nome", + "Your Avatar": "Il tuo avatar", + "Extensions API:": "Estensioni delle API:", + "SillyTavern-extras": "SillyTavern-extras", + "Auto-connect": "Connessione automatica", + "Active extensions": "Estensione attiva", + "Extension settings": "Estensione delle impostazioni", + "Description": "Descrizione", + "First message": "Messaggio iniziale", + "Group Controls": "Controlli del gruppo", + "Group reply strategy": "Organizzazione per le risposte del gruppo", + "Natural order": "Ordine naturale", + "List order": "Lista dell'ordine", + "Allow self responses": "Permetti la risposta automatica", + "Auto Mode": "Modalità automatica", + "Add Members": "Aggiungi membri", + "Current Members": "Membri correnti", + "text": "Testo", + "Delete": "Elimina", + "Cancel": "Cancella", + "Advanced Defininitions": "Definizioni avanzate", + "Personality summary": "Riassunto della personalità", + "A brief description of the personality": "Una breve descrizione della personalità", + "Scenario": "Scenario", + "Circumstances and context of the dialogue": "Circostanza e contesto del dialogo", + "Talkativeness": "Loquacità", + "How often the chracter speaks in": "Determina la frequenza con la quale il personaggio parla all'interno", + "group chats!": "delle chat di gruppo!", + "Shy": "Timido", + "Normal": "Normale", + "Chatty": "Loquace", + "Examples of dialogue": "Esempi di dialogo", + "Forms a personality more clearly": "Aiuta a formare una personalità in maniera più distinta", + "Save": "Salva", + "World Info Editor": "Editor 'Info Mondo'", + "New Entry": "Nuova voce", + "Export": "Esporta", + "Delete World": "Elimina mondo", + "Chat History": "Cronologia chat", + "Group Chat Scenario Override": "Sovrascrittura dello scenario della chat di gruppo", + "All group members will use the following scenario text instead of what is specified in their character cards.": "Tutti i membri del gruppo useranno il seguente scenario invece di quello specificato nella carta dei personaggi", + "Keywords": "Parole chiave", + "Separate with commas": "Separa con delle virgolette", + "Secondary Required Keywords": "Parole chiave accessorie", + "Content": "Contenuto", + "What this keyword should mean to the AI": "Questa parola chiave cosa dovrebbe significare per L'IA", + "Memo/Note": "Memo/Note", + "Not sent to AI": "Non inviato all'IA", + "Constant": "Costante", + "Selective": "Selettivo", + "Before Char": "Prima di Char", + "After Char": "Dopo Char", + "Insertion Order": "Ordine di inserimento", + "Tokens:": "Token", + "Disable": "Disabilita", + "${characterName}": "${nomePersonaggio}", + "CHAR": "CHAR", + "is typing": "sta scrivendo...", + "Back to parent chat": "Torna indietro nella chat collegata a questa", + "Save bookmark": "Salva nei preferiti", + "Convert to group": "Converti in gruppo", + "Start new chat": "Inizia una nuova chat", + "View past chats": "Mostra chat passate", + "Delete messages": "Elimina messaggi", + "Impersonate": "Impersona", + "Regenerate": "Rigenera", + "PNG": "PNG", + "JSON": "JSON", + "WEBP": "WEBP", + "presets": "preset", + "Message Sound": "Suono del messaggio", + "Author's Note": "Note d'autore", + "Send Jailbreak": "Invia il Jailbreak", + "Replace empty message": "Sostituisci i messaggi vuoti", + "Send this text instead of nothing when the text box is empty.": "Quando il campo di testo è vuoto, invia invece questo messaggio.", + "NSFW avoidance prompt": "NSFW avoidance prompt", + "Prompt that is used when the NSFW toggle is off": "Prompt utilizzato quando la casella NSFW è disabilitata.", + "Advanced prompt bits": "Advanced prompt bits", + "World Info format template": "Formattazione del modello 'Info Mondo'", + "Wraps activated World Info entries before inserting into the prompt. Use {0} to mark a place where the content is inserted.": "Seleziona le informazioni del mondo attualmente attive prima di inserirle nel prompt. Usa {0} per segnalare dove vuoi che il contenuto venga inserito all'interno del prompt.", + "Unrestricted maximum value for the context slider": "Valore massimo illimitato per la grandezza del contesto.", + "Chat Completion Source": "Sorgente IA per la Chat", + "Avoid sending sensitive information to the Horde.": "Evita di inviare informazioni sensibili e personali a Horde", + "Review the Privacy statement": "Leggi l'informativa sulla privacy", + "Learn how to contribute your idel GPU cycles to the Horde": "Impara come fare in modo di usare i tuoi cicli GPU in idle per contribuire a Horde", + "Trusted workers only": "Utilizza solo utenti di fiducia", + "For privacy reasons, your API key will be hidden after you reload the page.": "Per motivi di sicurezza la tua chiave API verrà oscurata dopo aver ricaricato la pagina.", + "-- Horde models not loaded --": "-- Modelli Horde non caricati --", + "Example: http://127.0.0.1:5000/api ": "Esempio: http://127.0.0.1:5000/api", + "No connection...": "Nessuna connessione", + "Get your NovelAI API Key": "Acquisici la chiave API per NovelAI", + "KoboldAI Horde": "KoboldAI Horde", + "Text Gen WebUI (ooba)": "Text Gen WebUI (ooba)", + "NovelAI": "NovelAI", + "Chat Completion (OpenAI, Claude, Window/OpenRouter, Scale)": "Chat Completion (OpenAI, Claude, Window/OpenRouter, Scale)", + "OpenAI API key": "Chiave API OpenAI", + "Trim spaces": "Elimina gli spazi", + "Trim Incomplete Sentences": "Taglia le frasi incomplete", + "Include Newline": "Includere il ritorno a capo", + "Non-markdown strings": "Stringhe di formattazione Non-markdown", + "Replace Macro in Sequences": "Sostituisci le macro nelle sequenze", + "Presets": "Preset", + "Separator": "Separatore", + "Start Reply With": "Inizia la risposta con", + "Show reply prefix in chat": "Mostra il prefix di risposta nella chat", + "Worlds/Lorebooks": "Mondi/Lorebook", + "Active World(s)": "Mondi Attivi", + "Character Lore Insertion Strategy": "Strategia per l'inserimento della lore all'interno del contesto dell'IA", + "Sorted Evenly": "Equamente distribuito", + "Character Lore First": "Per prima la storia del personaggio", + "Global Lore First": "Per prima la lore", + "-- World Info not found --": "-- 'Info Mondo' non trovate --", + "Recursive Scan": "Scannerizzazione ricorsiva", + "Case Sensitive": "Sensibilità alle maiuscole", + "Match whole words": "Abbina mondi interi", + "World/Lore Editor": "Mondo/Editor della storia", + "--- None ---": "--- None ---", + "Comma seperated (ignored if empty)": "Separato dalle virgole (Ignorare se vuoto)", + "Use Probability": "Probabilità di utilizzo", + "Exclude from recursion": "Escludi dalla ricorsività", + "Position:": "Posizione", + "Before Char Defs": "Prima della definizione di Char", + "After Char Defs": "Dopo le definizione di Char", + "Before AN": "Prima delle note d'autore", + "After AN": "Dopo le note d'autore", + "Order:": "Ordine", + "Probability:": "Probabilità:", + "Delete Entry": "Elimina Voce", + "User Message Blur Tint": "Sfocatura tinta per i messaggi dell'utente", + "AI Message Blur Tint": "Sfocatura tinta per i messaggi dell'IA", + "Chat Style:": "Stile Chat", + "Chat Width (PC):": "Larghezza riquadro chat (PC)", + "Chat Timestamps": "Timestamp della chat", + "Message IDs": "ID del Messaggio", + "Prefer Character Card Prompt": "Prompt preferito per la 'Carta Personaggio'", + "Prefer Character Card Jailbreak": "Jailbreak preferito per la 'Carta Personaggio'", + "Press Send to continue": "Premi Invio per continuare", + "Log prompts to console": "Registro prompt a console", + "Never resize avatars": "Non ridimensionare mai l'avatar", + "Show avatar filenames": "Mostra il nome del file dell'avatar", + "Import Card Tags": "Importa i tag della carta", + "Confirm message deletion": "Conferma l'eliminazione del messaggio", + "Spoiler Free Mode": "Modalità Spoiler Free", + "Auto-swipe": "Auto-swipe", + "Minimum generated message length": "Lunghezza minima per i messaggi generati", + "Blacklisted words": "Parole nella lista nera", + "Blacklisted word count to swipe": "Numero delle parole nella lista nera", + "Reload Chat": "Ricarica la chat", + "Not Connected": "Non connesso", + "Persona Management": "Gestione della proprio alterego", + "Persona Description": "Descrizione dell'alterego", + "Before Character Card": "Prima della 'Carta Personaggio'", + "After Character Card": "Dopo la 'Carta Personaggio'", + "Top of Author's Note": "Inizio delle note d'autore", + "Bottom of Author's Note": "Fine delle note d'autore", + "How do I use this?": "Cos'è e cosa posso farci?", + "More...": "Mostra di più...", + "Link to World Info": "Collegamento alle 'Info Mondo'", + "Import Card Lore": "Importa la storia dell carta", + "Scenario Override": "Sovrascrizione dello scenario", + "Rename": "Rinomina", + "Character Description": "Descrizione del personaggio", + "Creator's Notes": "Note del Creatore", + "A-Z": "A-Z", + "Z-A": "Z-A", + "Newest": "Più recente", + "Oldest": "Meno recente", + "Favorites": "Favoriti", + "Recent": "Recente", + "Most chats": "Più sessioni chat", + "Least chats": "Meno sessioni chat", + "Back": "Indietro", + "Prompt Overrides (For OpenAI/Claude/Scale APIs, Window/OpenRouter, and Instruct mode)": "Sovrascrittura del Prompt (Per le API di OpenAI/Claude/Scale, Window/OpenRouter e Instruct mode)", + "Insert {{original}} into either box to include the respective default prompt from system settings.": "Inserisci {{original}} all'intero della casella per includere i rispettivi prompt predefiniti dai settaggi di sistema.", + "Main Prompt": "Prompt Principale", + "Jailbreak": "Jailbreak", + "Creator's Metadata (Not sent with the AI prompt)": "Metadata del creatore (Non viene inviata all'IA)", + "Everything here is optional": "Tutto ciò che si trova qui è opzionale", + "Created by": "Creato da", + "Character Version": "Versione del personaggio", + "Tags to Embed": "Tag da incorporare", + "How often the character speaks in group chats!": "La frequenza con la quale il personaggio parla all'interno delle chat di gruppo!", + "Important to set the character's writing style.": "Esso è importante per impostare lo stile di scrittura del personaggio", + "ATTENTION!": "ATTENZIONE!", + "Samplers Order": "Ordine dei campionatori", + "Samplers will be applied in a top-down order. Use with caution.": "L'ordine dei campioni va dall'alto verso il basso. Usalo con cautela.", + "Repetition Penalty": "Repetition Penalty", + "Epsilon Cutoff": "Epsilon Cutoff", + "Eta Cutoff": "Eta Cutoff", + "Rep. Pen. Range.": "Rep. Pen. Range.", + "Rep. Pen. Freq.": "Rep. Pen. Freq.", + "Rep. Pen. Presence": "Rep. Pen. Presence.", + "Enter it in the box below:": "Inseriscilo nella casella in basso:", + "separate with commas w/o space between": "Separa con le virgole o degli spazi tra di loro", + "Document": "Documento", + "Continue": "Continua", + "Editing:": "Editing:", + "AI reply prefix": "Prefisso di risposta dell'IA", + "Custom Stopping Strings": "Stringhe d'arresto personalizzate", + "JSON serialized array of strings": "Array di stringhe serializzate JSON", + "words you dont want generated separated by comma ','": "Inserisci le parole che non vuoi siano generate, devono essere separate dalle virgole ','", + "Extensions URL": "Estensioni URL", + "API Key": "Chiave API", + "Enter your name": "Inserisci il tuo nome", + "Name this character": "Dai un nome a questo personaggio", + "Search / Create Tags": "Cerca / Crea tag", + "Describe your character's physical and mental traits here.": "Descrivi qui le caratteristiche fisiche e psicologiche del tuo personaggio.", + "This will be the first message from the character that starts every chat.": "Questo sarà il primo messaggio che il personaggio utilizzerà all'inizio di ogni chat.", + "Chat Name (Optional)": "Nome della chat(Opzionale)", + "Filter...": "Filtro...", + "Search...": "Cerca...", + "Any contents here will replace the default Main Prompt used for this character. (v2 spec: system_prompt)": "Ogni elemento racchiuso qui dentro sostituirà il prompt principale predefinito usato da questo personaggio. (v2 spec: system_prompt)", + "Any contents here will replace the default Jailbreak Prompt used for this character. (v2 spec: post_history_instructions)": "Ogni elemento racchiuso qui dentro sostituirà il Jailbreak predefinito usato da questo personaggio. (v2 spec: post_history_instructions)", + "(Botmaker's name / Contact Info)": "(Nome del creatore del bot / Informazioni di contatto)", + "(If you want to track character versions)": "(Se vuoi segnalare la versione del personaggio attuale)", + "(Describe the bot, give use tips, or list the chat models it has been tested on. This will be displayed in the character list.)": "(Descrivi il bot, scrivi dei suggerimenti o informa riguardo i modelli IA su cui è stato testato. Questo verrà mostrato nella lista personaggio)", + "(Write a comma-separated list of tags)": "(Scrivi una lista di tag separati dalle virgole)", + "(A brief description of the personality)": "(Scrivi una breve descrizione della sua personalità)", + "(Circumstances and context of the interaction)": "(Scrivi le circostanze e il contesto della scena)", + "(Examples of chat dialog. Begin each example with START on a new line.)": "(Esempi di dialogo. Inizia ogni esempio con START quando vai a capo.)", + "Injection text (supports parameters)": "Injection text (supporta i parametri)", + "Injection depth": "Profondità dell'Injection", + "Type here...": "Scrivi qui...", + "Comma separated (required)": "Separa le parole con le virgole (necessario)", + "Comma separated (ignored if empty)": "Separa le parole con le virgole (ignora se vuoto)", + "What this keyword should mean to the AI, sent verbatim": "Cosa dovrebbe significare per l'IA questa parola chiave? Riporta tutto fedelmente, parola per parola", + "Not sent to the AI": "Non verrà inviato all'IA", + "(This will be the first message from the character that starts every chat)": "(Questo sarà il primo messaggio inviato dal personaggio all'inizio di ogni chat)", + "Not connected to API!": "Non connesso a nessuna API!", + "AI Response Configuration": "Configurazione della risposta dell'IA", + "AI Configuration panel will stay open": "Se clicchi il lucchetto, il pannello di configurazione dell'IA rimarrà aperto", + "Update current preset": "Aggiorna il preset corrente", + "Create new preset": "Crea un nuovo preset", + "Import preset": "Importa preset", + "Export preset": "Esporta preset", + "Delete the preset": "Cancella il preset", + "Inserts jailbreak as a last system message": "Inserisci il Jailbreak come ultimo messaggio del sistema", + "NSFW block goes first in the resulting prompt": "Il blocco al contenuto NSFW spunterà per primo nel prompt corrente", + "Enables OpenAI completion streaming": "Abilita 'streaming completion' per OpenAI", + "Wrap user messages in quotes before sending": "Mette tra il messaggio dell'utente in virgolette prima di inviare il messaggio", + "Restore default prompt": "Ripristina il prompt predefinito", + "New preset": "Nuovo preset", + "Delete preset": "Elimina preset", + "Restore default jailbreak": "Ripristina il Jailbreak predefinito", + "Restore default reply": "Ripristina la risposta predefinita", + "Restore defaul note": "Ripristina le note predefinite", + "API Connections": "Connessioni API", + "Can help with bad responses by queueing only the approved workers. May slowdown the response time.": "Può aiutare a risolvere il problema delle risposte negative chiedendo di essere messo soltanto in liste di utenti approvati. Potrebbe rallentare i tempi di risposta.", + "Clear your API key": "Cancella la tua chiave API", + "Refresh models": "Aggiorna i modelli", + "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Ottieni i tuoi token per le API di OpenRouter tramite OAuth flow. Verrai reindirizzato alla pagina openrouter.ai", + "Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Verifica la connessione all'API inviando un breve messaggio. Devi comprendere che il messaggio verrà addebitato come tutti gli altri!", + "Create New": "Crea nuovo", + "Edit": "Edita", + "World Info & Soft Prompts": "'Info Mondo' & Soft Prompt", + "Locked = World Editor will stay open": "Se clicchi il lucchetto, l'editor del mondo rimarrà aperto", + "Entries can activate other entries by mentioning their keywords": "Le voci possono attivare altre voci menzionando le loro parole chiave", + "Lookup for the entry keys in the context will respect the case": "Fai attenzione alle parole chiave usate, esse rispetteranno le maiuscole", + "If the entry key consists of only one word, it would not be matched as part of other words": "Se la parola chiave consiste in una sola parola, non verrà accoppiata come parte di altre parole", + "Open all Entries": "Apri tutte le voci", + "Close all Entries": "Chiudi tutte le voci", + "Create": "Crea", + "Import World Info": "Importa 'Info Mondo'", + "Export World Info": "Esporta 'Info Mondo'", + "Delete World Info": "Elimina 'Info Mondo'", + "Rename World Info": "Rinomina 'Info Mondo'", + "Save changes to a new theme file": "Salva i cambiamenti in un nuovo file", + "removes blur and uses alternative background color for divs": "rimuovi la sfocatura e utilizza uno sfondo colorato alternativo per 'divs'", + "If checked and the character card contains a prompt override (System Prompt), use that instead.": "Se la casella viene spuntata e la 'Carta Personaggio' contiene una sovrascrittura del prompt (Prompt di sistema), utilizza quello al suo posto.", + "If checked and the character card contains a jailbreak override (Post History Instruction), use that instead.": "Se la casella viene spuntata e la 'Carta Personaggio' contiene una sovrascrittura del Jailbreak (Post History Instruction), utilizza quello al suo posto.", + "AI Response Formatting": "Formattazione della risposta dell'IA", + "Change Background Image": "Cambia l'immagine dello sfondo", + "Extensions": "Estensioni", + "Click to set a new User Name": "Clicca qui per impostare un nuovo nome utente", + "Click to lock your selected persona to the current chat. Click again to remove the lock.": "Clicca qui per bloccare l'alterego selezionato alla chat corrente. Clicca di nuovo per rimuovere il blocco.", + "Click to set user name for all messages": "Clicca qui per impostare il nome utente per tutti i messaggi", + "Create a dummy persona": "Crea una tuo alterego fittizio", + "Character Management": "Gestione personaggio", + "Locked = Character Management panel will stay open": "Se clicchi il lucchetto, il pannello della Gestione personaggio rimarrà aperto", + "Select/Create Characters": "Seleziona/Crea Personaggi", + "Token counts may be inaccurate and provided just for reference.": "Il conteggio dei Token potrebbe risultare inaccurato, perciò è da utilizzarsi solo come una approssimazione.", + "Click to select a new avatar for this character": "Clicca qui per selezionare un nuovo avatar per questo personaggio", + "Add to Favorites": "Aggiungi ai Favoriti", + "Advanced Definition": "Definizioni Avanzate", + "Character Lore": "Storia del personaggio", + "Export and Download": "Esporta e Scarica", + "Duplicate Character": "Duplica il personaggio", + "Create Character": "Crea un personaggio", + "Delete Character": "Elimina un personaggio", + "View all tags": "Mostra tutti i tag", + "Click to set additional greeting messages": "Clicca qui per impostare ulteriori messaggi iniziali", + "Show / Hide Description and First Message": "Mostra / Nascondi Descrizione e Primo Messaggio", + "Click to select a new avatar for this group": "Clicca qui per selezionare un nuovo avatar per questo gruppo", + "Set a group chat scenario": "Imposta lo scenario per la chat di gruppo", + "Restore collage avatar": "Ripristina il collage dell'avatar", + "Create New Character": "Crea un nuovo personaggio", + "Import Character from File": "Importa un personaggio da un file", + "Import content from external URL": "Importa il contenuto da un URL esterno", + "Create New Chat Group": "Crea una nuova chat di gruppo", + "Characters sorting order": "Ordina Personaggi per:", + "Add chat injection": "Aggiungi 'chat injection'", + "Remove injection": "Elimina injection", + "Remove": "Elimina", + "Select a World Info file for": "Seleziona un file dell'Informazione Mondo per:", + "Primary Lorebook": "Lorebook Principale", + "A selected World Info will be bound to this character as its own Lorebook.": "La selezione di un 'Info Mondo' sarà legato a questo personaggio come il suo personale Lorebook.", + "When generating an AI reply, it will be combined with the entries from a global World Info selector.": "Quando viene generata una risposta della IA, Sarà fuso con le voci dal selettore globale 'Info Mondo'.", + "Exporting a character would also export the selected Lorebook file embedded in the JSON data.": "Esportare un personaggio porterà anche alla esportazione del Lorebook a lui legato nei dati JSON.", + "Additional Lorebooks": "Lorebook Aggiuntivi", + "Associate one or more auxillary Lorebooks with this character.": "Associa uno o più Lorebook ausiliari a questo personaggio.", + "NOTE: These choices are optional and won't be preserved on character export!": "NOTA BENE: Queste scelte sono opzionali e non saranno preservate nel momento dell'esportazione del personaggio!", + "Rename chat file": "Rinomina il file della chat", + "Export JSONL chat file": "Esporta il file della chat in JSONL", + "Download chat as plain text document": "Scarica la chat come documento di testo", + "Delete chat file": "Elimina il file della chat", + "Delete tag": "Elimina tag", + "Translate message": "Traduci messaggio", + "Generate Image": "Genera un'immagine", + "Narrate": "Narra", + "Prompt": "Prompt", + "Create Bookmark": "Crea un segnalibro", + "Copy": "Copia", + "Open bookmark chat": "Apri la chat salvata come segnalibro", + "Confirm": "Conferma", + "Copy this message": "Copia questo messaggio", + "Delete this message": "Cancella questo messaggio", + "Move message up": "Muovi il messaggio in alto", + "Move message down": "Muovi il messaggio in basso", + "Enlarge": "Ingrandisci", + "Temporarily disable automatic replies from this character": "Disabilita temporaneamente le risposte in automatico da parte di questo personaggio", + "Enable automatic replies from this character": "Abilita le risposte in automatico da parte di questo personaggio", + "Trigger a message from this character": "Innesca un messaggio di risposta da parte di questo personaggio", + "Move up": "Muovi sopra", + "Move down": "Muovi sotto", + "View character card": "Mostra la 'Carta Personaggio'", + "Remove from group": "Rimuovi dal gruppo", + "Add to group": "Aggiungi al gruppo", + "Add": "Aggiungi", + "Abort request": "Interrompi la richiesta", + "Send a message": "Invia messaggio", + "Ask AI to write your message for you": "Chiedi all'IA di scrivere un messaggio al posto tuo", + "Continue the last message": "Continua l'ultimo messaggio in chat", + "Bind user name to that avatar": "Lega il nome utente a questo avatar", + "Select this as default persona for the new chats.": "Seleziona questo alterego come predefinito per tutte le nuove chat", + "Change persona image": "Cambia l'immagine del tuo alterego", + "Delete persona": "Elimina il tuo alterego" + } } From 8938ea1d721fcefc268d8aea75c505f255d0fca6 Mon Sep 17 00:00:00 2001 From: Stefan Daniel Schwarz Date: Wed, 23 Aug 2023 20:17:45 +0200 Subject: [PATCH 04/18] auto select presets --- public/scripts/instruct-mode.js | 72 ++++++++++++++++++++++++++++----- public/scripts/power-user.js | 15 ++++++- 2 files changed, 75 insertions(+), 12 deletions(-) diff --git a/public/scripts/instruct-mode.js b/public/scripts/instruct-mode.js index bc75e266d..5881f5966 100644 --- a/public/scripts/instruct-mode.js +++ b/public/scripts/instruct-mode.js @@ -2,7 +2,10 @@ import { saveSettingsDebounced, substituteParams } from "../script.js"; import { selected_group } from "./group-chats.js"; -import { power_user } from "./power-user.js"; +import { + power_user, + context_presets, +} from "./power-user.js"; /** * @type {any[]} Instruct mode presets. @@ -69,6 +72,44 @@ function highlightDefaultPreset() { $('#instruct_set_default').toggleClass('default', power_user.default_instruct === power_user.instruct.preset); } +/** + * Select context template if not already selected. + * @param {string} preset Preset name. + */ +function selectContextPreset(preset) { + // If preset is not already selected, select it + if (power_user.context.preset !== preset) { + $('#context_presets').val(preset).trigger('change'); + toastr.info(`Context Template: preset "${preset}" auto-selected`); + + // If instruct mode is disabled, enable it + if (!power_user.instruct.enabled) { + $('#instruct_enabled').prop('checked', true).trigger('change'); + power_user.instruct.enabled = true; + toastr.info(`Instruct Mode enabled`); + } + } +} + +/** + * Select instruct preset if not already selected. + * @param {string} preset Preset name. + */ +export function selectInstructPreset(preset) { + // If preset is not already selected, select it + if (power_user.instruct.preset !== preset) { + $('#instruct_presets').val(preset).trigger('change'); + toastr.info(`Instruct Mode: preset "${preset}" auto-selected`); + + // If instruct mode is disabled, enable it + if (!power_user.instruct.enabled) { + $('#instruct_enabled').prop('checked', true).trigger('change'); + power_user.instruct.enabled = true; + toastr.info(`Instruct Mode enabled`); + } + } +} + /** * Automatically select instruct preset based on model id. * Otherwise, if default instruct preset is set, selects it. @@ -82,20 +123,17 @@ export function autoSelectInstructPreset(modelId) { } for (const preset of instruct_presets) { - // If activation regex is set, check if it matches the model id - if (preset.activation_regex) { + // If context template matches the preset name + if (power_user.context.preset === preset.name) { + selectInstructPreset(preset.name); + // Else if activation regex is set, check if it matches the model id + } else if (preset.activation_regex) { try { const regex = new RegExp(preset.activation_regex, 'i'); // Stop on first match so it won't cycle back and forth between presets if multiple regexes match if (regex.test(modelId)) { - // If preset is not already selected, select it - if (power_user.instruct.preset !== preset.name) { - $('#instruct_presets').val(preset.name).trigger('change'); - toastr.info(`Instruct mode: preset "${preset.name}" auto-selected`); - - return true; - } + selectInstructPreset(preset.name); } } catch { // If regex is invalid, ignore it @@ -259,6 +297,13 @@ jQuery(() => { saveSettingsDebounced(); }); + $('#instruct_enabled').on('change', function () { + // When instruct mode gets enabled, select context template matching selected instruct preset + if (power_user.instruct.enabled) { + $('#instruct_presets').trigger('change'); + } + }); + $('#instruct_presets').on('change', function () { const name = $(this).find(':selected').val(); const preset = instruct_presets.find(x => x.name === name); @@ -281,6 +326,13 @@ jQuery(() => { } }); + for (const context_preset of context_presets) { + // If context template matches the instruct preset + if (context_preset.name === name) { + selectContextPreset(name); + } + } + highlightDefaultPreset(); }); }); diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 9ccbd7db9..77855ddec 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -20,7 +20,11 @@ import { groups, resetSelectedGroup, } from "./group-chats.js"; -import { loadInstructMode } from "./instruct-mode.js"; +import { + instruct_presets, + loadInstructMode, + selectInstructPreset, +} from "./instruct-mode.js"; import { registerSlashCommand } from "./slash-commands.js"; @@ -204,7 +208,7 @@ let power_user = { let themes = []; let movingUIPresets = []; -let context_presets = []; +export let context_presets = []; const storage_keys = { fast_ui_mode: "TavernAI_fast_ui_mode", @@ -931,6 +935,13 @@ function loadContextSettings() { } } }); + + for (const instruct_preset of instruct_presets) { + // If instruct preset matches the context template + if (instruct_preset.name === name) { + selectInstructPreset(name); + } + } }); } From 9b932dfa15123d67822a34f621c20d91f3a3d02a Mon Sep 17 00:00:00 2001 From: Stefan Daniel Schwarz Date: Wed, 23 Aug 2023 20:24:45 +0200 Subject: [PATCH 05/18] byebye wizard --- public/context/Roleplay.json | 2 +- public/instruct/! Roleplay.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/context/Roleplay.json b/public/context/Roleplay.json index 058f0abfe..46868cc48 100644 --- a/public/context/Roleplay.json +++ b/public/context/Roleplay.json @@ -1,5 +1,5 @@ { - "name": "🧙 Roleplay", + "name": "Roleplay", "story_string": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.\n\n{{#if system}}{{system}}\n\n{{/if}}### Input:\n{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", "chat_start": "### New Roleplay:", "example_separator": "### New Roleplay:" diff --git a/public/instruct/! Roleplay.json b/public/instruct/! Roleplay.json index d2ba52874..597e87ba4 100644 --- a/public/instruct/! Roleplay.json +++ b/public/instruct/! Roleplay.json @@ -1,5 +1,5 @@ { - "name": "🧙 Roleplay", + "name": "Roleplay", "system_prompt": "Avoid repetition, don't loop. Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions.", "input_sequence": "\n### Instruction:", "output_sequence": "\n### Response:", From 031a6cb2a4cc212a4e3a967df11553fed180c5d9 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 23 Aug 2023 21:32:38 +0300 Subject: [PATCH 06/18] Performance and data integrity improvements --- public/script.js | 193 ++++++++++--------- public/scripts/extensions.js | 32 ++- public/scripts/extensions/objective/index.js | 9 +- public/scripts/group-chats.js | 6 + 4 files changed, 146 insertions(+), 94 deletions(-) diff --git a/public/script.js b/public/script.js index e5ed2df03..5e231486c 100644 --- a/public/script.js +++ b/public/script.js @@ -129,6 +129,7 @@ import { getCharaFilename, isDigitsOnly, PAGINATION_TEMPLATE, + waitUntilCondition, } from "./scripts/utils.js"; import { extension_settings, getContext, loadExtensionSettings, processExtensionHelpers, registerExtensionHelper, runGenerationInterceptors, saveMetadataDebounced } from "./scripts/extensions.js"; @@ -314,6 +315,8 @@ let safetychat = [ mes: "You deleted a character/chat and arrived back here for safety reasons! Pick another character!", }, ]; +let chatSaveTimeout; +export let isChatSaving = false; let chat_create_date = 0; let firstRun = false; @@ -350,7 +353,6 @@ let scrollLock = false; const durationSaveEdit = 1000; const saveSettingsDebounced = debounce(() => saveSettings(), durationSaveEdit); export const saveCharacterDebounced = debounce(() => $("#create_button").trigger('click'), durationSaveEdit); -const saveChatDebounced = debounce(() => saveChatConditional(), durationSaveEdit); const system_message_types = { HELP: "help", @@ -623,7 +625,6 @@ let is_api_button_press_novel = false; let api_use_mancer_webui = false; let is_send_press = false; //Send generation -let add_mes_without_animation = false; let this_del_mes = 0; @@ -821,6 +822,11 @@ export function selectCharacterById(id) { return; } + if (isChatSaving) { + toastr.info("Please wait until the chat is saved before switching characters.", "Your chat is still saving..."); + return; + } + if (selected_group && is_group_generating) { return; } @@ -2287,6 +2293,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, setCharacterName(''); } else { console.log('No enabled members found'); + is_send_press = false; return; } } @@ -4133,6 +4140,32 @@ async function renamePastChats(newAvatar, newValue) { } } +function saveChatDebounced() { + const chid = this_chid; + const selectedGroup = selected_group; + + if (chatSaveTimeout) { + console.debug('Clearing chat save timeout'); + clearTimeout(chatSaveTimeout); + } + + chatSaveTimeout = setTimeout(async () => { + if (selectedGroup !== selected_group) { + console.warn('Chat save timeout triggered, but group changed. Aborting.'); + return; + } + + if (chid !== this_chid) { + console.warn('Chat save timeout triggered, but chid changed. Aborting.'); + return; + } + + console.debug('Chat save timeout triggered'); + await saveChatConditional(); + console.debug('Chat saved'); + }, 1000); +} + async function saveChat(chat_name, withMetadata, mesId) { const metadata = { ...chat_metadata, ...(withMetadata || {}) }; let file_name = chat_name ?? characters[this_chid].chat; @@ -4284,7 +4317,6 @@ async function getChat() { chat_create_date = humanizedDateTime(); } await getChatResult(); - saveChatDebounced(); eventSource.emit('chatLoaded', { detail: { id: this_chid, character: characters[this_chid] } }); setTimeout(function () { @@ -4300,26 +4332,9 @@ async function getChat() { async function getChatResult() { name2 = characters[this_chid].name; if (chat.length === 0) { - const firstMes = characters[this_chid].first_mes || default_ch_mes; - const alternateGreetings = characters[this_chid]?.data?.alternate_greetings; - - chat[0] = { - name: name2, - is_user: false, - is_name: true, - send_date: getMessageTimeStamp(), - mes: getRegexedString(firstMes, regex_placement.AI_OUTPUT), - }; - - if (Array.isArray(alternateGreetings) && alternateGreetings.length > 0) { - chat[0]['swipe_id'] = 0; - chat[0]['swipes'] = [chat[0]['mes']].concat( - alternateGreetings.map( - (greeting) => substituteParams(getRegexedString(greeting, regex_placement.AI_OUTPUT)) - ) - ); - chat[0]['swipe_info'] = []; - } + const message = getFirstMessage(); + chat.push(message); + await saveChatConditional(); } printMessages(); select_selected_character(this_chid); @@ -4332,6 +4347,30 @@ async function getChatResult() { } } +function getFirstMessage() { + const firstMes = characters[this_chid].first_mes || default_ch_mes; + const alternateGreetings = characters[this_chid]?.data?.alternate_greetings; + + const message = { + name: name2, + is_user: false, + is_name: true, + send_date: getMessageTimeStamp(), + mes: getRegexedString(firstMes, regex_placement.AI_OUTPUT), + }; + + if (Array.isArray(alternateGreetings) && alternateGreetings.length > 0) { + message['swipe_id'] = 0; + message['swipes'] = message['mes'].concat( + alternateGreetings.map( + (greeting) => substituteParams(getRegexedString(greeting, regex_placement.AI_OUTPUT)) + ) + ); + message['swipe_info'] = []; + } + return message; +} + async function openCharacterChat(file_name) { characters[this_chid]["chat"] = file_name; clearChat(); @@ -4866,7 +4905,7 @@ async function deleteUserAvatar() { if (avatarId === chat_metadata['persona']) { toastr.warning('The locked persona was deleted. You will need to set a new persona for this chat.', 'Persona deleted'); delete chat_metadata['persona']; - saveMetadata(); + await saveMetadata(); } saveSettingsDebounced(); @@ -4875,11 +4914,11 @@ async function deleteUserAvatar() { } } -function lockUserNameToChat() { +async function lockUserNameToChat() { if (chat_metadata['persona']) { console.log(`Unlocking persona for this chat ${chat_metadata['persona']}`); delete chat_metadata['persona']; - saveMetadata(); + await saveMetadata(); if (power_user.persona_show_notifications) { toastr.info('User persona is now unlocked for this chat. Click the "Lock" again to revert.', 'Persona unlocked'); } @@ -4901,7 +4940,7 @@ function lockUserNameToChat() { } chat_metadata['persona'] = user_avatar; - saveMetadata(); + await saveMetadata(); saveSettingsDebounced(); console.log(`Locking persona for this chat ${user_avatar}`); if (power_user.persona_show_notifications) { @@ -6000,23 +6039,38 @@ function hideSwipeButtons() { async function saveMetadata() { if (selected_group) { - await editGroup(selected_group, false, false); + await editGroup(selected_group, true, false); } else { - saveChatDebounced(); + await saveChatConditional(); } } export async function saveChatConditional() { - if (selected_group) { - await saveGroupChat(selected_group, true); - } - else { - await saveChat(); + try { + await waitUntilCondition(() => !isChatSaving, durationSaveEdit, 100); + } catch { + console.warn('Timeout waiting for chat to save'); + return; } - // Save token cache to IndexedDB storage - await saveTokenCache(); + try { + isChatSaving = true; + + if (selected_group) { + await saveGroupChat(selected_group, true); + } + else { + await saveChat(); + } + + // Save token cache to IndexedDB storage + saveTokenCache(); + } catch (error) { + console.error('Error saving chat', error); + } finally { + isChatSaving = false; + } } async function importCharacterChat(formData) { @@ -6448,58 +6502,6 @@ async function createOrEditCharacter(e) { contentType: false, processData: false, success: async function (html) { - if (chat.length === 1 && !selected_group) { - var this_ch_mes = default_ch_mes; - - if ($("#firstmessage_textarea").val() != "") { - this_ch_mes = $("#firstmessage_textarea").val(); - } - - if ( - this_ch_mes != - $.trim( - $("#chat") - .children(".mes") - .children(".mes_block") - .children(".mes_text") - .text() - ) - ) { - // MARK - kingbri: Regex on character greeting message - // May need to be placed somewhere else - this_ch_mes = getRegexedString(this_ch_mes, regex_placement.AI_OUTPUT); - - clearChat(); - chat.length = 0; - chat[0] = {}; - chat[0]["name"] = name2; - chat[0]["is_user"] = false; - chat[0]["is_name"] = true; - chat[0]["mes"] = this_ch_mes; - chat[0]["extra"] = {}; - chat[0]["send_date"] = getMessageTimeStamp(); - - const alternateGreetings = characters[this_chid]?.data?.alternate_greetings; - - if (Array.isArray(alternateGreetings) && alternateGreetings.length > 0) { - chat[0]['swipe_id'] = 0; - chat[0]['swipes'] = []; - chat[0]['swipe_info'] = []; - chat[0]['swipes'][0] = chat[0]['mes']; - - for (let i = 0; i < alternateGreetings.length; i++) { - const alternateGreeting = getRegexedString(alternateGreetings[i], regex_placement.AI_OUTPUT); - chat[0]['swipes'].push(substituteParams(alternateGreeting)); - } - } - - add_mes_without_animation = true; - //console.log('form create submission calling addOneMessage'); - await eventSource.emit(event_types.MESSAGE_RECEIVED, (chat.length - 1)); - addOneMessage(chat[0]); - await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, (chat.length - 1)); - } - } $("#create_button").removeAttr("disabled"); await getOneCharacter(formData.get('avatar_url')); @@ -6510,6 +6512,17 @@ async function createOrEditCharacter(e) { $("#create_button").attr("value", "Save"); crop_data = undefined; eventSource.emit(event_types.CHARACTER_EDITED, { detail: { id: this_chid, character: characters[this_chid] } }); + + if (chat.length === 1 && !selected_group) { + const firstMessage = getFirstMessage(); + chat[0] = firstMessage; + + await eventSource.emit(event_types.MESSAGE_RECEIVED, (chat.length - 1)); + clearChat(); + printMessages(); + await eventSource.emit(event_types.CHARACTER_MESSAGE_RENDERED, (chat.length - 1)); + await saveChatConditional(); + } }, error: function (jqXHR, exception) { $("#create_button").removeAttr("disabled"); @@ -7624,11 +7637,11 @@ $(document).ready(function () { else { if (characters[this_chid].chat == old_filename) { characters[this_chid].chat = newName; - saveCharacterDebounced(); + await createOrEditCharacter(); } } - reloadCurrentChat(); + await reloadCurrentChat(); await delay(250); $("#option_select_chat").trigger('click'); diff --git a/public/scripts/extensions.js b/public/scripts/extensions.js index 07d16cbc2..a365f7f0c 100644 --- a/public/scripts/extensions.js +++ b/public/scripts/extensions.js @@ -14,7 +14,37 @@ export { let extensionNames = []; let manifests = {}; const defaultUrl = "http://localhost:5100"; -export const saveMetadataDebounced = debounce(async () => await getContext().saveMetadata(), 1000); + +let saveMetadataTimeout = null; + +export function saveMetadataDebounced() { + const context = getContext(); + const groupId = context.groupId; + const characterId = context.characterId; + + if (saveMetadataTimeout) { + console.debug('Clearing save metadata timeout'); + clearTimeout(saveMetadataTimeout); + } + + saveMetadataTimeout = setTimeout(async () => { + const newContext = getContext(); + + if (groupId !== newContext.groupId) { + console.warn('Group changed, not saving metadata'); + return; + } + + if (characterId !== newContext.characterId) { + console.warn('Character changed, not saving metadata'); + return; + } + + console.debug('Saving metadata...'); + newContext.saveMetadata(); + console.debug('Saved metadata...'); + }, 1000); +} export const extensionsHandlebars = Handlebars.create(); diff --git a/public/scripts/extensions/objective/index.js b/public/scripts/extensions/objective/index.js index 211d8243c..7ed20b9db 100644 --- a/public/scripts/extensions/objective/index.js +++ b/public/scripts/extensions/objective/index.js @@ -164,7 +164,7 @@ function getNextIncompleteTaskRecurse(task){ } // Set a task in extensionPrompt context. Defaults to first incomplete -function setCurrentTask(taskId = null) { +function setCurrentTask(taskId = null, skipSave = false) { const context = getContext(); // TODO: Should probably null this rather than set empty object @@ -202,7 +202,10 @@ function setCurrentTask(taskId = null) { console.info(`No current task`); } - saveState(); + // Save state if not skipping + if (!skipSave) { + saveState(); + } } function getHighestTaskIdRecurse(task) { @@ -731,7 +734,7 @@ function loadSettings() { $('#objective-check-frequency').val(chat_metadata['objective'].checkFrequency) $('#objective-hide-tasks').prop('checked', chat_metadata['objective'].hideTasks) $('#objective-tasks').prop('hidden', $('#objective-hide-tasks').prop('checked')) - setCurrentTask() + setCurrentTask(null, true) } function addManualTaskCheckUi() { diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index 589809df1..339d477b5 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -63,6 +63,7 @@ import { setScenarioOverride, getCropPopup, system_avatar, + isChatSaving, } from "../script.js"; import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect, tag_map, printTagFilters } from './tags.js'; import { FILTER_TYPES, FilterHelper } from './filters.js'; @@ -1272,6 +1273,11 @@ function updateFavButtonState(state) { } export async function openGroupById(groupId) { + if (isChatSaving) { + toastr.info("Please wait until the chat is saved before switching characters.", "Your chat is still saving..."); + return; + } + if (!groups.find(x => x.id === groupId)) { console.log('Group not found', groupId); return; From 6c56fb0a6db636e1dab04c3bd5239c4f249f424c Mon Sep 17 00:00:00 2001 From: RossAscends <124905043+RossAscends@users.noreply.github.com> Date: Thu, 24 Aug 2023 03:34:20 +0900 Subject: [PATCH 07/18] 500ms delay for sliders on touch devices --- public/script.js | 28 +++++++++++++++++++++++++++- public/style.css | 2 +- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index dc26d9670..1b2ad67b4 100644 --- a/public/script.js +++ b/public/script.js @@ -2823,7 +2823,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, let finalPromt = getCombinedPrompt(false); // Include the entire guidance scale object - const cfgValues = cfgGuidanceScale && cfgGuidanceScale?.value !== 1 ? ({guidanceScale: cfgGuidanceScale, negativePrompt: negativePrompt }) : null; + const cfgValues = cfgGuidanceScale && cfgGuidanceScale?.value !== 1 ? ({ guidanceScale: cfgGuidanceScale, negativePrompt: negativePrompt }) : null; let this_amount_gen = Number(amount_gen); // how many tokens the AI will be requested to generate let this_settings = koboldai_settings[koboldai_setting_names[preset_settings]]; @@ -8008,6 +8008,32 @@ $(document).ready(function () { ////////////////// OPTIMIZED RANGE SLIDER LISTENERS//////////////// + var sliderLocked = true; + var sliderTimer; + + $("input[type='range']").on("touchstart", function () { + // Unlock the slider after 500ms + sliderTimer = setTimeout(function () { + sliderLocked = false; + }, 500); + }); + + $("input[type='range']").on("touchend", function () { + clearTimeout(sliderTimer); + $(this).css('background-color', '') + sliderLocked = true + }); + + $("input[type='range']").on("touchmove", function (event) { + if (sliderLocked) { + event.preventDefault(); + } + else { + $(this).css('background-color', 'var(--SmartThemeQuoteColor)') + } + }); + + const sliders = [ { sliderId: "#amount_gen", diff --git a/public/style.css b/public/style.css index 88b8f0f16..52d157de0 100644 --- a/public/style.css +++ b/public/style.css @@ -3510,4 +3510,4 @@ a { z-index: 10; margin-left: 10px; /* Give some space between the button and search box */ -} +} \ No newline at end of file From 5a02250a1fcced1d8b09c336012862b0409b0a6c Mon Sep 17 00:00:00 2001 From: maver Date: Wed, 23 Aug 2023 20:40:26 +0200 Subject: [PATCH 08/18] Add persona description to prompt manager order --- public/script.js | 1 + public/scripts/PromptManager.js | 10 +++++++ public/scripts/openai.js | 51 +++++++++++++-------------------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/public/script.js b/public/script.js index dc26d9670..ae3875c39 100644 --- a/public/script.js +++ b/public/script.js @@ -2880,6 +2880,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, cyclePrompt: cyclePrompt, systemPromptOverride: systemPrompt, jailbreakPromptOverride: jailbreakPrompt, + personaDescription: personaDescription }, dryRun); generate_data = { prompt: prompt }; diff --git a/public/scripts/PromptManager.js b/public/scripts/PromptManager.js index 59909497f..4e3ca2a35 100644 --- a/public/scripts/PromptManager.js +++ b/public/scripts/PromptManager.js @@ -1772,6 +1772,12 @@ const chatCompletionDefaultPrompts = { "system_prompt": true, "marker": true, }, + { + "identifier": "personaDescription", + "name": "Persona Description", + "system_prompt": true, + "marker": true, + }, ] }; @@ -1788,6 +1794,10 @@ const promptManagerDefaultPromptOrder = [ "identifier": "worldInfoBefore", "enabled": true }, + { + "identifier": "personaDescription", + "enabled": true + }, { "identifier": "charDescription", "enabled": true diff --git a/public/scripts/openai.js b/public/scripts/openai.js index e85506649..5073f742a 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -577,6 +577,7 @@ function populateChatCompletion(prompts, chatCompletion, { bias, quietPrompt, ty addToChatCompletion('charDescription'); addToChatCompletion('charPersonality'); addToChatCompletion('scenario'); + addToChatCompletion('personaDescription') // Collection of control prompts that will always be positioned last const controlPrompts = new MessageCollection('controlPrompts'); @@ -626,34 +627,6 @@ function populateChatCompletion(prompts, chatCompletion, { bias, quietPrompt, ty if (true === afterScenario) chatCompletion.insert(authorsNote, 'scenario'); } - // Persona Description - if (power_user.persona_description) { - const personaDescription = Message.fromPrompt(prompts.get('personaDescription')); - - try { - switch (power_user.persona_description_position) { - case persona_description_positions.BEFORE_CHAR: - chatCompletion.insertAtStart(personaDescription, 'charDescription'); - break; - case persona_description_positions.AFTER_CHAR: - chatCompletion.insertAtEnd(personaDescription, 'charDescription'); - break; - case persona_description_positions.TOP_AN: - chatCompletion.insertAtStart(personaDescription, 'authorsNote'); - break; - case persona_description_positions.BOTTOM_AN: - chatCompletion.insertAtEnd(personaDescription, 'authorsNote'); - break; - } - } catch (error) { - if (error instanceof IdentifierNotFoundError) { - // Error is acceptable in this context - } else { - throw error; - } - } - } - // Decide whether dialogue examples should always be added if (power_user.pin_examples) { populateDialogueExamples(prompts, chatCompletion); @@ -679,10 +652,12 @@ function populateChatCompletion(prompts, chatCompletion, { bias, quietPrompt, ty * @param {string} quietPrompt - The quiet prompt to be used in the conversation. * @param {string} bias - The bias to be added in the conversation. * @param {Object} extensionPrompts - An object containing additional prompts. - * + * @param {string} systemPromptOverride + * @param {string} jailbreakPromptOverride + * @param {string} personaDescription * @returns {Object} prompts - The prepared and merged system and user-defined prompts. */ -function preparePromptsForChatCompletion(Scenario, charPersonality, name2, worldInfoBefore, worldInfoAfter, charDescription, quietPrompt, bias, extensionPrompts, systemPromptOverride, jailbreakPromptOverride) { +function preparePromptsForChatCompletion({Scenario, charPersonality, name2, worldInfoBefore, worldInfoAfter, charDescription, quietPrompt, bias, extensionPrompts, systemPromptOverride, jailbreakPromptOverride, personaDescription} = {}) { const scenarioText = Scenario ? `[Circumstances and context of the dialogue: ${Scenario}]` : ''; const charPersonalityText = charPersonality ? `[${name2}'s personality: ${charPersonality}]` : '' const groupNudge = `[Write the next reply only as ${name2}]`; @@ -695,6 +670,7 @@ function preparePromptsForChatCompletion(Scenario, charPersonality, name2, world { role: 'system', content: charDescription, identifier: 'charDescription' }, { role: 'system', content: charPersonalityText, identifier: 'charPersonality' }, { role: 'system', content: scenarioText, identifier: 'scenario' }, + { role: 'system', content: personaDescription, identifier: 'personaDescription' }, // Unordered prompts without marker { role: 'system', content: oai_settings.nsfw_avoidance_prompt, identifier: 'nsfwAvoidance' }, { role: 'system', content: oai_settings.impersonation_prompt, identifier: 'impersonate' }, @@ -793,6 +769,7 @@ function prepareOpenAIMessages({ cyclePrompt, systemPromptOverride, jailbreakPromptOverride, + personaDescription } = {}, dryRun) { // Without a character selected, there is no way to accurately calculate tokens if (!promptManager.activeCharacter && dryRun) return [null, false]; @@ -805,7 +782,19 @@ function prepareOpenAIMessages({ try { // Merge markers and ordered user prompts with system prompts - const prompts = preparePromptsForChatCompletion(Scenario, charPersonality, name2, worldInfoBefore, worldInfoAfter, charDescription, quietPrompt, bias, extensionPrompts, systemPromptOverride, jailbreakPromptOverride); + const prompts = preparePromptsForChatCompletion({ + Scenario, + charPersonality, + name2, + worldInfoBefore, + worldInfoAfter, + charDescription, + quietPrompt, + bias, + extensionPrompts, + systemPromptOverride, + jailbreakPromptOverride, + personaDescription}); // Fill the chat completion with as much context as the budget allows populateChatCompletion(prompts, chatCompletion, { bias, quietPrompt, type, cyclePrompt }); From 65e595ad48a3bbc8e9bb3f8744ad58a805aaeac8 Mon Sep 17 00:00:00 2001 From: maver Date: Wed, 23 Aug 2023 20:41:13 +0200 Subject: [PATCH 09/18] Increase prompt oder dummy user id by 1 --- public/scripts/openai.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 5073f742a..75cc8da0d 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -339,7 +339,7 @@ function setupChatCompletionPromptManager(openAiSettings) { }, promptOrder: { strategy: 'global', - dummyId: 100000 + dummyId: 100001 }, }; From 58911e9eb8ca6c053dc035978c6c8c543d709cb5 Mon Sep 17 00:00:00 2001 From: deffcolony <61471128+deffcolony@users.noreply.github.com> Date: Wed, 23 Aug 2023 22:15:17 +0200 Subject: [PATCH 10/18] added Dutch (NL) translation --- public/i18n.json | 557 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 556 insertions(+), 1 deletion(-) diff --git a/public/i18n.json b/public/i18n.json index be835f3c4..9fb3ece76 100644 --- a/public/i18n.json +++ b/public/i18n.json @@ -4,7 +4,8 @@ "ja-jp", "ko-kr", "ru-ru", - "it-it" + "it-it", + "nl-nl" ], "zh-cn": { "clickslidertips": "点击滑块右侧数字可手动输入", @@ -2782,5 +2783,559 @@ "Select this as default persona for the new chats.": "Seleziona questo alterego come predefinito per tutte le nuove chat", "Change persona image": "Cambia l'immagine del tuo alterego", "Delete persona": "Elimina il tuo alterego" + }, + "nl-nl": { + "clickslidertips": "klikregel tips", + "kobldpresets": "Kobold sjablonen", + "guikoboldaisettings": "GUI KoboldAI-instellingen", + "novelaipreserts": "NovelAI sjablonen", + "default": "standaard", + "openaipresets": "OpenAI sjablonen", + "text gen webio(ooba) presets": "Tekstgeneratie webio(ooba) sjablonen", + "response length(tokens)": "lengte reactie (in tokens)", + "select": "selecteer", + "context size(tokens)": "contextgrootte (in tokens)", + "unlocked": "ontgrendeld", + "only select modls support context sizes greater than 2048 tokens. proceed only is you know you're doing": "Selecteer alleen modellen die contextgroottes groter dan 2048 tokens ondersteunen. Ga alleen verder als je weet wat je doet!", + "rep.pen": "rep.pen", + "rep.pen range": "rep.pen bereik", + "temperature": "temperatuur", + "Encoder Rep. Pen.": "Encoder Rep. Pen.", + "No Repeat Ngram Size": "Geen herhaal N-gram grootte", + "Min Length": "minimale lengte", + "OpenAI Reverse Proxy": "OpenAI Reverse Proxy", + "Alternative server URL (leave empty to use the default value).": "Alternatieve server-URL (laat leeg om de standaardwaarde te gebruiken).", + "Remove your real OAI API Key from the API panel BEFORE typing anything into this box": "Verwijder je echte OAI API-sleutel uit het API-paneel VOORDAT je iets in dit vak typt", + "We cannot provide support for problems encountered while using an unofficial OpenAI proxy": "Wij kunnen geen ondersteuning bieden voor problemen die zich voordoen bij het gebruik van een niet-officiële OpenAI-proxy", + "Legacy Streaming Processing": "Legacy Streaming Verwerking", + "Enable this if the streaming doesn't work with your proxy": "Schakel dit in als streaming niet werkt met je proxy.", + "Context Size (tokens)": "Contextgrootte (tokens)", + "Max Response Length (tokens)": "Maximale lengte antwoord (tokens)", + "Temperature": "Temperatuur", + "Frequency Penalty": "Frequentie Penalty", + "Presence Penalty": "Aanwezigheid Penalty", + "Top-p": "Top-p", + "Display bot response text chunks as they are generated": "Toon tekstfragmenten van de botreactie tijdens het genereren.", + "Top A": "Top A", + "Typical Sampling": "Typische Sampling", + "Tail Free Sampling": "Staartvrije Sampling", + "Rep. Pen. Slope": "Steilheid repenalisatie", + "Single-line mode": "Enkele-regel modus", + "Top K": "Top K", + "Top P": "Top P", + "Typical P": "Typische P", + "Do Sample": "Do Sample", + "Add BOS Token": "Voeg BOS-token toe", + "Add the bos_token to the beginning of prompts. Disabling this can make the replies more creative.": "Voeg het bos_token toe aan het begin van prompts. Uitschakelen kan zorgen voor creatievere antwoorden.", + "Ban EOS Token": "Blokkeer EOS-token", + "Ban the eos_token. This forces the model to never end the generation prematurely": "Blokkeer het eos_token. Dit dwingt het model om de generatie nooit voortijdig te beëindigen.", + "Skip Special Tokens": "Sla speciale tokens over", + "Beam search": "Beam-zoekopdracht", + "Number of Beams": "Aantal beams", + "Length Penalty": "Penalty Lengte", + "Early Stopping": "Vroegtijdig stoppen", + "Contrastive search": "Contrastieve zoekopdracht", + "Penalty Alpha": "Penalty Alpha", + "Seed": "Seed", + "Inserts jailbreak as a last system message.": "Voegt jailbreak toe als laatste systeembericht.", + "This tells the AI to ignore its usual content restrictions.": "Dit vertelt de AI om zijn gebruikelijke inhoudsbeperkingen te negeren.", + "NSFW Encouraged": "NSFW Aanmoediging", + "Tell the AI that NSFW is allowed.": "Vertel de AI dat NSFW is toegestaan.", + "NSFW Prioritized": "NSFW Prioriteit", + "NSFW prompt text goes first in the prompt to emphasize its effect.": "NSFW-prompttekst staat eerst in de prompt om het effect te benadrukken.", + "Streaming": "Streaming", + "Display the response bit by bit as it is generated.": "Toon het antwoord stukje bij beetje terwijl het wordt gegenereerd.", + "When this is off, responses will be displayed all at once when they are complete.": "Wanneer dit is uitgeschakeld, worden antwoorden in één keer weergegeven wanneer ze compleet zijn.", + "Enhance Definitions": "Verbeter definities", + "Use OAI knowledge base to enhance definitions for public figures and known fictional characters": "Gebruik de OAI-kennisbank om definities van publieke figuren en bekende fictieve personages te verbeteren.", + "Wrap in Quotes": "Wikkel in aanhalingstekens", + "Wrap entire user message in quotes before sending.": "Wikkel het volledige gebruikersbericht in aanhalingstekens voordat je het verzendt.", + "Leave off if you use quotes manually for speech.": "Laat dit uit als je handmatig aanhalingstekens gebruikt voor spraak.", + "Main prompt": "Hoofdprompt", + "The main prompt used to set the model behavior": "De hoofdprompt die wordt gebruikt om het gedrag van het model in te stellen.", + "NSFW prompt": "NSFW-prompt", + "Prompt that is used when the NSFW toggle is on": "Prompt die wordt gebruikt wanneer de NSFW-schakelaar is ingeschakeld.", + "Jailbreak prompt": "Jailbreak-prompt", + "Prompt that is used when the Jailbreak toggle is on": "Prompt die wordt gebruikt wanneer de Jailbreak-schakelaar is ingeschakeld.", + "Impersonation prompt": "Prompt voor impersonatie van gebruiker", + "Prompt that is used for Impersonation function": "Prompt die wordt gebruikt voor de Impersonation-functie van de gebruiker", + "Logit Bias": "Logit Bias", + "Helps to ban or reenforce the usage of certain words": "Helpt bij het verbieden of versterken van het gebruik van bepaalde woorden.", + "View / Edit bias preset": "Bekijk / Bewerk bias-sjabloon", + "Add bias entry": "Bias-item toevoegen", + "Jailbreak activation message": "Activatiebericht voor jailbreak", + "Message to send when auto-jailbreak is on.": "Bericht om te verzenden wanneer auto-jailbreak is ingeschakeld.", + "Jailbreak confirmation reply": "Bevestigingsantwoord voor jailbreak", + "Bot must send this back to confirm jailbreak": "De bot moet dit antwoord sturen om de jailbreak te bevestigen.", + "Character Note": "Karakternotitie", + "Influences bot behavior in its responses": "Beïnvloedt het gedrag van de bot in zijn antwoorden.", + "API": "API", + "KoboldAI": "KoboldAI", + "Use Horde": "Gebruik Horde", + "API url": "API-url", + "Register a Horde account for faster queue times": "Registreer een Horde-account voor snellere wachttijden", + "Learn how to contribute your idle GPU cycles to the Horde": "Leer hoe je je ongebruikte GPU-cycli kunt bijdragen aan de Horde", + "Adjust context size to worker capabilities": "Pas de contextgrootte aan op basis van de capaciteiten van de werker", + "Adjust response length to worker capabilities": "Pas de lengte van het antwoord aan op basis van de capaciteiten van de werker", + "API key": "API-sleutel", + "Register": "Registreren", + "For privacy reasons": "Om privacyredenen", + "Model": "Model", + "Hold Control / Command key to select multiple models.": "Houd de Control / Command-toets ingedrukt om meerdere modellen te selecteren.", + "Horde models not loaded": "Horde-modellen niet geladen", + "Not connected": "Niet verbonden", + "Novel API key": "NovelAI API-sleutel", + "Follow": "Volg", + "these directions": "deze instructies", + "to get your NovelAI API key.": "om je NovelAI API-sleutel te verkrijgen.", + "Enter it in the box below": "Voer het in in het vak hieronder", + "Novel AI Model": "NovelAI-model", + "Euterpe": "Euterpe", + "Krake": "Krake", + "No connection": "Geen verbinding", + "oobabooga/text-generation-webui": "oobabooga/text-generation-webui", + "Make sure you run it with": "Zorg ervoor dat je het uitvoert met", + "Blocking API url": "Blokkerende API-url", + "Streaming API url": "Streaming API-url", + "to get your OpenAI API key.": "om je OpenAI API-sleutel te verkrijgen.", + "OpenAI Model": "OpenAI-model", + "View API Usage Metrics": "Bekijk API-gebruiksstatistieken", + "Bot": "Bot", + "Connect to the API": "Verbind met de API", + "Auto-connect to Last Server": "Automatisch verbinden met de laatste server", + "View hidden API keys": "Bekijk verborgen API-sleutels", + "Advanced Formatting": "Geavanceerde opmaak", + "AutoFormat Overrides": "AutoFormat-overschrijvingen", + "Disable description formatting": "Schakel opmaak van beschrijving uit", + "Disable personality formatting": "Schakel opmaak van persoonlijkheid uit", + "Disable scenario formatting": "Schakel opmaak van scenario uit", + "Disable example chats formatting": "Schakel opmaak van voorbeeldchats uit", + "Disable chat start formatting": "Schakel opmaak van chatstart uit", + "Custom Chat Separator": "Aangepaste chat-scheidingsteken", + "Instruct mode": "Instructiemodus", + "Enabled": "Ingeschakeld", + "Wrap Sequences with Newline": "Wikkel sequenties in met een nieuwe regel", + "Include Names": "Inclusief namen", + "System Prompt": "Systeemprompt", + "Input Sequence": "Invoersequentie", + "Output Sequence": "Uitvoersequentie", + "System Sequence": "Systeemsequentie", + "Stop Sequence": "Stopsequentie", + "Context Formatting": "Contextopmaak", + "Tokenizer": "Tokenizer", + "None / Estimated": "Geen / Geschat", + "Sentencepiece (LLaMA)": "Sentencepiece (LLaMA)", + "Token Padding": "Token-vulling", + "Always add character's name to prompt": "Voeg altijd de naam van het personage toe aan de prompt", + "Keep Example Messages in Prompt": "Behoud voorbeeldberichten in de prompt", + "Remove Empty New Lines from Output": "Verwijder lege regels uit de uitvoer", + "Pygmalion Formatting": "Pygmalion-opmaak", + "Disabled for all models": "Uitgeschakeld voor alle modellen", + "Automatic (based on model name)": "Automatisch (op basis van modelnaam)", + "Enabled for all models": "Ingeschakeld voor alle modellen", + "Multigen": "Multigen", + "First chunk (tokens)": "Eerste stuk (tokens)", + "Next chunks (tokens)": "Volgende stukken (tokens)", + "Anchors Order": "Ankersvolgorde", + "Character then Style": "Personage dan Stijl", + "Style then Character": "Stijl dan Personage", + "Character Anchor": "Personage Anker", + "Style Anchor": "Stijl Anker", + "World Info": "'Wereldinformatie'", + "Scan Depth": "Scandiepte", + "depth": "diepte", + "Token Budget": "Token-budget", + "budget": "budget", + "Recursive scanning": "Recursieve scanning", + "Soft Prompt": "Zachte prompt", + "About soft prompts": "Over zachte prompts", + "None": "Geen", + "User Settings": "Gebruikersinstellingen", + "UI Customization": "UI-aanpassing", + "Avatar Style": "Avatarstijl", + "Circle": "Cirkel", + "Rectangle": "Rechthoek", + "Chat Style": "Chatstijl", + "Default": "Standaard", + "Bubbles": "Bellen", + "Chat Width (PC)": "Chatbreedte (PC)", + "No Blur Effect": "Geen vervagingseffect", + "No Text Shadows": "Geen tekstschaduwen", + "Waifu Mode": "♡ Waifu-modus ♡", + "Message Timer": "Berichttimer", + "Characters Hotswap": "Personages Hotswap", + "Movable UI Panels": "Verplaatsbare UI-panelen", + "Reset Panels": "Herstel panelen", + "UI Colors": "UI-kleuren", + "Main Text": "Hoofdtekst", + "Italics Text": "Schuingedrukte tekst", + "Quote Text": "Geciteerde tekst", + "Shadow Color": "Schaduwkleur", + "FastUI BG": "FastUI BG", + "Blur Tint": "Vervagingskleur", + "Font Scale": "Lettergrootte", + "Blur Strength": "Vervagingssterkte", + "Text Shadow Width": "Tekstschaduwbreedte", + "UI Theme Preset": "UI-thema-sjabloon", + "Power User Options": "Geavanceerde gebruikersopties", + "Swipes": "Veegbewegingen", + "Background Sound Only": "Alleen achtergrondgeluid", + "Auto-load Last Chat": "Automatisch laatste chat laden", + "Auto-save Message Edits": "Automatisch berichtbewerkingen opslaan", + "Auto-fix Markdown": "Automatische Markdown-correctie", + "Allow {{char}}: in bot messages": "Toestaan {{char}}: in botberichten", + "Allow {{user}}: in bot messages": "Toestaan {{user}}: in botberichten", + "Auto-scroll Chat": "Automatisch scrollen chat", + "Render Formulas": "Formules weergeven", + "Send on Enter": "Verzenden bij Enter", + "Always disabled": "Altijd uitgeschakeld", + "Automatic (desktop)": "Automatisch (desktop)", + "Always enabled": "Altijd ingeschakeld", + "Name": "Naam", + "Your Avatar": "Je Avatar", + "Extensions API:": "Uitbreidingen API:", + "SillyTavern-extras": "SillyTavern-extras", + "Auto-connect": "Automatisch verbinden", + "Active extensions": "Actieve uitbreidingen", + "Extension settings": "Uitbreidingsinstellingen", + "Description": "Beschrijving", + "First message": "Eerste bericht", + "Group Controls": "Groepsbediening", + "Group reply strategy": "Strategie voor groepsantwoorden", + "Natural order": "Natuurlijke volgorde", + "List order": "Lijstvolgorde", + "Allow self responses": "Toestaan zelfantwoorden", + "Auto Mode": "Automatische modus", + "Add Members": "Leden toevoegen", + "Current Members": "Huidige leden", + "text": "Tekst", + "Delete": "Verwijderen", + "Cancel": "Annuleren", + "Advanced Defininitions": "Geavanceerde definities", + "Personality summary": "Persoonlijkheidssamenvatting", + "A brief description of the personality": "Een korte beschrijving van de persoonlijkheid", + "Scenario": "Scenario", + "Circumstances and context of the dialogue": "Omstandigheden en context van de dialoog", + "Talkativeness": "Spreekzaamheid", + "How often the chracter speaks in": "Hoe vaak het personage spreekt in", + "group chats!": "groepschats!", + "Shy": "Verlegen", + "Normal": "Normaal", + "Chatty": "Praterig", + "Examples of dialogue": "Voorbeelden van dialoog", + "Forms a personality more clearly": "Vormt een persoonlijkheid duidelijker", + "Save": "Opslaan", + "World Info Editor": "Wereldinformatie Editor", + "New Entry": "Nieuwe invoer", + "Export": "Exporteren", + "Delete World": "Wereld verwijderen", + "Chat History": "Chatgeschiedenis", + "Group Chat Scenario Override": "Groepschat Scenario Overschrijving", + "All group members will use the following scenario text instead of what is specified in their character cards.": "Alle groepsleden zullen de volgende scenario-tekst gebruiken in plaats van wat is gespecificeerd in hun karakterkaarten.", + "Keywords": "Sleutelwoorden", + "Separate with commas": "Scheiden met komma's", + "Secondary Required Keywords": "Secundaire Vereiste Sleutelwoorden", + "Content": "Inhoud", + "What this keyword should mean to the AI": "Wat dit sleutelwoord voor de AI zou moeten betekenen", + "Memo/Note": "Memo/Notitie", + "Not sent to AI": "Niet naar AI gestuurd", + "Constant": "Constante", + "Selective": "Selectief", + "Before Char": "Voor Char", + "After Char": "Na Char", + "Insertion Order": "Invoegingsvolgorde", + "Tokens:": "Tokens:", + "Disable": "Uitschakelen", + "${characterName}": "${karakterNaam}", + "CHAR": "CHAR", + "is typing": "is aan het typen...", + "Back to parent chat": "Terug naar ouderlijke chat", + "Save bookmark": "Bladwijzer opslaan", + "Convert to group": "Converteren naar groep", + "Start new chat": "Nieuwe chat starten", + "View past chats": "Bekijk vorige chats", + "Delete messages": "Berichten verwijderen", + "Impersonate": "Imiteren", + "Regenerate": "Regenereren", + "PNG": "PNG", + "JSON": "JSON", + "WEBP": "WEBP", + "presets": "sjablonen", + "Message Sound": "Berichtgeluid", + "Author's Note": "Notitie van auteur", + "Send Jailbreak": "Stuur Jailbreak", + "Replace empty message": "Vervang leeg bericht", + "Send this text instead of nothing when the text box is empty.": "Stuur deze tekst in plaats van niets wanneer het tekstvak leeg is.", + "NSFW avoidance prompt": "NSFW vermijdingsprompt", + "Prompt that is used when the NSFW toggle is off": "Prompt die wordt gebruikt wanneer de NSFW-schakelaar is uitgeschakeld.", + "Advanced prompt bits": "Geavanceerde prompt-bits", + "World Info format template": "Wereldinformatie opmaak sjablonen", + "Wraps activated World Info entries before inserting into the prompt. Use {0} to mark a place where the content is inserted.": "Wikkelt geactiveerde Wereldinformatie-invoeren in voordat ze in de prompt worden ingevoegd. Gebruik {0} om een plek aan te geven waar de inhoud wordt ingevoegd.", + "Unrestricted maximum value for the context slider": "Onbeperkte maximale waarde voor de context schuifregelaar", + "Chat Completion Source": "Bron voor Chatvervulling", + "Avoid sending sensitive information to the Horde.": "Vermijd het verzenden van gevoelige informatie naar de Horde.", + "Review the Privacy statement": "Bekijk de Privacyverklaring", + "Learn how to contribute your idel GPU cycles to the Horde": "Leer hoe je je ongebruikte GPU-cycli kunt bijdragen aan de Horde", + "Trusted workers only": "Alleen vertrouwde medewerkers", + "For privacy reasons, your API key will be hidden after you reload the page.": "Om privacyredenen wordt je API-sleutel verborgen nadat je de pagina opnieuw hebt geladen.", + "-- Horde models not loaded --": "-- Horde-modellen niet geladen --", + "Example: http://127.0.0.1:5000/api ": "Voorbeeld: http://127.0.0.1:5000/api", + "No connection...": "Geen verbinding...", + "Get your NovelAI API Key": "Krijg je NovelAI API-sleutel", + "KoboldAI Horde": "KoboldAI Horde", + "Text Gen WebUI (ooba)": "Tekst Gen WebUI (ooba)", + "NovelAI": "NovelAI", + "Chat Completion (OpenAI, Claude, Window/OpenRouter, Scale)": "Chatvervulling (OpenAI, Claude, Window/OpenRouter, Scale)", + "OpenAI API key": "OpenAI API-sleutel", + "Trim spaces": "Spaties verwijderen", + "Trim Incomplete Sentences": "Onvolledige zinnen bijsnijden", + "Include Newline": "Nieuwe regel opnemen", + "Non-markdown strings": "Niet-Markdown-teksten", + "Replace Macro in Sequences": "Macro vervangen in sequenties", + "Presets": "sjablonen", + "Separator": "Scheidingsteken", + "Start Reply With": "Begin antwoord met", + "Show reply prefix in chat": "Toon antwoordvoorvoegsel in chat", + "Worlds/Lorebooks": "Werelden/Loreboeken", + "Active World(s)": "Actieve Wereld(en)", + "Character Lore Insertion Strategy": "Karakter Lore Invoegstrategie", + "Sorted Evenly": "Gelijkmatig gesorteerd", + "Character Lore First": "Karakter Lore Eerst", + "Global Lore First": "Globale Lore Eerst", + "-- World Info not found --": "-- Wereldinformatie niet gevonden --", + "Recursive Scan": "Recursieve Scan", + "Case Sensitive": "Hoofdlettergevoelig", + "Match whole words": "Hele woorden matchen", + "World/Lore Editor": "Wereld/Lore Editor", + "--- None ---": "--- Geen ---", + "Comma seperated (ignored if empty)": "Komma gescheiden (genegeerd als leeg)", + "Use Probability": "Gebruik Waarschijnlijkheid", + "Exclude from recursion": "Uitsluiten van recursie", + "Position:": "Positie:", + "Before Char Defs": "Voor Char Definities", + "After Char Defs": "Na Char Definities", + "Before AN": "Voor Auteur Notities", + "After AN": "Na Auteur Notities", + "Order:": "Volgorde:", + "Probability:": "Waarschijnlijkheid:", + "Delete Entry": "Verwijder Invoer", + "User Message Blur Tint": "Vervagingstint Gebruiker Bericht", + "AI Message Blur Tint": "Vervagingstint AI Bericht", + "Chat Style:": "Chatstijl:", + "Chat Width (PC):": "Chat Breedte (PC):", + "Chat Timestamps": "Chat Tijdstempels", + "Message IDs": "Bericht ID's", + "Prefer Character Card Prompt": "Voorkeur Karakter Kaart Prompt", + "Prefer Character Card Jailbreak": "Voorkeur Karakter Kaart Jailbreak", + "Press Send to continue": "Druk op Verzenden om door te gaan", + "Log prompts to console": "Logboek van prompts naar console", + "Never resize avatars": "Avatars nooit formaat aanpassen", + "Show avatar filenames": "Laat avatar bestandsnamen zien", + "Import Card Tags": "Importeer Kaart Tags", + "Confirm message deletion": "Bevestig verwijdering van bericht", + "Spoiler Free Mode": "Spoiler Vrije Modus", + "Auto-swipe": "Automatisch swipen", + "Minimum generated message length": "Minimale gegenereerde berichtlengte", + "Blacklisted words": "Geblokkeerde woorden", + "Blacklisted word count to swipe": "Geblokkeerd woordaantal om te swipen", + "Reload Chat": "Chat Herladen", + "Not Connected": "Niet Verbonden", + "Persona Management": "Persona Beheer", + "Persona Description": "Persona Beschrijving", + "Before Character Card": "Voor Karakter Kaart", + "After Character Card": "Na Karakter Kaart", + "Top of Author's Note": "Bovenkant van Auteur Notitie", + "Bottom of Author's Note": "Onderkant van Auteur Notitie", + "How do I use this?": "Hoe gebruik ik dit?", + "More...": "Meer...", + "Link to World Info": "Link naar Wereldinformatie", + "Import Card Lore": "Importeer Kaart Lore", + "Scenario Override": "Scenario Overschrijving", + "Rename": "Hernoemen", + "Character Description": "Karakter Beschrijving", + "Creator's Notes": "Notities van Maker", + "A-Z": "A-Z", + "Z-A": "Z-A", + "Newest": "Nieuwste", + "Oldest": "Oudste", + "Favorites": "Favorieten", + "Recent": "Recent", + "Most chats": "Meeste chats", + "Least chats": "Minste chats", + "Back": "Terug", + "Prompt Overrides (For OpenAI/Claude/Scale APIs, Window/OpenRouter, and Instruct mode)": "Prompt Overschrijvingen (Voor OpenAI/Claude/Scale APIs, Window/OpenRouter, en Instruct modus)", + "Insert {{original}} into either box to include the respective default prompt from system settings.": "Voeg {{original}} in in een van de vakken om het respectievelijke standaard prompt van systeeminstellingen op te nemen.", + "Main Prompt": "Hoofd Prompt", + "Jailbreak": "Jailbreak", + "Creator's Metadata (Not sent with the AI prompt)": "Metadata van Maker (Niet verzonden met de AI-prompt)", + "Everything here is optional": "Alles hier is optioneel", + "Created by": "Gemaakt door", + "Character Version": "Karakter Versie", + "Tags to Embed": "In te bedden tags", + "How often the character speaks in group chats!": "Hoe vaak het personage spreekt in groepschats!", + "Important to set the character's writing style.": "Belangrijk om de schrijfstijl van het personage in te stellen", + "ATTENTION!": "AANDACHT!", + "Samplers Order": "Monsters Bestelling", + "Samplers will be applied in a top-down order. Use with caution.": "Monsters worden toegepast in een top-down volgorde. Gebruik met voorzichtigheid.", + "Repetition Penalty": "Herhalings Penalty", + "Epsilon Cutoff": "Epsilon Cutoff", + "Eta Cutoff": "Eta Cutoff", + "Rep. Pen. Range.": "Herh. Pen. Bereik.", + "Rep. Pen. Freq.": "Herh. Pen. Freq.", + "Rep. Pen. Presence": "Herh. Pen. Aanwezigheid.", + "Enter it in the box below:": "Voer het in bij het onderstaande vak:", + "separate with commas w/o space between": "scheiden met komma's zonder spaties ertussen", + "Document": "Document", + "Continue": "Doorgaan", + "Editing:": "Bewerken:", + "AI reply prefix": "AI antwoord voorvoegsel", + "Custom Stopping Strings": "Aangepaste Stopwoorden", + "JSON serialized array of strings": "JSON geserialiseerde array van teksten", + "words you dont want generated separated by comma ','": "woorden die je niet wilt genereren gescheiden door komma ','", + "Extensions URL": "Extensies URL", + "API Key": "API-sleutel", + "Enter your name": "Voer je naam in", + "Name this character": "Geef dit personage een naam", + "Search / Create Tags": "Zoek / Maak Tags", + "Describe your character's physical and mental traits here.": "Beschrijf hier de fysieke en mentale kenmerken van je personage.", + "This will be the first message from the character that starts every chat.": "Dit zal het eerste bericht zijn van het personage dat elke chat start.", + "Chat Name (Optional)": "Chat Naam (Optioneel)", + "Filter...": "Filteren...", + "Search...": "Zoeken...", + "Any contents here will replace the default Main Prompt used for this character. (v2 spec: system_prompt)": "Elke inhoud hier zal het standaard Hoofd Prompt vervangen dat voor dit personage wordt gebruikt. (v2 specificatie: systeem_prompt)", + "Any contents here will replace the default Jailbreak Prompt used for this character. (v2 spec: post_history_instructions)": "Elke inhoud hier zal het standaard Jailbreak Prompt vervangen dat voor dit personage wordt gebruikt. (v2 specificatie: post_history_instructions)", + "(Botmaker's name / Contact Info)": "(Naam van botmaker / Contactgegevens)", + "(If you want to track character versions)": "(Als je de versies van het personage wilt bijhouden)", + "(Describe the bot, give use tips, or list the chat models it has been tested on. This will be displayed in the character list.)": "(Beschrijf de bot, geef gebruikerstips of vermeld de chatmodellen waarop het is getest. Dit wordt weergegeven in de lijst met personages.)", + "(Write a comma-separated list of tags)": "(Schrijf een lijst van tags gescheiden door komma's)", + "(A brief description of the personality)": "(Een korte beschrijving van de persoonlijkheid)", + "(Circumstances and context of the interaction)": "(Omstandigheden en context van de interactie)", + "(Examples of chat dialog. Begin each example with START on a new line.)": "(Voorbeelden van chatdialogen. Begin elk voorbeeld met START op een nieuwe regel.)", + "Injection text (supports parameters)": "Injectietekst (ondersteunt parameters)", + "Injection depth": "Injectiediepte", + "Type here...": "Typ hier...", + "Comma separated (required)": "Komma gescheiden (vereist)", + "Comma separated (ignored if empty)": "Komma gescheiden (genegeerd indien leeg)", + "What this keyword should mean to the AI, sent verbatim": "Wat deze trefwoorden voor de AI zouden moeten betekenen, letterlijk verzonden", + "Not sent to the AI": "Niet naar de AI verzonden", + "(This will be the first message from the character that starts every chat)": "(Dit zal het eerste bericht zijn van het personage dat elke chat start)", + "Not connected to API!": "Niet verbonden met API!", + "AI Response Configuration": "AI Reactie Configuratie", + "AI Configuration panel will stay open": "Het AI configuratiepaneel blijft openstaan", + "Update current preset": "Huidige preset bijwerken", + "Create new preset": "Nieuwe preset aanmaken", + "Import preset": "Preset importeren", + "Export preset": "Preset exporteren", + "Delete the preset": "De preset verwijderen", + "Inserts jailbreak as a last system message": "Voegt jailbreak in als een laatste systeembericht", + "NSFW block goes first in the resulting prompt": "NSFW blok komt als eerste in de resulterende prompt", + "Enables OpenAI completion streaming": "Activeert OpenAI voltooiing streamen", + "Wrap user messages in quotes before sending": "Wikkel gebruikersberichten in aanhalingstekens voordat ze worden verzonden", + "Restore default prompt": "Herstel standaard prompt", + "New preset": "Nieuwe preset", + "Delete preset": "Preset verwijderen", + "Restore default jailbreak": "Herstel standaard jailbreak", + "Restore default reply": "Herstel standaard antwoord", + "Restore defaul note": "Herstel standaard notitie", + "API Connections": "API-verbindingen", + "Can help with bad responses by queueing only the approved workers. May slowdown the response time.": "Kan helpen bij slechte reacties door alleen de goedgekeurde medewerkers in de wachtrij te plaatsen. Kan de reactietijd vertragen.", + "Clear your API key": "Wis je API-sleutel", + "Refresh models": "Modellen vernieuwen", + "Get your OpenRouter API token using OAuth flow. You will be redirected to openrouter.ai": "Ontvang je OpenRouter API-token via het OAuth-proces. Je wordt doorverwezen naar openrouter.ai", + "Verifies your API connection by sending a short test message. Be aware that you'll be credited for it!": "Verifieert je API-verbinding door een kort testbericht te sturen. Wees je ervan bewust dat je hiervoor wordt gecrediteerd!", + "Create New": "Nieuw aanmaken", + "Edit": "Bewerken", + "World Info & Soft Prompts": "Wereldinformatie & Zachte Prompts", + "Locked = World Editor will stay open": "Vergrendeld = Wereld Editor blijft open", + "Entries can activate other entries by mentioning their keywords": "Invoeren kunnen andere invoeren activeren door hun trefwoorden te noemen", + "Lookup for the entry keys in the context will respect the case": "Zoeken naar de toetsen van de invoer in de context zal de hoofdlettergevoeligheid respecteren", + "If the entry key consists of only one word, it would not be matched as part of other words": "Als de invoertoets uit slechts één woord bestaat, wordt het niet gematcht als onderdeel van andere woorden", + "Open all Entries": "Open alle invoeren", + "Close all Entries": "Sluit alle invoeren", + "Create": "Aanmaken", + "Import World Info": "Wereldinformatie importeren", + "Export World Info": "Wereldinformatie exporteren", + "Delete World Info": "Wereldinformatie verwijderen", + "Rename World Info": "Wereldinformatie hernoemen", + "Save changes to a new theme file": "Wijzigingen opslaan naar een nieuw themabestand", + "removes blur and uses alternative background color for divs": "verwijdert vervaging en gebruikt een alternatieve achtergrondkleur voor divs", + "If checked and the character card contains a prompt override (System Prompt), use that instead.": "Als aangevinkt en de karakterkaart bevat een prompt overschrijving (Systeem Prompt), gebruik dat dan in plaats daarvan.", + "If checked and the character card contains a jailbreak override (Post History Instruction), use that instead.": "Als aangevinkt en de karakterkaart bevat een jailbreak overschrijving (Post History Instruction), gebruik dat dan in plaats daarvan.", + "AI Response Formatting": "AI Antwoord Opmaak", + "Change Background Image": "Achtergrondafbeelding wijzigen", + "Extensions": "Extensies", + "Click to set a new User Name": "Klik om een nieuwe gebruikersnaam in te stellen", + "Click to lock your selected persona to the current chat. Click again to remove the lock.": "Klik om je geselecteerde persona aan de huidige chat te koppelen. Klik nogmaals om de koppeling te verwijderen.", + "Click to set user name for all messages": "Klik om de gebruikersnaam in te stellen voor alle berichten", + "Create a dummy persona": "Creëer een dummy persona", + "Character Management": "Karakterbeheer", + "Locked = Character Management panel will stay open": "Vergrendeld = Het karakterbeheerpaneel blijft open", + "Select/Create Characters": "Karakters Selecteren/Aanmaken", + "Token counts may be inaccurate and provided just for reference.": "Token tellingen kunnen onnauwkeurig zijn en worden alleen ter referentie verstrekt.", + "Click to select a new avatar for this character": "Klik om een nieuwe avatar voor dit personage te selecteren", + "Add to Favorites": "Toevoegen aan Favorieten", + "Advanced Definition": "Geavanceerde Definitie", + "Character Lore": "Karaktergeschiedenis", + "Export and Download": "Exporteren en Downloaden", + "Duplicate Character": "Dubbel Karakter", + "Create Character": "Karakter Aanmaken", + "Delete Character": "Karakter Verwijderen", + "View all tags": "Bekijk alle tags", + "Click to set additional greeting messages": "Klik om extra begroetingsberichten in te stellen", + "Show / Hide Description and First Message": "Beschrijving en Eerste Bericht Tonen / Verbergen", + "Click to select a new avatar for this group": "Klik om een nieuwe avatar voor deze groep te selecteren", + "Set a group chat scenario": "Stel een groep chat scenario in", + "Restore collage avatar": "Herstel collage-avatar", + "Create New Character": "Nieuw Karakter Aanmaken", + "Import Character from File": "Karakter Importeren uit Bestand", + "Import content from external URL": "Inhoud importeren van externe URL", + "Create New Chat Group": "Nieuwe Chatgroep Aanmaken", + "Characters sorting order": "Volgorde van Karakters sorteren", + "Add chat injection": "Chat Injectie Toevoegen", + "Remove injection": "Injectie Verwijderen", + "Remove": "Verwijderen", + "Select a World Info file for": "Selecteer een Wereldinformatie bestand voor", + "Primary Lorebook": "Primaire Loreboek", + "A selected World Info will be bound to this character as its own Lorebook.": "Een geselecteerde Wereldinformatie zal aan dit personage worden gekoppeld als zijn eigen Loreboek.", + "When generating an AI reply, it will be combined with the entries from a global World Info selector.": "Bij het genereren van een AI-antwoord, zal dit gecombineerd worden met de vermeldingen vanuit een wereldwijde Wereldinformatie selector.", + "Exporting a character would also export the selected Lorebook file embedded in the JSON data.": "Het exporteren van een personage zal ook het geselecteerde Loreboekbestand exporteren dat is ingebed in de JSON-gegevens.", + "Additional Lorebooks": "Extra Loreboeken", + "Associate one or more auxillary Lorebooks with this character.": "Koppel één of meer aanvullende Loreboeken aan dit personage.", + "NOTE: These choices are optional and won't be preserved on character export!": "LET OP: Deze keuzes zijn optioneel en worden niet behouden bij het exporteren van het personage!", + "Rename chat file": "Chatbestand hernoemen", + "Export JSONL chat file": "JSONL chatbestand exporteren", + "Download chat as plain text document": "Chat downloaden als plat tekstbestand", + "Delete chat file": "Chatbestand verwijderen", + "Delete tag": "Tag verwijderen", + "Translate message": "Bericht vertalen", + "Generate Image": "Afbeelding Genereren", + "Narrate": "Vertellen", + "Prompt": "Prompt", + "Create Bookmark": "Bladwijzer Aanmaken", + "Copy": "Kopiëren", + "Open bookmark chat": "Bladwijzerchat openen", + "Confirm": "Bevestigen", + "Copy this message": "Dit bericht kopiëren", + "Delete this message": "Dit bericht verwijderen", + "Move message up": "Bericht omhoog verplaatsen", + "Move message down": "Bericht omlaag verplaatsen", + "Enlarge": "Vergroten", + "Temporarily disable automatic replies from this character": "Tijdelijk automatische antwoorden van dit personage uitschakelen", + "Enable automatic replies from this character": "Automatische antwoorden van dit personage inschakelen", + "Trigger a message from this character": "Een bericht van dit personage activeren", + "Move up": "Omhoog verplaatsen", + "Move down": "Omlaag verplaatsen", + "View character card": "Karakterkaart bekijken", + "Remove from group": "Uit groep verwijderen", + "Add to group": "Toevoegen aan groep", + "Add": "Toevoegen", + "Abort request": "Verzoek afbreken", + "Send a message": "Een bericht verzenden", + "Ask AI to write your message for you": "Vraag de AI om je bericht voor je te schrijven", + "Continue the last message": "Het laatste bericht voortzetten", + "Bind user name to that avatar": "Gebruikersnaam aan die avatar koppelen", + "Select this as default persona for the new chats.": "Selecteer dit als standaard persona voor de nieuwe chats.", + "Change persona image": "persona afbeelding wijzigen", + "Delete persona": "persona verwijderen" } } From 7cafa5d374904c5dd311f05e1f6b118058aeab20 Mon Sep 17 00:00:00 2001 From: Stefan Daniel Schwarz Date: Wed, 23 Aug 2023 22:22:52 +0200 Subject: [PATCH 11/18] improved preset selection logic --- public/scripts/instruct-mode.js | 107 ++++++++++++++++++++------------ public/scripts/power-user.js | 4 +- 2 files changed, 70 insertions(+), 41 deletions(-) diff --git a/public/scripts/instruct-mode.js b/public/scripts/instruct-mode.js index 5881f5966..43f8603d2 100644 --- a/public/scripts/instruct-mode.js +++ b/public/scripts/instruct-mode.js @@ -77,18 +77,20 @@ function highlightDefaultPreset() { * @param {string} preset Preset name. */ function selectContextPreset(preset) { - // If preset is not already selected, select it - if (power_user.context.preset !== preset) { + // If context template is not already selected, select it + if (preset !== power_user.context.preset) { $('#context_presets').val(preset).trigger('change'); toastr.info(`Context Template: preset "${preset}" auto-selected`); - - // If instruct mode is disabled, enable it - if (!power_user.instruct.enabled) { - $('#instruct_enabled').prop('checked', true).trigger('change'); - power_user.instruct.enabled = true; - toastr.info(`Instruct Mode enabled`); - } } + + // If instruct mode is disabled, enable it, except for default context template + if (!power_user.instruct.enabled && preset !== 'Default') { + power_user.instruct.enabled = true; + $('#instruct_enabled').prop('checked', true).trigger('change'); + toastr.info(`Instruct Mode enabled`); + } + + saveSettingsDebounced(); } /** @@ -96,18 +98,20 @@ function selectContextPreset(preset) { * @param {string} preset Preset name. */ export function selectInstructPreset(preset) { - // If preset is not already selected, select it - if (power_user.instruct.preset !== preset) { + // If instruct preset is not already selected, select it + if (preset !== power_user.instruct.preset) { $('#instruct_presets').val(preset).trigger('change'); toastr.info(`Instruct Mode: preset "${preset}" auto-selected`); - - // If instruct mode is disabled, enable it - if (!power_user.instruct.enabled) { - $('#instruct_enabled').prop('checked', true).trigger('change'); - power_user.instruct.enabled = true; - toastr.info(`Instruct Mode enabled`); - } } + + // If instruct mode is disabled, enable it + if (!power_user.instruct.enabled) { + power_user.instruct.enabled = true; + $('#instruct_enabled').prop('checked', true).trigger('change'); + toastr.info(`Instruct Mode enabled`); + } + + saveSettingsDebounced(); } /** @@ -122,30 +126,42 @@ export function autoSelectInstructPreset(modelId) { return false; } - for (const preset of instruct_presets) { - // If context template matches the preset name - if (power_user.context.preset === preset.name) { - selectInstructPreset(preset.name); - // Else if activation regex is set, check if it matches the model id - } else if (preset.activation_regex) { - try { - const regex = new RegExp(preset.activation_regex, 'i'); - - // Stop on first match so it won't cycle back and forth between presets if multiple regexes match - if (regex.test(modelId)) { - selectInstructPreset(preset.name); - } - } catch { - // If regex is invalid, ignore it - console.warn(`Invalid instruct activation regex in preset "${preset.name}"`); - } + // Select matching instruct preset + let foundMatch = false; + for (const instruct_preset of instruct_presets) { + // If instruct preset matches the context template + if (instruct_preset.name === power_user.context.preset) { + foundMatch = true; + selectInstructPreset(instruct_preset.name); + break; } } + // If no match was found, auto-select instruct preset + if (!foundMatch) { + for (const preset of instruct_presets) { + // If activation regex is set, check if it matches the model id + if (preset.activation_regex) { + try { + const regex = new RegExp(preset.activation_regex, 'i'); - if (power_user.default_instruct && power_user.instruct.preset !== power_user.default_instruct) { - if (instruct_presets.some(p => p.name === power_user.default_instruct)) { - console.log(`Instruct mode: default preset "${power_user.default_instruct}" selected`); - $('#instruct_presets').val(power_user.default_instruct).trigger('change'); + // Stop on first match so it won't cycle back and forth between presets if multiple regexes match + if (regex.test(modelId)) { + selectInstructPreset(preset.name); + + return true; + } + } catch { + // If regex is invalid, ignore it + console.warn(`Invalid instruct activation regex in preset "${preset.name}"`); + } + } + } + + if (power_user.default_instruct && power_user.instruct.preset !== power_user.default_instruct) { + if (instruct_presets.some(p => p.name === power_user.default_instruct)) { + console.log(`Instruct mode: default preset "${power_user.default_instruct}" selected`); + $('#instruct_presets').val(power_user.default_instruct).trigger('change'); + } } } @@ -301,6 +317,9 @@ jQuery(() => { // When instruct mode gets enabled, select context template matching selected instruct preset if (power_user.instruct.enabled) { $('#instruct_presets').trigger('change'); + // When instruct mode gets disabled, select default context preset + } else { + selectContextPreset('Default'); } }); @@ -326,12 +345,20 @@ jQuery(() => { } }); + // Select matching context template + let foundMatch = false; for (const context_preset of context_presets) { // If context template matches the instruct preset if (context_preset.name === name) { - selectContextPreset(name); + foundMatch = true; + selectContextPreset(context_preset.name); + break; } } + if (!foundMatch) { + // If no match was found, select default context preset + selectContextPreset('Default'); + } highlightDefaultPreset(); }); diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index 77855ddec..d426bbb76 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -936,10 +936,12 @@ function loadContextSettings() { } }); + // Select matching instruct preset for (const instruct_preset of instruct_presets) { // If instruct preset matches the context template if (instruct_preset.name === name) { - selectInstructPreset(name); + selectInstructPreset(instruct_preset.name); + break; } } }); From dd7b21c63daa1c9aa116e4b82f5ec91ff8065440 Mon Sep 17 00:00:00 2001 From: Stefan Daniel Schwarz Date: Wed, 23 Aug 2023 22:23:51 +0200 Subject: [PATCH 12/18] renamed roleplay instruct preset --- default/settings.json | 2 +- public/instruct/{! Roleplay.json => Roleplay.json} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename public/instruct/{! Roleplay.json => Roleplay.json} (100%) diff --git a/default/settings.json b/default/settings.json index dff1428c7..c22b0e56f 100644 --- a/default/settings.json +++ b/default/settings.json @@ -134,7 +134,7 @@ "default_instruct": "", "instruct": { "enabled": false, - "preset": "🧙 Roleplay", + "preset": "Roleplay", "system_prompt": "Avoid repetition, don't loop. Develop the plot slowly, always stay in character. Describe all actions in full, elaborate, explicit, graphic, and vivid detail. Mention all relevant sensory perceptions.", "input_sequence": "\n### Instruction:", "output_sequence": "\n### Response:", diff --git a/public/instruct/! Roleplay.json b/public/instruct/Roleplay.json similarity index 100% rename from public/instruct/! Roleplay.json rename to public/instruct/Roleplay.json From 1ce848c1c322ee6459fe11d638a0ac612718dbf0 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 24 Aug 2023 00:26:47 +0300 Subject: [PATCH 13/18] Move before / after char WI to story strings --- default/settings.json | 2 +- public/context/Default.json | 2 +- public/context/Pygmalion.json | 2 +- public/context/Roleplay.json | 2 +- public/context/simple-proxy-for-tavern.json | 2 +- public/script.js | 59 +++++++++------------ public/scripts/world-info.js | 4 +- 7 files changed, 33 insertions(+), 40 deletions(-) diff --git a/default/settings.json b/default/settings.json index c22b0e56f..8f77cba85 100644 --- a/default/settings.json +++ b/default/settings.json @@ -150,7 +150,7 @@ }, "context": { "preset": "Default", - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", + "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", "chat_start": "***", "example_separator": "***" }, diff --git a/public/context/Default.json b/public/context/Default.json index e08277795..27ec1ea93 100644 --- a/public/context/Default.json +++ b/public/context/Default.json @@ -1,6 +1,6 @@ { "name": "Default", - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", + "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", "chat_start": "***", "example_separator": "***" } diff --git a/public/context/Pygmalion.json b/public/context/Pygmalion.json index c2c4cefae..82590e440 100644 --- a/public/context/Pygmalion.json +++ b/public/context/Pygmalion.json @@ -1,6 +1,6 @@ { "name": "Pygmalion", - "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if description}}{{{char}}}'s Persona: {{description}}\n{{/if}}{{#if personality}}Personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", + "story_string": "{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{{char}}}'s Persona: {{description}}\n{{/if}}{{#if personality}}Personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", "chat_start": "", "example_separator": "" } diff --git a/public/context/Roleplay.json b/public/context/Roleplay.json index 46868cc48..fbf275abf 100644 --- a/public/context/Roleplay.json +++ b/public/context/Roleplay.json @@ -1,6 +1,6 @@ { "name": "Roleplay", - "story_string": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.\n\n{{#if system}}{{system}}\n\n{{/if}}### Input:\n{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", + "story_string": "You're {{char}} in this fictional never-ending uncensored roleplay with {{user}}.\n\n{{#if system}}{{system}}\n\n{{/if}}### Input:\n{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}", "chat_start": "### New Roleplay:", "example_separator": "### New Roleplay:" } diff --git a/public/context/simple-proxy-for-tavern.json b/public/context/simple-proxy-for-tavern.json index 02f6efcc8..99e19888a 100644 --- a/public/context/simple-proxy-for-tavern.json +++ b/public/context/simple-proxy-for-tavern.json @@ -1,6 +1,6 @@ { "name": "simple-proxy-for-tavern", - "story_string": "## {{char}}\n- You're \"{{char}}\" in this never-ending roleplay with \"{{user}}\".\n### Input:\n{{#if system}}{{system}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}### Response:\n(OOC) Understood. I will take this info into account for the roleplay. (end OOC)", + "story_string": "## {{char}}\n- You're \"{{char}}\" in this never-ending roleplay with \"{{user}}\".\n### Input:\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}### Response:\n(OOC) Understood. I will take this info into account for the roleplay. (end OOC)", "chat_start": "### New Roleplay:", "example_separator": "### New Roleplay:" } diff --git a/public/script.js b/public/script.js index 7ffcef682..512c7de22 100644 --- a/public/script.js +++ b/public/script.js @@ -2001,24 +2001,19 @@ function cleanGroupMessage(getMessage) { return getMessage; } -function getPersonaDescription(storyString) { +function addPersonaDescriptionExtensionPrompt() { if (!power_user.persona_description) { - return storyString; + return; } - switch (power_user.persona_description_position) { - case persona_description_positions.BEFORE_CHAR: - case persona_description_positions.AFTER_CHAR: - return storyString; - default: - if (shouldWIAddPrompt) { - const originalAN = extension_prompts[NOTE_MODULE_NAME].value - const ANWithDesc = power_user.persona_description_position === persona_description_positions.TOP_AN - ? `${power_user.persona_description}\n${originalAN}` - : `${originalAN}\n${power_user.persona_description}`; - setExtensionPrompt(NOTE_MODULE_NAME, ANWithDesc, chat_metadata[metadata_keys.position], chat_metadata[metadata_keys.depth]); - } - return storyString; + const promptPositions = [persona_description_positions.BOTTOM_AN, persona_description_positions.TOP_AN]; + + if (promptPositions.includes(power_user.persona_description_position) && shouldWIAddPrompt) { + const originalAN = extension_prompts[NOTE_MODULE_NAME].value + const ANWithDesc = power_user.persona_description_position === persona_description_positions.TOP_AN + ? `${power_user.persona_description}\n${originalAN}` + : `${originalAN}\n${power_user.persona_description}`; + setExtensionPrompt(NOTE_MODULE_NAME, ANWithDesc, chat_metadata[metadata_keys.position], chat_metadata[metadata_keys.depth]); } } @@ -2521,18 +2516,6 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, console.log(`Core/all messages: ${coreChat.length}/${chat.length}`); - const storyStringParams = { - description: charDescription, - personality: charPersonality, - persona: personaDescription, - scenario: Scenario, - system: isInstruct ? systemPrompt : '', - char: name2, - user: name1, - }; - - let storyString = renderStoryString(storyStringParams); - // kingbri MARK: - Make sure the prompt bias isn't the same as the user bias if ((promptBias && !isUserPromptBias) || power_user.always_force_name2 || is_pygmalion) { force_name2 = true; @@ -2578,22 +2561,32 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, } // Extension added strings - // Set non-WI AN setFloatingPrompt(); // Add WI to prompt (and also inject WI to AN value via hijack) let { worldInfoString, worldInfoBefore, worldInfoAfter } = await getWorldInfoPrompt(chat2, this_max_context); // Add persona description to prompt - storyString = getPersonaDescription(storyString); + addPersonaDescriptionExtensionPrompt(); // Call combined AN into Generate let allAnchors = getAllExtensionPrompts(); const afterScenarioAnchor = getExtensionPrompt(extension_prompt_types.AFTER_SCENARIO); let zeroDepthAnchor = getExtensionPrompt(extension_prompt_types.IN_CHAT, 0, ' '); - // Pre-format the World Info into the story string - if (main_api !== 'openai') { - storyString = worldInfoBefore + storyString + worldInfoAfter; - } + const storyStringParams = { + description: charDescription, + personality: charPersonality, + persona: personaDescription, + scenario: Scenario, + system: isInstruct ? systemPrompt : '', + char: name2, + user: name1, + wiBefore: worldInfoBefore, + wiAfter: worldInfoAfter, + loreBefore: worldInfoBefore, + loreAfter: worldInfoAfter, + }; + + const storyString = renderStoryString(storyStringParams); if (main_api === 'openai') { message_already_generated = ''; // OpenAI doesn't have multigen diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 630dc735b..f6af51d9b 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -1155,8 +1155,8 @@ async function checkWorldInfo(chat, maxContext) { } }); - const worldInfoBefore = WIBeforeEntries.length ? `${WIBeforeEntries.join("\n")}\n` : ''; - const worldInfoAfter = WIAfterEntries.length ? `${WIAfterEntries.join("\n")}\n` : ''; + const worldInfoBefore = WIBeforeEntries.length ? WIBeforeEntries.join("\n") : ''; + const worldInfoAfter = WIAfterEntries.length ? WIAfterEntries.join("\n") : ''; if (shouldWIAddPrompt) { const originalAN = context.extensionPrompts[NOTE_MODULE_NAME].value; From d64c5880c819e8947062591c88af84e009dfc9b5 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 24 Aug 2023 00:54:36 +0300 Subject: [PATCH 14/18] Fix new chat reference not getting saved when starting a new chat --- public/script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index 0b2678bb2..75ea593e3 100644 --- a/public/script.js +++ b/public/script.js @@ -7478,14 +7478,15 @@ $(document).ready(function () { chat.length = 0; if (selected_group) { - createNewGroupChat(selected_group); + await createNewGroupChat(selected_group); } else { //RossAscends: added character name to new chat filenames and replaced Date.now() with humanizedDateTime; chat_metadata = {}; characters[this_chid].chat = name2 + " - " + humanizedDateTime(); $("#selected_chat_pole").val(characters[this_chid].chat); - getChat(); + await getChat(); + await createOrEditCharacter(); } } From 52c2fcd40744342777eb6ae7ec41d235ba535a18 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 24 Aug 2023 00:59:57 +0300 Subject: [PATCH 15/18] Fix OpenRouter model not persisting on page reload --- public/scripts/openai.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 75cc8da0d..aea4cd7c7 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -2537,7 +2537,7 @@ function getMaxContextWindowAI(value) { async function onModelChange() { biasCache = undefined; - let value = String($(this).val()); + let value = String($(this).val() || ''); if ($(this).is('#model_claude_select')) { console.log('Claude model changed to', value); From e2507e8840a6dabb85c8a2352dd6c31f91c61311 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 24 Aug 2023 01:37:44 +0300 Subject: [PATCH 16/18] #976 Add "quick continue" button. Remove "send to continue" option. --- default/settings.json | 2 +- public/index.html | 9 ++++---- public/script.js | 22 ++++++++++--------- public/scripts/RossAscends-mods.js | 6 +++-- .../extensions/stable-diffusion/index.js | 2 +- public/scripts/power-user.js | 10 +++++---- public/style.css | 9 +++++--- 7 files changed, 35 insertions(+), 25 deletions(-) diff --git a/default/settings.json b/default/settings.json index 8f77cba85..eabf64e95 100644 --- a/default/settings.json +++ b/default/settings.json @@ -128,7 +128,7 @@ "max_context_unlocked": false, "prefer_character_prompt": true, "prefer_character_jailbreak": true, - "continue_on_send": false, + "quick_continue": false, "trim_spaces": true, "relaxed_api_urls": false, "default_instruct": "", diff --git a/public/index.html b/public/index.html index 991a3f513..e0744182f 100644 --- a/public/index.html +++ b/public/index.html @@ -2816,10 +2816,10 @@ Prefer Char. JB -