Simple
SimpleKVStore #
Bases: MutableMappingKVStore[dict]
Simple in-memory Key-Value store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
Optional[DATA_TYPE]
|
data to initialize the store with |
None
|
Source code in llama-index-core/llama_index/core/storage/kvstore/simple_kvstore.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
persist #
persist(persist_path: str, fs: Optional[AbstractFileSystem] = None) -> None
Persist the store.
Source code in llama-index-core/llama_index/core/storage/kvstore/simple_kvstore.py
35 36 37 38 39 40 41 42 43 44 45 |
|
from_persist_path
classmethod
#
from_persist_path(persist_path: str, fs: Optional[AbstractFileSystem] = None) -> SimpleKVStore
Load a SimpleKVStore from a persist path and filesystem.
Source code in llama-index-core/llama_index/core/storage/kvstore/simple_kvstore.py
47 48 49 50 51 52 53 54 55 56 57 |
|
to_dict #
to_dict() -> dict
Save the store as dict.
Source code in llama-index-core/llama_index/core/storage/kvstore/simple_kvstore.py
59 60 61 |
|
from_dict
classmethod
#
from_dict(save_dict: dict) -> SimpleKVStore
Load a SimpleKVStore from dict.
Source code in llama-index-core/llama_index/core/storage/kvstore/simple_kvstore.py
63 64 65 66 |
|