code: def _construct_query_data(self, prompt):
      from mlflow.gateway import get_route
  
      route_type = get_route(self.model_route).route_type
  
      if route_type == "llm/v1/completions":
          return {"prompt": prompt}
      elif route_type == "llm/v1/chat":
          return {"messages": [{"content": prompt, "role": "user"}]}
      else:
          raise MlflowException(
              "Error when constructing gateway query: "
              f"Unsupported route type for _PromptlabModel: {route_type}"
          )
  
file_path: mlflow/mlflow/promptlab/__init__.py
imports: import os
  import re
  from typing import List
  import yaml
  from mlflow.exceptions import MlflowException
  from mlflow.version import VERSION
label_desc: Use image node_id 3 for calling the _PromptlabModel obj's underlying member method code with example usage: obj._construct_query_data(prompt) and returns: dict, dict