first commit
This commit is contained in:
parent
5c5d88c92f
commit
eb4f62c56d
41 changed files with 3851 additions and 19 deletions
36
docker_svc/agent/app/libs/check_medical.py
Normal file
36
docker_svc/agent/app/libs/check_medical.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue