Uncomment set of boolean fields on Kobold WI

This commit is contained in:
SillyLossy
2023-02-15 14:35:31 +02:00
parent 7d2e4d4888
commit f60f2cb7a7

View File

@@ -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) {