langchain_community.llms.mlflow.Mlflow¶
class langchain_community.llms.mlflow.Mlflow[source]¶
Bases: LLM
Wrapper around completions LLMs in MLflow.
To use, you should have the mlflow[genai] python package installed.
For more information, see https://mlflow.org/docs/latest/llms/deployments/server.html.
Example
from langchain_community.llms import Mlflow
completions = Mlflow(
    target_uri="http://localhost:5000",
    endpoint="test",
    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 endpoint: str [Required]¶
The endpoint to use.
param extra_params: Dict[str, Any] [Optional]¶
Any extra parameters to pass to the endpoint.
param max_tokens: Optional[int] = None¶
The maximum number of tokens to generate.
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.
param n: int = 1¶
The number of completion choices to generate.
param stop: Optional[List[str]] = None¶
The stop sequence.
param tags: Optional[List[str]] = None¶
Tags to add to the run trace.
param target_uri: str [Required]¶
The target URI to use.
param temperature: float = 0.0¶
The sampling temperature.
param verbose: bool [Optional]¶
Whether to print out response text.