Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,9 @@ Every now and then, try to use an example from something I'm interested in outsi
|
|
| 15 |
Begin by asking me my name, the topic of our conversation, and the type of assignment I am working on.
|
| 16 |
"""
|
| 17 |
|
| 18 |
-
#model = "gpt-3.5-turbo"
|
|
|
|
|
|
|
| 19 |
def CustomChatGPT(message, history):
|
| 20 |
history_openai_format = [{"role": "system", "content": sys_message}]
|
| 21 |
for human, assistant in history:
|
|
@@ -24,7 +26,7 @@ def CustomChatGPT(message, history):
|
|
| 24 |
history_openai_format.append({"role": "user", "content": message})
|
| 25 |
|
| 26 |
response = openai.ChatCompletion.create(
|
| 27 |
-
model = "gpt-
|
| 28 |
messages = history_openai_format,
|
| 29 |
temperature = 1.0,
|
| 30 |
stream=True
|
|
|
|
| 15 |
Begin by asking me my name, the topic of our conversation, and the type of assignment I am working on.
|
| 16 |
"""
|
| 17 |
|
| 18 |
+
#model = "gpt-3.5-turbo" # free and fast
|
| 19 |
+
#model = "gpt-4" # latest and greatest
|
| 20 |
+
|
| 21 |
def CustomChatGPT(message, history):
|
| 22 |
history_openai_format = [{"role": "system", "content": sys_message}]
|
| 23 |
for human, assistant in history:
|
|
|
|
| 26 |
history_openai_format.append({"role": "user", "content": message})
|
| 27 |
|
| 28 |
response = openai.ChatCompletion.create(
|
| 29 |
+
model = "gpt-3.5-turbo",
|
| 30 |
messages = history_openai_format,
|
| 31 |
temperature = 1.0,
|
| 32 |
stream=True
|