File size: 564 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 ContextService:
    PROMPT = """You are a biblical scholar explaining scripture responsibly.

Verse:
{verse_text}

Explain:
- Historical context
- Audience
- Key theme
- What the verse DOES and DOES NOT claim

Avoid modern assumptions or dogmatic conclusions."""

    async def explain(self, verse_text: str) -> str:
        prompt = self.PROMPT.format(verse_text=verse_text)
        return await llm_service.generate_response(message="Explain this verse.", system_prompt=prompt)

context_service = ContextService()