20 lines
402 B
Python
20 lines
402 B
Python
from abc import ABC, abstractmethod
|
|
from typing import List, Dict, AsyncGenerator
|
|
|
|
|
|
class LLM(ABC):
|
|
@abstractmethod
|
|
async def generate_response_stream(
|
|
self, transcript: str, history: List[Dict[str, str]], selected_role: dict
|
|
) -> AsyncGenerator[str, None]:
|
|
|
|
pass
|
|
|
|
async def close(self):
|
|
|
|
pass
|
|
|
|
async def connect(self):
|
|
|
|
pass
|