Update app.py
Browse files
app.py
CHANGED
|
@@ -108,7 +108,7 @@ def ra(user_question):
|
|
| 108 |
#res1 = client_bis.text_generation(f"You know things about League of Legends. Please correct the following question for grammar and clarity.Do not give explaination:\n{user_question}\nCorrected question:", stream =False,max_new_tokens= 10, temperature = 0.1 )
|
| 109 |
messages_q=[
|
| 110 |
#{"role": "system", "content": "You are an familiar with League of Legends. You help correct grammar and clarity without giving additional explanations."},
|
| 111 |
-
{"role": "system", "content": f"""You are an expert in League of Legends. You correct grammar and clarity issues in questions. You only return the corrected question itself without giving additional explanations.
|
| 112 |
Example:
|
| 113 |
Input: whos zoe
|
| 114 |
Output: Who is Zoe?
|
|
@@ -152,10 +152,12 @@ Instructions:
|
|
| 152 |
"""
|
| 153 |
system_message = f"""
|
| 154 |
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.
|
|
|
|
| 155 |
Instructions:
|
| 156 |
1. Only use the context provided below to answer the question. Reference the context directly for accuracy.
|
| 157 |
2. If the question is outside the scope of League of Legends lore, respond: "Please ask something related to League of Legends lore."
|
| 158 |
3. If the provided context does not provide a clear answer, respond: "I'm unsure based on the provided context."
|
|
|
|
| 159 |
"""
|
| 160 |
print(system_message)
|
| 161 |
messages = [{"role": "system", "content": system_message}]
|
|
|
|
| 108 |
#res1 = client_bis.text_generation(f"You know things about League of Legends. Please correct the following question for grammar and clarity.Do not give explaination:\n{user_question}\nCorrected question:", stream =False,max_new_tokens= 10, temperature = 0.1 )
|
| 109 |
messages_q=[
|
| 110 |
#{"role": "system", "content": "You are an familiar with League of Legends. You help correct grammar and clarity without giving additional explanations."},
|
| 111 |
+
{"role": "system", "content": f"""You are an expert in League of Legends. You correct grammar and clarity issues in questions. You only return the corrected question itself without giving additional explanations.
|
| 112 |
Example:
|
| 113 |
Input: whos zoe
|
| 114 |
Output: Who is Zoe?
|
|
|
|
| 152 |
"""
|
| 153 |
system_message = f"""
|
| 154 |
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.
|
| 155 |
+
|
| 156 |
Instructions:
|
| 157 |
1. Only use the context provided below to answer the question. Reference the context directly for accuracy.
|
| 158 |
2. If the question is outside the scope of League of Legends lore, respond: "Please ask something related to League of Legends lore."
|
| 159 |
3. If the provided context does not provide a clear answer, respond: "I'm unsure based on the provided context."
|
| 160 |
+
|
| 161 |
"""
|
| 162 |
print(system_message)
|
| 163 |
messages = [{"role": "system", "content": system_message}]
|