InfinityEmbeddingsLocal()Optimized Infinity embedding models.
https://github.com/michaelfeil/infinity This class deploys a local Infinity instance to embed text. The class requires async usage.
Infinity is a class to interact with Embedding Models on https://github.com/michaelfeil/infinity
Example:
.. code-block:: python
from langchain_community.embeddings import InfinityEmbeddingsLocal async with InfinityEmbeddingsLocal( model="BAAI/bge-small-en-v1.5", revision=None, device="cpu", ) as embedder: embeddings = await engine.aembed_documents(["text1", "text2"])