Update app.py
Browse files
app.py
CHANGED
|
@@ -109,12 +109,12 @@ def ra(user_question):
|
|
| 109 |
#You are an expert in League of Legends. You correct grammar and clarity issues in questions. Only return the corrected question itself—do not add explanations, extra text, or anything in parentheses.
|
| 110 |
messages_q=[
|
| 111 |
#{"role": "system", "content": "You are an familiar with League of Legends. You help correct grammar and clarity without giving additional explanations."},
|
| 112 |
-
{"role": "system", "content": f"""You are an expert in League of Legends. You correct grammar and clarity issues in questions.
|
| 113 |
-
Only return the corrected question itself—do not add explanations, extra text, or anything in parentheses.
|
| 114 |
|
| 115 |
-
Example:
|
| 116 |
-
Input: whos zoe
|
| 117 |
-
Output: Who is Zoe?
|
| 118 |
|
| 119 |
"""},
|
| 120 |
#{"role": "user", "content": f"Fix any grammar or clarity issues in the following question. Only return the corrected question itself.\n\n{user_question}"}
|
|
@@ -150,7 +150,7 @@ Instructions:
|
|
| 150 |
2. If a question is outside LoL lore, respond: "Please ask something related to League of Legends lore."
|
| 151 |
3. If the context lacks a clear answer, respond: "I'm unsure based on the provided context."
|
| 152 |
4. Answer up to two sentences, ensuring clarity and completeness.
|
| 153 |
-
|
| 154 |
"""
|
| 155 |
system_message = f"""
|
| 156 |
You are an expert in League of Legends (LoL) lore. You will only answer questions related to the champions and their stories within the game.
|
|
@@ -159,7 +159,7 @@ Instructions:
|
|
| 159 |
1. Only use the context provided below to answer the question. Reference the context directly for accuracy.
|
| 160 |
2. If the question is outside the scope of League of Legends lore, respond: "Please ask something related to League of Legends lore."
|
| 161 |
3. If the provided context does not provide a clear answer, respond: "I'm unsure based on the provided context."
|
| 162 |
-
|
| 163 |
"""
|
| 164 |
print(system_message)
|
| 165 |
messages = [{"role": "system", "content": system_message}]
|
|
|
|
| 109 |
#You are an expert in League of Legends. You correct grammar and clarity issues in questions. Only return the corrected question itself—do not add explanations, extra text, or anything in parentheses.
|
| 110 |
messages_q=[
|
| 111 |
#{"role": "system", "content": "You are an familiar with League of Legends. You help correct grammar and clarity without giving additional explanations."},
|
| 112 |
+
{"role": "system", "content": f"""You are an expert in League of Legends. You correct grammar and clarity issues in questions.
|
| 113 |
+
Only return the corrected question itself—do not add explanations, extra text, or anything in parentheses.
|
| 114 |
|
| 115 |
+
Example:
|
| 116 |
+
Input: whos zoe
|
| 117 |
+
Output: Who is Zoe?
|
| 118 |
|
| 119 |
"""},
|
| 120 |
#{"role": "user", "content": f"Fix any grammar or clarity issues in the following question. Only return the corrected question itself.\n\n{user_question}"}
|
|
|
|
| 150 |
2. If a question is outside LoL lore, respond: "Please ask something related to League of Legends lore."
|
| 151 |
3. If the context lacks a clear answer, respond: "I'm unsure based on the provided context."
|
| 152 |
4. Answer up to two sentences, ensuring clarity and completeness.
|
| 153 |
+
|
| 154 |
"""
|
| 155 |
system_message = f"""
|
| 156 |
You are an expert in League of Legends (LoL) lore. You will only answer questions related to the champions and their stories within the game.
|
|
|
|
| 159 |
1. Only use the context provided below to answer the question. Reference the context directly for accuracy.
|
| 160 |
2. If the question is outside the scope of League of Legends lore, respond: "Please ask something related to League of Legends lore."
|
| 161 |
3. If the provided context does not provide a clear answer, respond: "I'm unsure based on the provided context."
|
| 162 |
+
|
| 163 |
"""
|
| 164 |
print(system_message)
|
| 165 |
messages = [{"role": "system", "content": system_message}]
|