diff --git a/modules/chat.py b/modules/chat.py index 9af2d68..1fbda6b 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -390,7 +390,7 @@ def load_character(character, name1, name2): shared.history['visible'] += [['', apply_extensions(greeting, "output")]] if shared.args.cai_chat: - return name1, name2, picture, greeting, context, generate_chat_html(shared.history['visible'], name1, name2) + return name1, name2, picture, greeting, context, generate_chat_html(shared.history['visible'], name1, name2, reset_cache=True) else: return name1, name2, picture, greeting, context, shared.history['visible'] diff --git a/modules/html_generator.py b/modules/html_generator.py index 98a536f..e1c085a 100644 --- a/modules/html_generator.py +++ b/modules/html_generator.py @@ -117,12 +117,13 @@ def get_image_cache(path): return image_cache[path][1] -def generate_chat_html(history, name1, name2): +def generate_chat_html(history, name1, name2, reset_cache=False): output = f'