hugo1234 commited on
Commit
2772e90
1 Parent(s): 815efc4

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +1 -1
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 = "The following is a conversation between a human and an AI assistant named Baize (named after a mythical creature in Chinese folklore). Baize is an open-source AI assistant developed by UCSD and Sun Yat-Sen University. The human and the AI assistant take turns chatting. Human statements start with [|Human|] and AI assistant statements start with [|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 = ""
 
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 = ""