rivapereira123 commited on
Commit
2425d33
·
verified ·
1 Parent(s): e58c94d

Update core/utils/config.py

Browse files
Files changed (1) hide show
  1. core/utils/config.py +31 -19
core/utils/config.py CHANGED
@@ -1,27 +1,39 @@
1
-
2
  import os
3
 
4
- # Environment & API
5
  GROQ_API_KEY = os.getenv("GROQ_API_KEY")
6
 
7
- # Model Config
8
- DEFAULT_MODEL = "rivapereira123/medical-flan-t5"
 
 
 
 
 
 
 
9
 
10
- # Vector Store
11
- DEFAULT_VECTOR_DIR = "./vector_store"
 
 
 
 
 
 
 
 
 
 
 
 
12
 
13
- # Language Support
14
- DEFAULT_LANGUAGE = "en"
15
- SUPPORTED_LANGUAGES = ["en", "ar"]
 
 
16
 
17
- # System Prompts
18
- GAZA_PROMPT_HEADER = """You are a WHO-certified AI medical assistant for Gaza and similar low-resource regions.
19
- You must:
20
- - Follow WHO protocols
21
- - Prioritize resource-limited methods
22
- - Format responses with:
23
- 🩹 Immediate Actions
24
- ⚠️ Contraindications
25
- 💡 Resource Alternatives
26
- Always conclude with: 📞 Verify with Gaza Red Crescent (101) for emergencies.
27
  """
 
 
 
1
  import os
2
 
 
3
  GROQ_API_KEY = os.getenv("GROQ_API_KEY")
4
 
5
+ # Model names
6
+ GROQ_MODEL_NAME = "llama3-70b-8192"
7
+ FLAN_MODEL_NAME = "rivapereira123/medical-flan-t5"
8
+ FALLBACK_MODEL_NAME = "microsoft/DialoGPT-small"
9
+
10
+ # Default constants
11
+ VECTOR_STORE_DIR = "./vector_store"
12
+ MAX_CACHE_SIZE = 100
13
+ MAX_CONTEXT_CHARS = 1500
14
 
15
+ # System prompt for medical assistant
16
+ MEDICAL_SYSTEM_PROMPT = """
17
+ [STRICT GAZA MEDICAL PROTOCOL]
18
+ You are a WHO-certified medical assistant for Gaza. You MUST:
19
+ 1. Follow WHO war-zone protocols
20
+ 2. Reject unsafe treatments (ESPECIALLY syringe use for burns)
21
+ 3. Prioritize resource-scarce solutions
22
+ 4. Add Islamic medical considerations
23
+ 5. Format responses clearly with:
24
+ - 🩹 Immediate Actions
25
+ - ⚠️ Contraindications
26
+ - 💡 Resource Alternatives
27
+ 6. Include source references [Source X]
28
+ 7. Always add: "📞 Verify with Gaza Red Crescent (101)" for serious cases
29
 
30
+ OUTPUT EXAMPLE:
31
+ ### Burn Treatment ###
32
+ 🩹 Cool with clean water for 10-20 mins [Source 1]
33
+ ⚠️ Never apply ice directly [Source 2]
34
+ 💡 Use clean damp cloth if water scarce [Source 3]
35
 
36
+ 📍 Gaza Context: Adapt based on available supplies
37
+ 📞 Verify with Gaza Red Crescent (101) if severe
 
 
 
 
 
 
 
 
38
  """
39
+