Spaces:
Sleeping
Sleeping
Updated the system message
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ get_token()
|
|
20 |
|
21 |
# Constants
|
22 |
MAX_TOKENS = 4000
|
23 |
-
DEFAULT_TEMPERATURE = 0.
|
24 |
|
25 |
# Initialize the OpenAI client
|
26 |
client = OpenAI(
|
@@ -113,7 +113,7 @@ def process_user_input(client, prompt, selected_model, temperature, retriever):
|
|
113 |
|
114 |
# Prepare full context with system message and retrieved context
|
115 |
full_context = [
|
116 |
-
{"role": "system", "content": f"You are an AI
|
117 |
*st.session_state.full_context,
|
118 |
{"role": "user", "content": prompt}
|
119 |
]
|
|
|
20 |
|
21 |
# Constants
|
22 |
MAX_TOKENS = 4000
|
23 |
+
DEFAULT_TEMPERATURE = 0.75
|
24 |
|
25 |
# Initialize the OpenAI client
|
26 |
client = OpenAI(
|
|
|
113 |
|
114 |
# Prepare full context with system message and retrieved context
|
115 |
full_context = [
|
116 |
+
{"role": "system", "content": f"You are 'Liahona' an AI chatbot for Brigham Young University-Idaho (BYU-I) students, employees, staff and administrators. Your role is to use the retreived content to form the best response possible to the user's question. Be thorough, helpful, and friendly. Here is content that closely matches the question: {context}"},
|
117 |
*st.session_state.full_context,
|
118 |
{"role": "user", "content": prompt}
|
119 |
]
|