mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Check for response ok
This commit is contained in:
@ -1249,18 +1249,20 @@ async function getStatusTextgen() {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = await response.json();
|
if (response.ok) {
|
||||||
if (data) {
|
const data = await response.json();
|
||||||
const { chat_template, chat_template_hash } = data;
|
if (data) {
|
||||||
console.log(`We have chat template ${chat_template.split('\n')[0]}...`);
|
const { chat_template, chat_template_hash } = data;
|
||||||
const templates = await deriveTemplatesFromChatTemplate(chat_template, chat_template_hash);
|
console.log(`We have chat template ${chat_template.split('\n')[0]}...`);
|
||||||
if (templates) {
|
const templates = await deriveTemplatesFromChatTemplate(chat_template, chat_template_hash);
|
||||||
const { context, instruct } = templates;
|
if (templates) {
|
||||||
if (wantsContextDerivation) {
|
const { context, instruct } = templates;
|
||||||
selectContextPreset(context, { isAuto: true });
|
if (wantsContextDerivation) {
|
||||||
}
|
selectContextPreset(context, { isAuto: true });
|
||||||
if (wantsInstructDerivation) {
|
}
|
||||||
selectInstructPreset(instruct, { isAuto: true });
|
if (wantsInstructDerivation) {
|
||||||
|
selectInstructPreset(instruct, { isAuto: true });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user