Add file-based document store and vector store (#96)
* Modify docstore and vectorstore objects to be reconstructable * Simplify the file docstore * Use the simple file docstore and vector store in MVP
This commit is contained in:
committed by
GitHub
parent
0ce3a8832f
commit
37c744b616
@@ -73,10 +73,13 @@ class LCEmbeddingMixin:
|
||||
return self._kwargs[name]
|
||||
return getattr(self._obj, name)
|
||||
|
||||
def dump(self):
|
||||
def dump(self, *args, **kwargs):
|
||||
from theflow.utils.modules import serialize
|
||||
|
||||
params = {key: serialize(value) for key, value in self._kwargs.items()}
|
||||
return {
|
||||
"__type__": f"{self.__module__}.{self.__class__.__qualname__}",
|
||||
**self._kwargs,
|
||||
**params,
|
||||
}
|
||||
|
||||
def specs(self, path: str):
|
||||
|
Reference in New Issue
Block a user