forked from Archives/langchain
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.
14 lines
355 B
Python
14 lines
355 B
Python
2 years ago
|
"""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."""
|