mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'staging' into char-find-and-sendas-extended
This commit is contained in:
@@ -5428,6 +5428,7 @@ export function cleanUpMessage(getMessage, isImpersonate, isContinue, displayInc
|
||||
getMessage = getMessage.substring(0, getMessage.indexOf('<|endoftext|>'));
|
||||
}
|
||||
const isInstruct = power_user.instruct.enabled && main_api !== 'openai';
|
||||
const isNotEmpty = (str) => str && str.trim() !== '';
|
||||
if (isInstruct && power_user.instruct.stop_sequence) {
|
||||
if (getMessage.indexOf(power_user.instruct.stop_sequence) != -1) {
|
||||
getMessage = getMessage.substring(0, getMessage.indexOf(power_user.instruct.stop_sequence));
|
||||
@@ -5435,7 +5436,7 @@ export function cleanUpMessage(getMessage, isImpersonate, isContinue, displayInc
|
||||
}
|
||||
// Hana: Only use the first sequence (should be <|model|>)
|
||||
// of the prompt before <|user|> (as KoboldAI Lite does it).
|
||||
if (isInstruct && power_user.instruct.input_sequence) {
|
||||
if (isInstruct && isNotEmpty(power_user.instruct.input_sequence)) {
|
||||
if (getMessage.indexOf(power_user.instruct.input_sequence) != -1) {
|
||||
getMessage = getMessage.substring(0, getMessage.indexOf(power_user.instruct.input_sequence));
|
||||
}
|
||||
@@ -8477,12 +8478,22 @@ const CONNECT_API_MAP = {
|
||||
selected: 'novel',
|
||||
button: '#api_button_novel',
|
||||
},
|
||||
'koboldcpp': {
|
||||
selected: 'textgenerationwebui',
|
||||
button: '#api_button_textgenerationwebui',
|
||||
type: textgen_types.KOBOLDCPP,
|
||||
},
|
||||
// KoboldCpp alias
|
||||
'kcpp': {
|
||||
selected: 'textgenerationwebui',
|
||||
button: '#api_button_textgenerationwebui',
|
||||
type: textgen_types.KOBOLDCPP,
|
||||
},
|
||||
'openai': {
|
||||
selected: 'openai',
|
||||
button: '#api_button_openai',
|
||||
source: chat_completion_sources.OPENAI,
|
||||
},
|
||||
// OpenAI alias
|
||||
'oai': {
|
||||
selected: 'openai',
|
||||
|
Reference in New Issue
Block a user