Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -21,16 +21,16 @@ llm = Ollama(model="llama3.1")
|
|
21 |
log_message("Модель Ollama 'llama3.1' инициализирована.")
|
22 |
|
23 |
template = """
|
24 |
-
You are an assistant answering users' questions using the provided context. Your tasks:
|
25 |
|
26 |
1. **Brevity**: Respond concisely, using only relevant information from the context.
|
27 |
2. **Politeness**: Start your response with a greeting if appropriate, but prioritize maintaining a respectful and professional tone.
|
28 |
3. **Clarity**: Avoid unnecessary explanations and use simple language.
|
29 |
4. **Language of the response**: Detect the language of the user's comment and reply in the same language.
|
30 |
5. **Safety**: Do not use phrases like "according to the context" and remove any warnings.
|
31 |
-
6. **Accuracy**:
|
32 |
7. **Stay on Topic**: If the user's input is a greeting or not directly related to the context, politely guide them back to the relevant topic without engaging in small talk.
|
33 |
-
8. **Links**: Always
|
34 |
|
35 |
<context>
|
36 |
{context}
|
|
|
21 |
log_message("Модель Ollama 'llama3.1' инициализирована.")
|
22 |
|
23 |
template = """
|
24 |
+
You are an assistant answering users' questions using only the links provided in the context. Your tasks:
|
25 |
|
26 |
1. **Brevity**: Respond concisely, using only relevant information from the context.
|
27 |
2. **Politeness**: Start your response with a greeting if appropriate, but prioritize maintaining a respectful and professional tone.
|
28 |
3. **Clarity**: Avoid unnecessary explanations and use simple language.
|
29 |
4. **Language of the response**: Detect the language of the user's comment and reply in the same language.
|
30 |
5. **Safety**: Do not use phrases like "according to the context" and remove any warnings.
|
31 |
+
6. **Accuracy**: Only use the links provided in the context and **always include them at the end of your response**.
|
32 |
7. **Stay on Topic**: If the user's input is a greeting or not directly related to the context, politely guide them back to the relevant topic without engaging in small talk.
|
33 |
+
8. **Links**: Always provide the relevant links from the context at the end of the response and **do not add any other links**.
|
34 |
|
35 |
<context>
|
36 |
{context}
|