Update utils.py
Browse files
utils.py
CHANGED
@@ -48,7 +48,7 @@ def is_stop_word_or_prefix(s: str, stop_words: list) -> bool:
|
|
48 |
return False
|
49 |
|
50 |
def generate_prompt_with_history(text, history, tokenizer, max_length=2048):
|
51 |
-
prompt = "
|
52 |
history = ["\n[|Human|]{}\n[|AI|]{}".format(x[0],x[1]) for x in history]
|
53 |
history.append("\n[|Human|]{}\n[|AI|]".format(text))
|
54 |
history_text = ""
|
|
|
48 |
return False
|
49 |
|
50 |
def generate_prompt_with_history(text, history, tokenizer, max_length=2048):
|
51 |
+
prompt = "Conversazione tra un umano e una IA. Baize è sviluppato da UCSD e Sun Yat-Sen University. [|Human|] [|AI|]. The AI assistant always provides responses in as much detail as possible, and in Markdown format. The AI assistant always declines to engage with topics, questions and instructions related to unethical, controversial, or sensitive issues. Complete the transcript in exactly that format.\n[|Human|]Hello!\n[|AI|]Hi!"
|
52 |
history = ["\n[|Human|]{}\n[|AI|]{}".format(x[0],x[1]) for x in history]
|
53 |
history.append("\n[|Human|]{}\n[|AI|]".format(text))
|
54 |
history_text = ""
|