from __future__ import annotations

from dataclasses import dataclass

from analogai.deepthink.messaging.question_answering.enums.synthesized_text_type import (
    SynthesizedTextType,
)


@dataclass(frozen=True)
class SynthesisStrategy:
    text_type: SynthesizedTextType
    include_raw_answer: bool


EXACT_MATCH_STRATEGY = SynthesisStrategy(
    text_type=SynthesizedTextType.EXACT_MATCH,
    include_raw_answer=True,
)

DETAILED_STRATEGY = SynthesisStrategy(
    text_type=SynthesizedTextType.DETAILED,
    include_raw_answer=False,
)

HYBRID_STRATEGY = SynthesisStrategy(
    text_type=SynthesizedTextType.HYBRID,
    include_raw_answer=False,
)

SYNTHESIS_STRATEGIES: dict[SynthesizedTextType, SynthesisStrategy] = {
    SynthesizedTextType.EXACT_MATCH: EXACT_MATCH_STRATEGY,
    SynthesizedTextType.DETAILED: DETAILED_STRATEGY,
    SynthesizedTextType.HYBRID: HYBRID_STRATEGY,
}
