Fixed context usage calculation
This commit is contained in:
@@ -2,7 +2,14 @@ from typing import Iterator
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
class LlmEngine(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def infer(self, system_prompt: str, main_context: str) -> Iterator[str]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def token_count(self, system_prompt: str, main_context: str) -> int:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def token_limit(self) -> int:
|
||||
pass
|
||||
Reference in New Issue
Block a user