Spaces:
Sleeping
Sleeping
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
|