Construct FAISS wrapper from raw documents asynchronously.
afrom_texts(
cls,
texts: list[str],
embedding: Embeddings,
metadatas: Optional[List[dict]] = None,
ids: Optional[List[str]] = None,
**kwargs: Any = {}
) -> FAISSThis is a user friendly interface that:
This is intended to be a quick way to get started.
Example:
.. code-block:: python
from langchain_community.vectorstores import FAISS from langchain_community.embeddings import OpenAIEmbeddings
embeddings = OpenAIEmbeddings() faiss = await FAISS.afrom_texts(texts, embeddings)