Disable the hijack after using it
This commit is contained in:
parent
ad83b1b828
commit
85f914b9b9
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue