mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Assorted fixes and improvements (#1208)
* Kobold Presets fixed * Help texts fixed * Scale API for connectAPISlash * Quick Reply checkboxes fixed * New Instruct Mode Presets * More date/time macros * ChatML context template and instruct prompt format * Mistral context template and instruct prompt format * Removed use_default_badwordsids from kobold presets * Renamed ChatML to Mistral-OpenOrca (ChatML) * Renamed Mistral-OpenOrca (removed ChatML) * Removed single_line from kobold presets * Removed obsolete use_stop_sequence setting * Ban EOS Token off by default * Split AI Resp. Conf. in global and preset-specific settings * Resolve conflicts * Fix title * Add translations for new help texts * Fix i18n.json whitespace * Make Mistral-OpenOrca system prompt more generic * Renamed "Mistral-OpenOrca" to "ChatML" again * More (UI) fixes and improvements * Sendas hint fixed --------- Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
This commit is contained in:
@ -1751,6 +1751,13 @@ function substituteParams(content, _name1, _name2, _original, _group) {
|
||||
|
||||
content = content.replace(/{{time}}/gi, moment().format('LT'));
|
||||
content = content.replace(/{{date}}/gi, moment().format('LL'));
|
||||
content = content.replace(/{{weekday}}/gi, moment().format('dddd'));
|
||||
content = content.replace(/{{isotime}}/gi, moment().format('HH:mm'));
|
||||
content = content.replace(/{{isodate}}/gi, moment().format('YYYY-MM-DD'));
|
||||
content = content.replace(/{{datetimeformat +([^}]*)}}/gi, (_, format) => {
|
||||
const formattedTime = moment().format(format);
|
||||
return formattedTime;
|
||||
});
|
||||
content = content.replace(/{{idle_duration}}/gi, () => getTimeSinceLastMessage());
|
||||
content = content.replace(/{{time_UTC([-+]\d+)}}/gi, (_, offset) => {
|
||||
const utcOffset = parseInt(offset, 10);
|
||||
@ -6821,6 +6828,11 @@ function connectAPISlash(_, text) {
|
||||
source: 'openrouter',
|
||||
button: '#api_button_openai',
|
||||
},
|
||||
'scale': {
|
||||
selected: 'openai',
|
||||
source: 'scale',
|
||||
button: '#api_button_openai',
|
||||
},
|
||||
'ai21': {
|
||||
selected: 'openai',
|
||||
source: 'ai21',
|
||||
@ -7063,11 +7075,11 @@ jQuery(async function () {
|
||||
}
|
||||
|
||||
registerSlashCommand('dupe', DupeChar, [], "– duplicates the currently selected character", true, true);
|
||||
registerSlashCommand('api', connectAPISlash, [], "(kobold, horde, novel, ooba, oai, claude, windowai, ai21, palm) – connect to an API", true, true);
|
||||
registerSlashCommand('impersonate', doImpersonate, ['imp'], "- calls an impersonation response", true, true);
|
||||
registerSlashCommand('delchat', doDeleteChat, [], "- deletes the current chat", true, true);
|
||||
registerSlashCommand('closechat', doCloseChat, [], "- closes the current chat", true, true);
|
||||
registerSlashCommand('panels', doTogglePanels, ['togglepanels'], "- toggle UI panels on/off", true, true);
|
||||
registerSlashCommand('api', connectAPISlash, [], '<span class="monospace">(kobold, horde, novel, ooba, oai, claude, windowai, openrouter, scale, ai21, palm)</span> – connect to an API', true, true);
|
||||
registerSlashCommand('impersonate', doImpersonate, ['imp'], "– calls an impersonation response", true, true);
|
||||
registerSlashCommand('delchat', doDeleteChat, [], "– deletes the current chat", true, true);
|
||||
registerSlashCommand('closechat', doCloseChat, [], "– closes the current chat", true, true);
|
||||
registerSlashCommand('panels', doTogglePanels, ['togglepanels'], "– toggle UI panels on/off", true, true);
|
||||
|
||||
setTimeout(function () {
|
||||
$("#groupControlsToggle").trigger('click');
|
||||
|
Reference in New Issue
Block a user