refactor: update put_kv_data and get_kv_data methods in Context class to accept dictionary values

This commit is contained in:
Soulter
2025-11-27 18:10:21 +08:00
parent 21a7e742f1
commit a04d668cf6

View File

@@ -122,7 +122,7 @@ class Context(ABC):
async def put_kv_data(
self,
key: str,
value: str,
value: dict,
) -> None:
"""Insert a key-value pair data. The data will permanently stored in AstrBot unless user explicitly deleted.
@@ -132,7 +132,7 @@ class Context(ABC):
"""
...
async def get_kv_data(self, key: str) -> str | None:
async def get_kv_data(self, key: str) -> dict | None:
"""Get a value by key from the key-value store.
Args: