Update app.py
Browse files
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})
|