|
|
from abc import ABC, abstractmethod |
|
|
from typing import Any |
|
|
|
|
|
class ILLMRunner(ABC): |
|
|
Type: str = "BaseLLM" |
|
|
IsEnabled: bool = True |
|
|
IsStateStarting: bool = False |
|
|
IsStateFailed: bool = False |
|
|
|
|
|
@abstractmethod |
|
|
async def StartProcess(self, llmServiceObj: dict) -> None: ... |
|
|
@abstractmethod |
|
|
async def RemoveProcess(self, sessionId: str) -> None: ... |
|
|
@abstractmethod |
|
|
async def StopRequest(self, sessionId: str) -> None: ... |
|
|
@abstractmethod |
|
|
async def SendInputAndGetResponse(self, llmServiceObj: dict) -> None: ... |
|
|
|