From 197e3e1f1af443ece7e9e8dc34a17a6ab43eefb1 Mon Sep 17 00:00:00 2001 From: Lex Lim Date: Tue, 20 Jun 2023 08:46:16 +0000 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D=E5=B5=8C?= =?UTF-8?q?=E5=A5=97=E7=B1=BB=E5=90=8D=E7=A7=B0=E9=87=8D=E5=A4=8D=E7=9A=84?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/model/embedding_search/page_index.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/model/embedding_search/page_index.py b/api/model/embedding_search/page_index.py index c995dce..0081050 100644 --- a/api/model/embedding_search/page_index.py +++ b/api/model/embedding_search/page_index.py @@ -36,16 +36,16 @@ def create_page_index_model(collection_id: int): if collection_id in page_index_model_list: return page_index_model_list[collection_id] else: - class PageIndexModel(AbstractPageIndexModel): + class _PageIndexModel(AbstractPageIndexModel): __tablename__ = "embedding_search_page_index_%s" % str(collection_id) embedding_index = sqlalchemy.Index(__tablename__ + "_embedding_idx", AbstractPageIndexModel.embedding, postgresql_using='ivfflat', postgresql_ops={'embedding': 'vector_cosine_ops'}) - page_index_model_list[collection_id] = PageIndexModel + page_index_model_list[collection_id] = _PageIndexModel - return PageIndexModel + return _PageIndexModel class PageIndexHelper: columns = [