mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-09 16:28:48 +01:00
Make KoboldStory
iterators methods instead of static functions
This commit is contained in:
parent
03453c4e27
commit
3b87c58de9
@ -623,7 +623,7 @@ return function(_python, _bridged)
|
||||
local KoboldStory_mt = setmetatable({}, metawrapper)
|
||||
|
||||
---@return fun(): KoboldStoryChunk, table, nil
|
||||
function KoboldStory.forward_iter()
|
||||
function KoboldStory:forward_iter()
|
||||
local nxt, iterator = _python.iter(bridged.vars.actions)
|
||||
local run_once = false
|
||||
local f = function()
|
||||
@ -647,7 +647,7 @@ return function(_python, _bridged)
|
||||
end
|
||||
|
||||
---@return fun(): KoboldStoryChunk, table, nil
|
||||
function KoboldStory.reverse_iter()
|
||||
function KoboldStory:reverse_iter()
|
||||
local nxt, iterator = _python.iter(_python.builtins.reversed(bridged.vars.actions))
|
||||
local last_run = false
|
||||
local f = function()
|
||||
|
Loading…
x
Reference in New Issue
Block a user