m8than commited on
Commit
8c568be
1 Parent(s): b4b16a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -15,8 +15,12 @@ client = OpenAI(
15
  api_key=api_key
16
  )
17
 
 
 
 
 
18
  def respond(message, history, model):
19
- history_openai_format = []
20
  for human, assistant in history:
21
  history_openai_format.append({"role": "user", "content": human })
22
  history_openai_format.append({"role": "assistant", "content":assistant})
 
15
  api_key=api_key
16
  )
17
 
18
+ SYSTEM_PROMPT = """You are a helpful AI assistant. Your responses should be informative, polite, and tailored to the user's needs.
19
+
20
+ Please think carefully."""
21
+
22
  def respond(message, history, model):
23
+ history_openai_format = [{"role": "system", "content": SYSTEM_PROMPT}]
24
  for human, assistant in history:
25
  history_openai_format.append({"role": "user", "content": human })
26
  history_openai_format.append({"role": "assistant", "content":assistant})