first commit

This commit is contained in:
Stefano Rossi 2025-07-10 01:43:01 +02:00
parent 5c5d88c92f
commit eb4f62c56d
Signed by: chadmin
GPG key ID: 9EFA2130646BC893
41 changed files with 3851 additions and 19 deletions

View file

@ -0,0 +1,36 @@
def is_medical_query(message: str) -> bool:
"""
Check if the user message contains medical keywords. This function is case-insensitive.
:param message: The user message or any string to check.
:return: True if the message contains medical keywords, False otherwise.
"""
medical_keywords = [
"health",
"doctor",
"medicine",
"disease",
"symptom",
"treatment",
"salute",
"medico",
"malattia",
"sintomo",
"cura",
"sanità",
"santé",
"médecin",
"médicament",
"maladie",
"symptôme",
"traitement",
"gesundheit",
"arzt",
"medizin",
"krankheit",
"symptom",
"behandlung",
]
message_lower = message.lower()
return any(keyword in message_lower for keyword in medical_keywords)