mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
Disable the hijack after using it
This commit is contained in:
parent
ad83b1b828
commit
85f914b9b9
@ -96,6 +96,7 @@ def chatbot_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typical
|
|||||||
custom_prompt_generator = None
|
custom_prompt_generator = None
|
||||||
for extension, _ in extensions_module.iterator():
|
for extension, _ in extensions_module.iterator():
|
||||||
if hasattr(extension, 'input_hijack') and extension.input_hijack['state'] == True:
|
if hasattr(extension, 'input_hijack') and extension.input_hijack['state'] == True:
|
||||||
|
extension.input_hijack['state'] = False
|
||||||
text, visible_text = extension.input_hijack['value']
|
text, visible_text = extension.input_hijack['value']
|
||||||
if custom_prompt_generator is None and hasattr(extension, 'custom_prompt_generator'):
|
if custom_prompt_generator is None and hasattr(extension, 'custom_prompt_generator'):
|
||||||
custom_prompt_generator = extension.custom_prompt_generator
|
custom_prompt_generator = extension.custom_prompt_generator
|
||||||
|
Loading…
Reference in New Issue
Block a user