mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-29 10:59:32 +01:00
Stop character pic from being cached when changing chars or clearing. (#798)
Tested on both FF and chromium
This commit is contained in:
parent
7f66421369
commit
8203ce0cac
@ -155,7 +155,7 @@ def generate_cai_chat_html(history, name1, name2, reset_cache=False):
|
|||||||
output = f'<style>{cai_css}</style><div class="chat" id="chat">'
|
output = f'<style>{cai_css}</style><div class="chat" id="chat">'
|
||||||
|
|
||||||
# The time.time() is to prevent the brower from caching the image
|
# The time.time() is to prevent the brower from caching the image
|
||||||
suffix = f"?{time.time()}" if reset_cache else ''
|
suffix = f"?{time.time()}" if reset_cache else f"?{name2}"
|
||||||
img_bot = f'<img src="file/cache/pfp_character.png{suffix}">' if Path("cache/pfp_character.png").exists() else ''
|
img_bot = f'<img src="file/cache/pfp_character.png{suffix}">' if Path("cache/pfp_character.png").exists() else ''
|
||||||
img_me = f'<img src="file/cache/pfp_me.png{suffix}">' if Path("cache/pfp_me.png").exists() else ''
|
img_me = f'<img src="file/cache/pfp_me.png{suffix}">' if Path("cache/pfp_me.png").exists() else ''
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user