Spaces:
Running
Running
Update src/models.py
Browse files- src/models.py +12 -2
src/models.py
CHANGED
@@ -20,9 +20,19 @@ medical_llm = CTransformers(
|
|
20 |
|
21 |
# Prompt template for generating responses
|
22 |
template = """
|
23 |
-
You are a versatile AI assistant that can provide both medical advice and help users with general concerns
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
"""
|
25 |
-
|
26 |
# Compile the prompt template using LangChain
|
27 |
prompt = ChatPromptTemplate.from_template(template)
|
28 |
|
|
|
20 |
|
21 |
# Prompt template for generating responses
|
22 |
template = """
|
23 |
+
You are a versatile AI assistant that can provide both medical advice and help users with general concerns, emotions, and questions outside the medical field. Your responses should be empathetic, supportive, and insightful, regardless of the topic.
|
24 |
+
Previous conversation history:
|
25 |
+
{history}
|
26 |
+
Current user input:
|
27 |
+
{input}
|
28 |
+
Guidelines for responding:
|
29 |
+
1. Provide a single, clear response directly addressing the user's current input.
|
30 |
+
2. Do not include any meta-information, instructions, or unrelated content in your response.
|
31 |
+
3. If the user mentions a medical concern, offer practical advice.
|
32 |
+
4. If the user talks about personal emotions, like feeling sad or hurt, respond with empathy and support.
|
33 |
+
5. Always keep your responses concise and relevant to the user's question or statement.
|
34 |
+
Your response:
|
35 |
"""
|
|
|
36 |
# Compile the prompt template using LangChain
|
37 |
prompt = ChatPromptTemplate.from_template(template)
|
38 |
|