MlflowAIGatewayEmbeddings#
- class langchain_community.embeddings.mlflow_gateway.MlflowAIGatewayEmbeddings[source]#
Bases:
Embeddings
,BaseModel
MLflow AI Gateway embeddings.
To use, you should have the
mlflow[gateway]
python package installed. For more information, see https://mlflow.org/docs/latest/gateway/index.html.Example
from langchain_community.embeddings import MlflowAIGatewayEmbeddings embeddings = MlflowAIGatewayEmbeddings( gateway_uri="<your-mlflow-ai-gateway-uri>", route="<your-mlflow-ai-gateway-embeddings-route>" )
- param gateway_uri: str | None = None#
The URI for the MLflow AI Gateway API.
- param route: str [Required]#
The route to use for the MLflow AI Gateway API.
- async aembed_documents(texts: list[str]) list[list[float]] #
Asynchronous Embed search docs.
- Parameters:
texts (list[str]) – List of text to embed.
- Returns:
List of embeddings.
- Return type:
list[list[float]]
- async aembed_query(text: str) list[float] #
Asynchronous Embed query text.
- Parameters:
text (str) – Text to embed.
- Returns:
Embedding.
- Return type:
list[float]
Examples using MlflowAIGatewayEmbeddings