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 */
// 5. Set constant flag try {
if (tavernEntry.constant) { // 5. Set constant flag
const constantArgs = { data: { value: tavernEntry.constant.toString() }, ...baseRequestArgs }; if (tavernEntry.constant) {
await putToPromise(`${api_server}/v1/world_info/${koboldEntry.uid}/constant`, constantArgs); const constantArgs = { data: { value: tavernEntry.constant.toString() }, ...baseRequestArgs };
await putToPromise(`${api_server}/v1/world_info/${koboldEntry.uid}/constant`, constantArgs);
}
// 6. Set selective flag
if (tavernEntry.selective) {
const selectiveArgs = { data: { value: tavernEntry.selective.toString() }, ...baseRequestArgs };
await putToPromise(`${api_server}/v1/world_info/${koboldEntry.uid}/selective`, selectiveArgs);
}
} catch {
// couldn't set fields = ignore
} }
// 6. Set selective flag
if (tavernEntry.selective) {
const selectiveArgs = { data: { value: tavernEntry.selective.toString() }, ...baseRequestArgs };
await putToPromise(`${api_server}/v1/world_info/${koboldEntry.uid}/selective`, selectiveArgs);
}
*/
} }
async function validateKoboldWorldInfo(koboldFolderName, koboldWorldInfo, tavernWorldInfo) { async function validateKoboldWorldInfo(koboldFolderName, koboldWorldInfo, tavernWorldInfo) {