rr19tech commited on
Commit
c117d87
·
verified ·
1 Parent(s): ed9e130

Updated system prompt

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -9,7 +9,8 @@ tokenizer = AutoTokenizer.from_pretrained(model_id)
9
 
10
  def chat(message, history):
11
  # 1. Format the conversation using the official template
12
- messages = [{"role": "user", "content": message}]
 
13
  prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
14
 
15
  # 2. Generate with a 'stop' token
 
9
 
10
  def chat(message, history):
11
  # 1. Format the conversation using the official template
12
+ messages = [{"role": "user", "content": message},
13
+ {"role": "system", "content": "Use context if relevant, otherwise answer generally."},]
14
  prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
15
 
16
  # 2. Generate with a 'stop' token