Author's Note Template

This commit is contained in:
Gnome Ann
2021-12-29 23:43:36 -05:00
parent 7573f64bf2
commit 276f24029e
5 changed files with 99 additions and 9 deletions

View File

@@ -145,6 +145,8 @@ return function(_python, _bridged)
--==========================================================================
---@class KoboldLib
---@field authorsnote string
---@field authorsnotetemplate string
---@field memory string
---@field submission string
---@field model string
@@ -998,6 +1000,24 @@ return function(_python, _bridged)
bridged.set_authorsnote(v)
end
---@param t KoboldLib
---@return string
function KoboldLib_getters.authorsnotetemplate(t)
return bridged.get_authorsnotetemplate()
end
---@param t KoboldLib
---@param v string
---@return KoboldLib
function KoboldLib_setters.authorsnotetemplate(t, v)
if type(v) ~= "string" then
error("`KoboldLib.authorsnotetemplate` must be a string; you attempted to set it to a "..type(v))
return
end
maybe_require_regeneration()
bridged.set_authorsnotetemplate(v)
end
--==========================================================================
-- Userscript API: User-submitted text (after applying input formatting)