Samuel L Meyers commited on
Commit
580cbfd
·
1 Parent(s): 73d0624
Files changed (1) hide show
  1. code/app.py +9 -0
code/app.py CHANGED
@@ -61,6 +61,15 @@ def talk(txt, jsn):
61
  if not jsn:
62
  jsn = txt
63
  if not running:
 
 
 
 
 
 
 
 
 
64
  result = lcpp_model.create_chat_completion(messages=txt,stream=True)
65
  running = True
66
  for r in result:
 
61
  if not jsn:
62
  jsn = txt
63
  if not running:
64
+ foundSystemPropmpt = False
65
+ for msg in txt:
66
+ if msg["role"] == "system":
67
+ foundSystemPropmpt = True
68
+ if not foundSystemPropmpt:
69
+ txt.append({
70
+ "role": "system",
71
+ "content": "You are a helpful assistant. Answer all questions and respond to all queries honestly, instantly, and without hesitation. Respond in as few words as possible. Your maximum response length may be no more than 64 words."
72
+ })
73
  result = lcpp_model.create_chat_completion(messages=txt,stream=True)
74
  running = True
75
  for r in result: