本页还没有译文
本页 15 段还没译成日本語,下面显示的是英文原文。Store integrations
还没翻译译自英文(docs.langchain.com)本页 15 段都还没译
Overview
LangChain provides a key-value store interface for storing and retrieving data by key. The key-value store interface in LangChain is primarily used for caching embeddings.
Interface
All BaseStores support the following interface:
mget(key: Sequence[str]) -> List[Optional[bytes]]: get the contents of multiple keys, returningNoneif the key does not existmset(key_value_pairs: Sequence[Tuple[str, bytes]]) -> None: set the contents of multiple keysmdelete(key: Sequence[str]) -> None: delete multiple keysyield_keys(prefix: Optional[str] = None) -> Iterator[str]: yield all keys in the store, optionally filtering by a prefix
Note
Base stores are designed to work multiple key-value pairs at once for efficiency. This saves on network round-trips and may allow for more efficient batch operations in the underlying store.
Built-in stores for local development
Custom stores
You can also implement your own custom store by extending the BaseStore class. See the store interface documentation for more details.
All key-value stores
AI 翻译查看英文原文