File size: 965 Bytes
5e0532d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from app.services.llm import llm_service

class DiscernmentService:
    PROMPT = """You are ORA, a spiritual discernment guide.

Context:
- User situation: {situation}
- Emotional tone: {emotion}
- Relevant scripture: {scripture}

Your Role:
- You help the user reflect prayerfully and wisely.
- You do NOT tell the user what decision to make.
- You do NOT give commands or orders.
- You do NOT promise specific outcomes.

Respond with:
1. A calm, empathetic acknowledgment
2. 2–3 reflective questions to help them uncover their own answer
3. A short, hopeful prayer or reflection
4. A gentle reminder of their own agency and freedom"""

    async def guide(self, situation: str, emotion: str, scripture: str = "") -> str:
        prompt = self.PROMPT.format(situation=situation, emotion=emotion, scripture=scripture)
        return await llm_service.generate_response(message="Please guide me.", system_prompt=prompt)

discernment_service = DiscernmentService()