Spaces:
Runtime error
Runtime error
File size: 816 Bytes
105b369 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
from abc import ABC, abstractmethod
from typing import Optional, List
from phi.assistant.run import AssistantRun
class AssistantStorage(ABC):
@abstractmethod
def create(self) -> None:
raise NotImplementedError
@abstractmethod
def read(self, run_id: str) -> Optional[AssistantRun]:
raise NotImplementedError
@abstractmethod
def get_all_run_ids(self, user_id: Optional[str] = None) -> List[str]:
raise NotImplementedError
@abstractmethod
def get_all_runs(self, user_id: Optional[str] = None) -> List[AssistantRun]:
raise NotImplementedError
@abstractmethod
def upsert(self, row: AssistantRun) -> Optional[AssistantRun]:
raise NotImplementedError
@abstractmethod
def delete(self) -> None:
raise NotImplementedError
|