mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
mtmd: Fix "continue" when an image is present
This commit is contained in:
parent
4663b1a56e
commit
0ea62d88f6
|
|
@ -868,6 +868,8 @@ def chatbot_wrapper(text, state, regenerate=False, _continue=False, loading_mess
|
||||||
'metadata': output['metadata']
|
'metadata': output['metadata']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
row_idx = len(output['internal']) - 1
|
||||||
|
|
||||||
# Collect image attachments for multimodal generation
|
# Collect image attachments for multimodal generation
|
||||||
image_attachments = []
|
image_attachments = []
|
||||||
if 'metadata' in output:
|
if 'metadata' in output:
|
||||||
|
|
@ -895,7 +897,6 @@ def chatbot_wrapper(text, state, regenerate=False, _continue=False, loading_mess
|
||||||
prompt = generate_chat_prompt(text, state, **kwargs)
|
prompt = generate_chat_prompt(text, state, **kwargs)
|
||||||
|
|
||||||
# Add timestamp for assistant's response at the start of generation
|
# Add timestamp for assistant's response at the start of generation
|
||||||
row_idx = len(output['internal']) - 1
|
|
||||||
update_message_metadata(output['metadata'], "assistant", row_idx, timestamp=get_current_timestamp(), model_name=shared.model_name)
|
update_message_metadata(output['metadata'], "assistant", row_idx, timestamp=get_current_timestamp(), model_name=shared.model_name)
|
||||||
|
|
||||||
# Generate
|
# Generate
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue