+
    aKj                     ,    ^ RI HtHt  ! R R]4      tR# )    )ABCabstractmethodc                   @   a  ] tR t^t o Rt]V 3R lR l4       tRtV tR# )LLMProvidera  Provider-agnostic interface every LLM backend must implement.

Every service (itinerary generation, reply drafting, ...) is written against this
interface only - never against a vendor SDK directly. Swapping OpenAI for Anthropic,
or cloud for a local Ollama model, is a one-line change in providers/factory.py and
an env var; nothing in app/services/ or app/prompts.py has to change.
c                <   < V ^8  d   QhRS[ RS[S[,          RS[/# )   system_promptmessagesreturn)strlistdict)format__classdict__s   ":C:\xampp\htdocs\meridian\meridian-ai\app\providers\base.py__annotate__LLMProvider.__annotate__   s&     " "3 "$t* " "    c                    \         h)a  Run one completion and return the parsed JSON object the model produced.

`messages` is a list of {"role": "user"|"assistant", "content": str} - the
system prompt is passed separately since not every provider's wire format
allows a "system" entry inside the messages list (Anthropic doesn't).

Raises whatever the underlying SDK raises on a transport/API error, and
json.JSONDecodeError if the model's output can't be parsed as JSON even after
the implementation's own cleanup - callers are expected to catch and wrap both.
)NotImplementedError)selfr	   r
   s   &&&r   complete_jsonLLMProvider.complete_json   s
     "!r    N)	__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes____classdictcell__)r   s   @r   r   r      s      " "r   r   N)abcr   r   r   r   r   r   <module>r#      s    #"# "r   