Update app.py
Browse files
app.py
CHANGED
@@ -73,13 +73,13 @@ def generate_response(user_query, relevant_segment):
|
|
73 |
messages.append({"role": "user", "content": user_message})
|
74 |
|
75 |
response = openai.ChatCompletion.create(
|
76 |
-
model="gpt-
|
77 |
messages=messages,
|
78 |
max_tokens=4000,
|
79 |
-
temperature=0.
|
80 |
top_p=1,
|
81 |
-
frequency_penalty=0,
|
82 |
-
presence_penalty=0
|
83 |
)
|
84 |
|
85 |
# Extract the response text
|
@@ -108,7 +108,7 @@ def query_model(question):
|
|
108 |
|
109 |
# Define the welcome message and specific topics the chatbot can provide information about
|
110 |
welcome_message = """
|
111 |
-
# 🪷 Welcome to CalmConnect!
|
112 |
|
113 |
## Your AI-driven assistant for destressing and extracurricular opportunity queries. Created by Olivia W, Alice T, and Cindy W of the 2024 Kode With Klossy CITY Camp.
|
114 |
"""
|
@@ -119,9 +119,9 @@ topics = """
|
|
119 |
- Arts and Crafts
|
120 |
- Destressing strategies (Breathing Exercises, stretches, etc.)
|
121 |
|
122 |
-
###
|
123 |
- Engineering
|
124 |
-
-
|
125 |
- Research : STEM
|
126 |
- Finance
|
127 |
- Law / Political Science / Debate
|
@@ -131,9 +131,9 @@ topics = """
|
|
131 |
- Medicine / Biology
|
132 |
- Literature / Writing
|
133 |
- College Prep
|
134 |
-
- Advocacy: Environment or Identity
|
|
|
135 |
- Study Abroad
|
136 |
-
- General (unsure of what you want to do)
|
137 |
|
138 |
### Or you can talk to our online therapist about the topics below!
|
139 |
- Mental Health
|
|
|
73 |
messages.append({"role": "user", "content": user_message})
|
74 |
|
75 |
response = openai.ChatCompletion.create(
|
76 |
+
model="gpt-4o",
|
77 |
messages=messages,
|
78 |
max_tokens=4000,
|
79 |
+
temperature=0.5,
|
80 |
top_p=1,
|
81 |
+
frequency_penalty=0.5,
|
82 |
+
presence_penalty=0.5,
|
83 |
)
|
84 |
|
85 |
# Extract the response text
|
|
|
108 |
|
109 |
# Define the welcome message and specific topics the chatbot can provide information about
|
110 |
welcome_message = """
|
111 |
+
# 🪷 Welcome to CalmConnect! 🪷
|
112 |
|
113 |
## Your AI-driven assistant for destressing and extracurricular opportunity queries. Created by Olivia W, Alice T, and Cindy W of the 2024 Kode With Klossy CITY Camp.
|
114 |
"""
|
|
|
119 |
- Arts and Crafts
|
120 |
- Destressing strategies (Breathing Exercises, stretches, etc.)
|
121 |
|
122 |
+
### If you are interested in the Student Opportunities below, type this in our CalmConnect Chat: " "
|
123 |
- Engineering
|
124 |
+
- Technology / Computer Science
|
125 |
- Research : STEM
|
126 |
- Finance
|
127 |
- Law / Political Science / Debate
|
|
|
131 |
- Medicine / Biology
|
132 |
- Literature / Writing
|
133 |
- College Prep
|
134 |
+
- Advocacy: Non-Profit, Environment or Identity
|
135 |
+
- Volunteering
|
136 |
- Study Abroad
|
|
|
137 |
|
138 |
### Or you can talk to our online therapist about the topics below!
|
139 |
- Mental Health
|