Improve the model to gpt-4o and improve the system template to force the model to be simpler when the user asks
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ from dotenv import load_dotenv
|
|
| 11 |
load_dotenv()
|
| 12 |
|
| 13 |
# ChatOpenAI Templates
|
| 14 |
-
system_template = """You are a helpful assistant who always speaks in a pleasant tone!
|
| 15 |
"""
|
| 16 |
|
| 17 |
user_template = """{input}
|
|
@@ -22,7 +22,7 @@ Think through your response step by step.
|
|
| 22 |
@cl.on_chat_start # marks a function that will be executed at the start of a user session
|
| 23 |
async def start_chat():
|
| 24 |
settings = {
|
| 25 |
-
"model": "gpt-
|
| 26 |
"temperature": 0,
|
| 27 |
"max_tokens": 500,
|
| 28 |
"top_p": 1,
|
|
|
|
| 11 |
load_dotenv()
|
| 12 |
|
| 13 |
# ChatOpenAI Templates
|
| 14 |
+
system_template = """You are a helpful assistant who always speaks in a pleasant tone! If the user asks for a summary, you will be penalized if your summary is a similar length compared to the original. If the user asks you to explain to a beginner, you will be penalized if your explanation is too long or complicated.
|
| 15 |
"""
|
| 16 |
|
| 17 |
user_template = """{input}
|
|
|
|
| 22 |
@cl.on_chat_start # marks a function that will be executed at the start of a user session
|
| 23 |
async def start_chat():
|
| 24 |
settings = {
|
| 25 |
+
"model": "gpt-4o",
|
| 26 |
"temperature": 0,
|
| 27 |
"max_tokens": 500,
|
| 28 |
"top_p": 1,
|