File size: 772 Bytes
246d201 |
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 |
from __future__ import annotations
from abc import ABC, abstractmethod
from openhands.core.config.app_config import AppConfig
from openhands.server.settings import Settings
class SettingsStore(ABC):
"""
Storage for ConversationInitData. May or may not support multiple users depending on the environment
"""
@abstractmethod
async def load(self) -> Settings | None:
"""Load session init data"""
@abstractmethod
async def store(self, settings: Settings):
"""Store session init data"""
@classmethod
@abstractmethod
async def get_instance(
cls, config: AppConfig, user_id: str | None
) -> SettingsStore:
"""Get a store for the user represented by the token given"""
|