mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Uncomment set of boolean fields on Kobold WI
This commit is contained in:
@@ -1384,19 +1384,22 @@ async function setKoboldEntryData(tavernEntry, koboldEntry) {
|
|||||||
await putAsync(`${api_server}/v1/world_info/${koboldEntry.uid}/comment`, commentArgs);
|
await putAsync(`${api_server}/v1/world_info/${koboldEntry.uid}/comment`, commentArgs);
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Can't set these via API due to bug in Kobold)
|
/* Fixed in Kobold United only: https://github.com/henk717/KoboldAI/pull/280 */
|
||||||
|
try {
|
||||||
// 5. Set constant flag
|
// 5. Set constant flag
|
||||||
if (tavernEntry.constant) {
|
if (tavernEntry.constant) {
|
||||||
const constantArgs = { data: { value: tavernEntry.constant.toString() }, ...baseRequestArgs };
|
const constantArgs = { data: { value: tavernEntry.constant.toString() }, ...baseRequestArgs };
|
||||||
await putToPromise(`${api_server}/v1/world_info/${koboldEntry.uid}/constant`, constantArgs);
|
await putToPromise(`${api_server}/v1/world_info/${koboldEntry.uid}/constant`, constantArgs);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6. Set selective flag
|
// 6. Set selective flag
|
||||||
if (tavernEntry.selective) {
|
if (tavernEntry.selective) {
|
||||||
const selectiveArgs = { data: { value: tavernEntry.selective.toString() }, ...baseRequestArgs };
|
const selectiveArgs = { data: { value: tavernEntry.selective.toString() }, ...baseRequestArgs };
|
||||||
await putToPromise(`${api_server}/v1/world_info/${koboldEntry.uid}/selective`, selectiveArgs);
|
await putToPromise(`${api_server}/v1/world_info/${koboldEntry.uid}/selective`, selectiveArgs);
|
||||||
}
|
}
|
||||||
*/
|
} catch {
|
||||||
|
// couldn't set fields = ignore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function validateKoboldWorldInfo(koboldFolderName, koboldWorldInfo, tavernWorldInfo) {
|
async function validateKoboldWorldInfo(koboldFolderName, koboldWorldInfo, tavernWorldInfo) {
|
||||||
|
Reference in New Issue
Block a user