mailpilot / app /llm /llm_interface.py
Yadav122's picture
Initial deployment of MailPilot application
7a88b43
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