Update app.py
Browse files
app.py
CHANGED
|
@@ -106,9 +106,10 @@ from langchain_community.llms.huggingface_hub import HuggingFaceHub
|
|
| 106 |
def ra(user_question):
|
| 107 |
#prompt = f"You know things about League of Legends. Please correct the following question for grammar and clarity. Do not give explaination."
|
| 108 |
#prompt = f"You know things about League of Legends. Please ONLY correct the following question for grammar and clarity. Do NOT give explaination:\n{user_question}\nCorrected question:"
|
| 109 |
-
|
| 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": "user", "content": f"Fix any grammar or clarity issues in the following question. Only return the corrected question itself.\n\n{user_question}"}
|
| 113 |
]
|
| 114 |
res = client_bis.chat_completion(messages_q,
|
|
|
|
| 106 |
def ra(user_question):
|
| 107 |
#prompt = f"You know things about League of Legends. Please correct the following question for grammar and clarity. Do not give explaination."
|
| 108 |
#prompt = f"You know things about League of Legends. Please ONLY correct the following question for grammar and clarity. Do NOT give explaination:\n{user_question}\nCorrected 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": "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."},
|
| 113 |
{"role": "user", "content": f"Fix any grammar or clarity issues in the following question. Only return the corrected question itself.\n\n{user_question}"}
|
| 114 |
]
|
| 115 |
res = client_bis.chat_completion(messages_q,
|