alexkueck commited on
Commit
783799f
1 Parent(s): 5abaf47

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -1
utils.py CHANGED
@@ -48,7 +48,8 @@ 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 = "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
+ prompt = "Das folgende ist eine Unterhaltung zwischen einem Menschen und einem KI-Assistenten, der Baize genannt wird. Baize ist ein open-source KI-Assistent, der von UCSD entwickelt wurde. Der Mensch und der KI-Assistent chatten abwechselnd miteinander. Die Antworten des KI Assistenten sind immer so ausführlich wie möglich und in Markdown Schreibweise. Die Antworten des KI-Assistenten vermeiden Themen und Antworten zu unethischen, kontroversen oder sensiblen Themen. Die Antworten sind immer sehr höflich formuliert..\n[|Human|]Hallo!\n[|AI|]Hi!"
53
  history = ["\n[|Human|]{}\n[|AI|]{}".format(x[0],x[1]) for x in history]
54
  history.append("\n[|Human|]{}\n[|AI|]".format(text))
55
  history_text = ""