mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-17 12:10:49 +01:00
Allow Lua to stop generation from input modifier
This commit is contained in:
parent
e9ed8602b2
commit
6e6e0b2b4d
@ -1865,7 +1865,7 @@ def actionsubmit(data, actionmode=0, force_submit=False):
|
||||
assert False
|
||||
# Start the game
|
||||
vars.gamestarted = True
|
||||
if(not vars.noai):
|
||||
if(not vars.noai and vars.lua_koboldbridge.generating):
|
||||
# Save this first action as the prompt
|
||||
vars.prompt = data
|
||||
# Clear the startup text from game screen
|
||||
@ -1905,7 +1905,7 @@ def actionsubmit(data, actionmode=0, force_submit=False):
|
||||
vars.actions.append(data)
|
||||
update_story_chunk('last')
|
||||
|
||||
if(not vars.noai):
|
||||
if(not vars.noai and vars.lua_koboldbridge.generating):
|
||||
# Off to the tokenizer!
|
||||
calcsubmit(data)
|
||||
emit('from_server', {'cmd': 'scrolldown', 'data': ''}, broadcast=True)
|
||||
|
@ -1607,7 +1607,7 @@ return function(_python, _bridged)
|
||||
function koboldbridge.execute_inmod()
|
||||
local r
|
||||
koboldbridge.regeneration_required = false
|
||||
koboldbridge.generating = false
|
||||
koboldbridge.generating = true
|
||||
koboldbridge.userstate = "inmod"
|
||||
koboldbridge.generated_cols = 0
|
||||
koboldbridge.generated = {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user