"""PA interpreter chain builder."""
from __future__ import annotations
from typing import Any
from langchain_core.runnables import RunnableSerializable
from claim_validator.chains.base import build_chain
from claim_validator.chains.memory.manager import MemoryManager, MemoryType
from claim_validator.chains.output_schemas.pa_interpreter import PAInterpreterOutput
from claim_validator.chains.prompts.pa_interpreter import PA_INTERPRETER_PROMPT

def build_pa_interpreter_chain(config: dict[str, Any], memory_manager: MemoryManager | None = None) -> RunnableSerializable:
    return build_chain(prompt=PA_INTERPRETER_PROMPT, output_schema=PAInterpreterOutput, config=config,
                       memory_manager=memory_manager, input_key="pa_response")
