langchain.chat_models.mlflow_ai_gateway.ChatMLflowAIGateway¶
class langchain.chat_models.mlflow_ai_gateway.ChatMLflowAIGateway[source]¶
Bases: BaseChatModel
Wrapper around chat 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.chat_models import ChatMLflowAIGateway
chat = ChatMLflowAIGateway(
    gateway_uri="<your-mlflow-ai-gateway-uri>",
    route="<your-mlflow-ai-gateway-chat-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¶
Whether to cache the response.
param callback_manager: Optional[BaseCallbackManager] = None¶
Callback manager to add to the run trace.
param callbacks: Callbacks = None¶
Callbacks to add to the run trace.
param gateway_uri: Optional[str] = None¶
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.
param params: Optional[langchain.chat_models.mlflow_ai_gateway.ChatParams] = 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.