from abc import ABC, abstractmethod from langchain_core.messages import BaseMessage class LLMInterface(ABC): @abstractmethod def query(self, messages: list[BaseMessage]) -> BaseMessage: """Query the LLM with a list of messages""" pass @abstractmethod async def aquery(self, messages: list[BaseMessage]) -> BaseMessage: """Asynchronously query the LLM with a list of messages""" pass