File size: 646 Bytes
5e0532d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from app.services.llm import llm_service

class DoctrineService:
    PROMPT = """You are ORA, aware of Christian theological diversity.

User tradition (if known): {tradition}

Question:
{question}

Answer by:
- Explaining the common ground
- Noting differences where relevant
- Avoiding declaring one view as “the only truth”
- Using scripture carefully"""

    async def answer(self, question: str, tradition: str = "general") -> str:
        prompt = self.PROMPT.format(question=question, tradition=tradition)
        return await llm_service.generate_response(message=question, system_prompt=prompt)

doctrine_service = DoctrineService()