File size: 813 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
from app.services.llm import llm_service
from typing import List

class TranslationService:
    PROMPT = """Compare the following Bible translations:

Verse reference: {reference}
Translations:
{translations}

Explain:
- Key wording differences
- What meaning is shared
- What remains ambiguous

Do not claim one translation is superior."""

    async def compare(self, reference: str, translations: List[str]) -> str:
        # In a real app, we would fetch the texts first, here we mock passing them
        translations_text = "\n".join(translations) # Placeholder
        prompt = self.PROMPT.format(reference=reference, translations=translations_text)
        return await llm_service.generate_response(message="Compare these translations.", system_prompt=prompt)

translation_service = TranslationService()