mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-06-07 06:06:20 -04:00
Fix 'Start reply with' (closes #7033)
This commit is contained in:
parent
28e6bd4fcd
commit
7c29879e79
1 changed files with 10 additions and 4 deletions
|
@ -806,9 +806,12 @@ def remove_last_message(history):
|
|||
return html.unescape(last[0]), history
|
||||
|
||||
|
||||
def send_dummy_message(textbox, state):
|
||||
def send_dummy_message(text, state):
|
||||
history = state['history']
|
||||
text = textbox['text']
|
||||
|
||||
# Handle both dict and string inputs
|
||||
if isinstance(text, dict):
|
||||
text = text['text']
|
||||
|
||||
# Initialize metadata if not present
|
||||
if 'metadata' not in history:
|
||||
|
@ -822,9 +825,12 @@ def send_dummy_message(textbox, state):
|
|||
return history
|
||||
|
||||
|
||||
def send_dummy_reply(textbox, state):
|
||||
def send_dummy_reply(text, state):
|
||||
history = state['history']
|
||||
text = textbox['text']
|
||||
|
||||
# Handle both dict and string inputs
|
||||
if isinstance(text, dict):
|
||||
text = text['text']
|
||||
|
||||
# Initialize metadata if not present
|
||||
if 'metadata' not in history:
|
||||
|
|
Loading…
Add table
Reference in a new issue