You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/langchain/vectorstores/base.py

14 lines
355 B
Python

"""Interface for vector stores."""
from abc import ABC, abstractmethod
from typing import List
from langchain.docstore.document import Document
class VectorStore(ABC):
"""Interface for vector stores."""
@abstractmethod
def similarity_search(self, query: str, k: int = 4) -> List[Document]:
"""Return docs most similar to query."""