langchain
langchain copied to clipboard
add from to add texts from embeddings
Why
- Since making vectors of texts can be done outside of langchain Faiss, this PR is to add functionality to pass text and its vector pair to initialize and add embedding to Faiss.
What
- Add
from_embedding
method in Faiss to initialize Faiss index by passing the embeddings paired with original text made outside of the langchain. - Add
add_embedding
method to add embedding paired with original text to append the embedding made outside of the langchain.