🔧 (FAISS.py): Remove unused import and methods, refactor class name to improve consistency and clarity
This commit is contained in:
parent
528845ad98
commit
f26dd89dfa
1 changed files with 2 additions and 15 deletions
|
|
@ -1,17 +1,16 @@
|
|||
from typing import List
|
||||
|
||||
from langchain_community.vectorstores import FAISS
|
||||
from langchain_core.retrievers import BaseRetriever
|
||||
from loguru import logger
|
||||
|
||||
from langflow.custom import Component
|
||||
from langflow.base.vectorstores.model import LCVectorStoreComponent
|
||||
from langflow.field_typing import Text
|
||||
from langflow.helpers.data import docs_to_data
|
||||
from langflow.io import BoolInput, HandleInput, IntInput, Output, StrInput
|
||||
from langflow.schema import Data
|
||||
|
||||
|
||||
class FaissVectorStoreComponent(Component):
|
||||
class FaissVectorStoreComponent(LCVectorStoreComponent):
|
||||
"""
|
||||
FAISS Vector Store with search capabilities
|
||||
"""
|
||||
|
|
@ -83,18 +82,6 @@ class FaissVectorStoreComponent(Component):
|
|||
]
|
||||
|
||||
def build_vector_store(self) -> FAISS:
|
||||
"""
|
||||
Builds the Vector Store object.
|
||||
"""
|
||||
return self._build_faiss()
|
||||
|
||||
def build_base_retriever(self) -> BaseRetriever:
|
||||
"""
|
||||
Builds the BaseRetriever object.
|
||||
"""
|
||||
return self._build_faiss()
|
||||
|
||||
def _build_faiss(self) -> FAISS:
|
||||
"""
|
||||
Builds the FAISS object.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue