mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
* `print()` and `warn()` now work correctly with `nil` arguments
* Typo: `gpt-neo-1.3M` has been corrected to `gpt-neo-1.3B`
* Regeneration is no longer triggered when writing to `keysecondary` of
a non-selective key
* Handle `genamt` changes in generation modifier properly
* Writing to `kobold.settings.numseqs` from a generation modifier no
longer affects
* Formatting options in `kobold.settings` have been fixed
* Added aliases for setting names
* Fix behaviour of editing story chunks from a generation modifier
* Warnings are now yellow instead of red
* kobold.logits is now the raw logits prior to being filtered, like
the documentation says, rather than after being filtered
* Some erroneous comments and error messages have been corrected
* These parts of the API have now been implemented properly:
* `compute_context()` methods
* `kobold.authorsnote`
* `kobold.restart_generation()`
35 lines
909 B
Lua
35 lines
909 B
Lua
-- Default core script
|
|
-- Runs all generation modifiers and output modifiers in forward order, and
|
|
-- runs all input modifiers in reverse order
|
|
|
|
kobold, koboldcore = require("bridge")() -- This line is optional and is only for EmmyLua type annotations
|
|
|
|
---@class KoboldCoreScript
|
|
local corescript = {}
|
|
|
|
|
|
-- Run all the input modifiers from bottom to top
|
|
function corescript.inmod()
|
|
for i = #koboldcore.userscripts, 1, -1 do
|
|
local userscript = koboldcore.userscripts[i]
|
|
userscript.inmod()
|
|
end
|
|
end
|
|
|
|
-- Run all the generation modifiers from top to bottom
|
|
function corescript.genmod()
|
|
for i, userscript in ipairs(koboldcore.userscripts) do
|
|
userscript.genmod()
|
|
end
|
|
end
|
|
|
|
-- Run all the generation modifiers from top to bottom
|
|
function corescript.outmod()
|
|
for i, userscript in ipairs(koboldcore.userscripts) do
|
|
userscript.outmod()
|
|
end
|
|
end
|
|
|
|
|
|
return corescript
|