Chelsea / llm /utils /lc_interface.py
CineAI's picture
4172637469634d6f6e6b6579733a33302e30372e3234
e294914
raw
history blame
621 Bytes
from abc import ABC, abstractmethod
from typing import Dict, Optional
class LCInterface(ABC):
@abstractmethod
def execution(self):
"""Method execution LLM model based on HuggingFace or Langchain"""
pass
# {"model_name": "./models/model_name"}
@abstractmethod
def clear_llm(self, unused_model_dict: Optional[Dict[str, str]], current_lc: str) -> None:
"""Method clear unused LLM"""
pass
@abstractmethod
def get_unused(self, current_lc: str) -> Optional[Dict[str, str]]:
"""Method getting LLM that unused and forming corresponding dict"""
pass