From 44491da810536cd10d68631ec160e83e7f8d05ac Mon Sep 17 00:00:00 2001 From: Aries-ckt <916701291@qq.com> Date: Tue, 10 Sep 2024 10:44:32 +0800 Subject: [PATCH] fix(ChatKnowledge):full text storage truncate method error. (#1989) --- dbgpt/storage/full_text/base.py | 4 ++++ dbgpt/storage/vector_store/base.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dbgpt/storage/full_text/base.py b/dbgpt/storage/full_text/base.py index 6643f2373..5dfd90064 100644 --- a/dbgpt/storage/full_text/base.py +++ b/dbgpt/storage/full_text/base.py @@ -67,3 +67,7 @@ class FullTextStoreBase(IndexStoreBase): def delete_vector_name(self, index_name: str): """Delete name.""" + + def truncate(self) -> List[str]: + """Truncate the collection.""" + raise NotImplementedError diff --git a/dbgpt/storage/vector_store/base.py b/dbgpt/storage/vector_store/base.py index aaaafc5ab..bfa55aa4c 100644 --- a/dbgpt/storage/vector_store/base.py +++ b/dbgpt/storage/vector_store/base.py @@ -187,3 +187,7 @@ class VectorStoreBase(IndexStoreBase, ABC): List[str]: chunk ids. """ return await blocking_func_to_async(self._executor, self.load_document, chunks) + + def truncate(self) -> List[str]: + """Truncate the collection.""" + raise NotImplementedError