Unify the 3 interface modes (#3554)

This commit is contained in:
oobabooga 2023-08-13 01:12:15 -03:00 committed by GitHub
parent bf70c19603
commit a1a9ec895d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 660 additions and 714 deletions

View file

@ -59,7 +59,7 @@ def chat_input_modifier(text, visible_text, state):
"""
return text, visible_text
def input_modifier(string, state):
def input_modifier(string, state, is_chat=False):
"""
In default/notebook modes, modifies the whole prompt.
@ -92,7 +92,7 @@ def logits_processor_modifier(processor_list, input_ids):
processor_list.append(MyLogits())
return processor_list
def output_modifier(string, state):
def output_modifier(string, state, is_chat=False):
"""
Modifies the LLM output before it gets presented.