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

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +1 -1
utils.py CHANGED
@@ -49,7 +49,7 @@ def is_stop_word_or_prefix(s: str, stop_words: list) -> bool:
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 = ""
 
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 in deutsch. Die Antworten des KI Assistenten sind immer so ausführlich wie möglich und in Markdown Schreibweise und in deutscher Sprache. Wenn nötig übersetzt er sie ins Deutsche. 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 = ""