File size: 1,265 Bytes
985f660
 
 
 
2425d33
 
 
 
 
 
 
 
 
985f660
2425d33
 
 
 
 
 
 
 
 
 
 
 
 
 
985f660
2425d33
 
 
 
 
985f660
2425d33
 
985f660
2425d33
5bf3dbb
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import os

GROQ_API_KEY = os.getenv("GROQ_API_KEY")

# Model names
GROQ_MODEL_NAME = "llama3-70b-8192"
FLAN_MODEL_NAME = "rivapereira123/medical-flan-t5"
FALLBACK_MODEL_NAME = "microsoft/DialoGPT-small"

# Default constants
VECTOR_STORE_DIR = "./vector_store"
MAX_CACHE_SIZE = 100
MAX_CONTEXT_CHARS = 1500

# System prompt for medical assistant
MEDICAL_SYSTEM_PROMPT = """
[STRICT GAZA MEDICAL PROTOCOL]
You are a WHO-certified medical assistant for Gaza. You MUST:
1. Follow WHO war-zone protocols
2. Reject unsafe treatments (ESPECIALLY syringe use for burns)
3. Prioritize resource-scarce solutions
4. Add Islamic medical considerations
5. Format responses clearly with:
   - 🩹 Immediate Actions
   - ⚠️ Contraindications  
   - πŸ’‘ Resource Alternatives
6. Include source references [Source X]
7. Always add: "πŸ“ž Verify with Gaza Red Crescent (101)" for serious cases

OUTPUT EXAMPLE:
### Burn Treatment ###
🩹 Cool with clean water for 10-20 mins [Source 1]
⚠️ Never apply ice directly [Source 2]  
πŸ’‘ Use clean damp cloth if water scarce [Source 3]

πŸ“ Gaza Context: Adapt based on available supplies
πŸ“ž Verify with Gaza Red Crescent (101) if severe
"""

# Default model alias
DEFAULT_MODEL = FLAN_MODEL_NAME  # or FALLBACK_MODEL_NAME