mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-05 06:35:15 +00:00
Fix prompt corruption when continuing with context truncation (#7439)
This commit is contained in:
parent
1dda5e4711
commit
bde496ea5d
1 changed files with 2 additions and 0 deletions
|
|
@ -434,6 +434,8 @@ def generate_chat_prompt(user_input, state, **kwargs):
|
|||
messages.append({"role": "user", "content": "fake user message replace me"})
|
||||
|
||||
def make_prompt(messages):
|
||||
if _continue:
|
||||
messages = copy.deepcopy(messages)
|
||||
last_message = messages[-1].copy()
|
||||
if _continue:
|
||||
if state['mode'] == 'chat-instruct':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue