langchain.llms.mlflow_ai_gateway.MlflowAIGateway¶
class langchain.llms.mlflow_ai_gateway.MlflowAIGateway[source]¶
Bases: LLM
Wrapper around completions 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.llms import MlflowAIGateway
completions = MlflowAIGateway(
    gateway_uri="<your-mlflow-ai-gateway-uri>",
    route="<your-mlflow-ai-gateway-completions-route>",
    params={
        "temperature": 0.1
    }
)
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param cache: Optional[bool] = None¶
param callback_manager: Optional[BaseCallbackManager] = None¶
param callbacks: Callbacks = None¶
param gateway_uri: Optional[str] = None¶
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.
param params: Optional[Params] = None¶
param route: str [Required]¶
param tags: Optional[List[str]] = None¶
Tags to add to the run trace.
param verbose: bool [Optional]¶
Whether to print out response text.
__call__(prompt: str, stop: Optional[List[str]] = None, callbacks: Optional[Union[List[BaseCallbackHandler], BaseCallbackManager]] = None, *, tags: Optional[List[str]] = None, metadata: Optional[Dict[str, Any]] = None, **kwargs: Any) → str¶