code: def query(route: str, data):
      """
      Issues a query request to a configured service through a named route on the Gateway Server.
      This function will interface with a configured route name (examples below) and return the
      response from the provider in a standardized format.
  
      Args:
          route: The name of the configured route. Route names can be obtained by running
              `mlflow.gateway.search_routes()`
          data: The request payload to be submitted to the route. The exact configuration of
              the expected structure varies based on the route configuration.
  
      Returns:
          The response from the configured route endpoint provider in a standardized format.
  
      Chat example:
  
      .. code-block:: python
  
          from mlflow.gateway import query, set_gateway_uri
  
          set_gateway_uri(gateway_uri="http://my.gateway:9000")
          response = query(
              "my_chat_route",
              {"messages": [{"role": "user", "content": "What is the best day of the week?"}]},
          )
  
      Completions example:
  
      .. code-block:: python
  
          from mlflow.gateway import query, set_gateway_uri
  
          set_gateway_uri(gateway_uri="http://my.gateway:9000")
          response = query("a_completions_route", {"prompt": "Where do we go from"})
  
      Embeddings example:
  
      .. code-block:: python
  
          from mlflow.gateway import query, set_gateway_uri
  
          set_gateway_uri(gateway_uri="http://my.gateway:9000")
          response = query(
              "embeddings_route", {"text": ["I like spaghetti", "and sushi", "but not together"]}
          )
  
      Additional parameters that are valid for a given provider and route configuration can be
      included with the request as shown below, using an openai completions route request as
      an example:
  
      .. code-block:: python
  
          from mlflow.gateway import query, set_gateway_uri
  
          set_gateway_uri(gateway_uri="http://my.gateway:9000")
          response = query(
              "a_completions_route",
              {
                  "prompt": "Give me an example of a properly formatted pytest unit test",
                  "temperature": 0.6,
                  "max_tokens": 1000,
              },
          )
      """
      return MlflowGatewayClient().query(route, data)
  
file_path: mlflow/mlflow/gateway/fluent.py
imports: from typing import Any, Dict, List, Optional
  from mlflow.gateway.client import MlflowGatewayClient
  from mlflow.gateway.config import LimitsConfig, Route
  from mlflow.gateway.constants import MLFLOW_GATEWAY_SEARCH_ROUTES_PAGE_SIZE
  from mlflow.gateway.utils import gateway_deprecated
  from mlflow.utils import get_results_from_paginated_fn
label_desc: Use image node_id 7 for calling a global function with example usage: query(route, data) and returns: MlflowGatewayClient