Skip to main content

InMemoryByteStore

The InMemoryByteStore is a non-persistent implementation of ByteStore that stores everything in a Python dictionary.

from langchain.storage import InMemoryByteStore

store = InMemoryByteStore()

store.mset([("k1", b"v1"), ("k2", b"v2")])
print(store.mget(["k1", "k2"]))

API Reference:

[b'v1', b'v2']

Was this page helpful?


You can leave detailed feedback on GitHub.