langchain.embeddings.mlflow_gateway.MlflowAIGatewayEmbeddings¶
- class langchain.embeddings.mlflow_gateway.MlflowAIGatewayEmbeddings(*, route: str, gateway_uri: Optional[str] = None)[source]¶
Bases:
Embeddings,BaseModelWrapper around embeddings LLMs in the MLflow AI Gateway.
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.embeddings import MlflowAIGatewayEmbeddings embeddings = MlflowAIGatewayEmbeddings( gateway_uri="<your-mlflow-ai-gateway-uri>", route="<your-mlflow-ai-gateway-embeddings-route>" )
- param gateway_uri: Optional[str] = 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.
- async aembed_query(text: str) List[float]¶
Asynchronous Embed query text.