mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-30 08:12:53 +00:00
core: default implementation for embed_documents
This commit is contained in:
parent
18386c16c7
commit
4671ad8227
@ -33,7 +33,6 @@ class Embeddings(ABC):
|
||||
an async native implementation for performance reasons.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def embed_documents(self, texts: list[str]) -> list[list[float]]:
|
||||
"""Embed search docs.
|
||||
|
||||
@ -43,6 +42,7 @@ class Embeddings(ABC):
|
||||
Returns:
|
||||
List of embeddings.
|
||||
"""
|
||||
return [self.embed_query(text) for text in texts]
|
||||
|
||||
@abstractmethod
|
||||
def embed_query(self, text: str) -> list[float]:
|
||||
|
Loading…
Reference in New Issue
Block a user