From b51220ed1917c9bb863441a4c8a42001b0581ee5 Mon Sep 17 00:00:00 2001 From: crazywoola <427733928@qq.com> Date: Wed, 14 May 2025 16:52:27 +0800 Subject: [PATCH] fix: lint --- api/core/rag/datasource/vdb/pgvector/pgvector.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/api/core/rag/datasource/vdb/pgvector/pgvector.py b/api/core/rag/datasource/vdb/pgvector/pgvector.py index d687a15ac3..04e9cf801e 100644 --- a/api/core/rag/datasource/vdb/pgvector/pgvector.py +++ b/api/core/rag/datasource/vdb/pgvector/pgvector.py @@ -1,7 +1,7 @@ +import hashlib import json import logging import uuid -import hashlib from contextlib import contextmanager from typing import Any @@ -258,15 +258,9 @@ class PGVector(BaseVector): # PG hnsw index only support 2000 dimension or less # ref: https://github.com/pgvector/pgvector?tab=readme-ov-file#indexing if dimension <= 2000: - cur.execute(SQL_CREATE_INDEX.format( - table_name=self.table_name, - index_hash=self.index_hash - )) + cur.execute(SQL_CREATE_INDEX.format(table_name=self.table_name, index_hash=self.index_hash)) if self.pg_bigm: - cur.execute(SQL_CREATE_INDEX_PG_BIGM.format( - table_name=self.table_name, - index_hash=self.index_hash - )) + cur.execute(SQL_CREATE_INDEX_PG_BIGM.format(table_name=self.table_name, index_hash=self.index_hash)) redis_client.set(collection_exist_cache_key, 1, ex=3600)