class_docstr: Client for interacting with the MLflow Deployments Server.
  
  Example:
  
  First, start the MLflow Deployments Server:
  
  .. code-block:: bash
  
      mlflow deployments start-server --config-path path/to/config.yaml
  
  Then, create a client and use it to interact with the server:
  
  .. code-block:: python
  
      from mlflow.deployments import get_deploy_client
  
      client = get_deploy_client("http://localhost:5000")
      endpoints = client.list_endpoints()
      assert [e.dict() for e in endpoints] == [
          {
              "name": "chat",
              "endpoint_type": "llm/v1/chat",
              "model": {"name": "gpt-3.5-turbo", "provider": "openai"},
              "endpoint_url": "http://localhost:5000/gateway/chat/invocations",
          },
      ]
docstr: Submit a query to a configured provider endpoint.
  
  Args:
      deployment_name: Unused.
      inputs: The inputs to the query, as a dictionary.
      endpoint: The name of the endpoint to query.
  
  Returns:
      A dictionary containing the response from the endpoint.
  
  Example:
  
  .. code-block:: python
  
      from mlflow.deployments import get_deploy_client
  
      client = get_deploy_client("http://localhost:5000")
  
      response = client.predict(
          endpoint="chat",
          inputs={"messages": [{"role": "user", "content": "Hello"}]},
      )
      assert response == {
          "id": "chatcmpl-8OLoQuaeJSLybq3NBoe0w5eyqjGb9",
          "object": "chat.completion",
          "created": 1700814410,
          "model": "gpt-3.5-turbo-0613",
          "choices": [
              {
                  "index": 0,
                  "message": {
                      "role": "assistant",
                      "content": "Hello! How can I assist you today?",
                  },
                  "finish_reason": "stop",
              }
          ],
          "usage": {
              "prompt_tokens": 9,
              "completion_tokens": 9,
              "total_tokens": 18,
          },
      }
  
  Additional parameters that are valid for a given provider and endpoint configuration can be
  included with the request as shown below, using an openai completions endpoint request as
  an example:
  
  .. code-block:: python
  
      from mlflow.deployments import get_deploy_client
  
      client = get_deploy_client("http://localhost:5000")
      client.predict(
          endpoint="completions",
          inputs={
              "prompt": "Hello!",
              "temperature": 0.3,
              "max_tokens": 500,
          },
      )
docstr_tok: ["Submit","a","query","to","a","configured","provider","endpoint",".","Args",":","deployment_name",":","Unused",".","inputs",":","The","inputs","to","the","query",",","as","a","dictionary",".","endpoint",":","The","name","of","the","endpoint","to","query",".","Returns",":","A","dictionary","containing","the","response","from","the","endpoint",".","Example",":","..","code-block",":",":","python","from","mlflow.deployments","import","get_deploy_client","client","=","get_deploy_client","(","``","http",":","\/\/localhost:5000","''",")","response","=","client.predict","(","endpoint=","''","chat","''",",","inputs=","{","``","messages","''",":","[","{","``","role","''",":","``","user","''",",","``","content","''",":","``","Hello","''","}","]","}",",",")","assert","response","==","{","``","id","''",":","``","chatcmpl-8OLoQuaeJSLybq3NBoe0w5eyqjGb9","''",",","``","object","''",":","``","chat.completion","''",",","``","created","''",":","1700814410",",","``","model","''",":","``","gpt-3.5-turbo-0613","''",",","``","choices","''",":","[","{","``","index","''",":","0",",","``","message","''",":","{","``","role","''",":","``","assistant","''",",","``","content","''",":","``","Hello","!","How","can","I","assist","you","today","?","``",",","}",",","``","finish_reason","''",":","``","stop","''",",","}","]",",","``","usage","''",":","{","``","prompt_tokens","''",":","9",",","``","completion_tokens","''",":","9",",","``","total_tokens","''",":","18",",","}",",","}","Additional","parameters","that","are","valid","for","a","given","provider","and","endpoint","configuration","can","be","included","with","the","request","as","shown","below",",","using","an","openai","completions","endpoint","request","as","an","example",":","..","code-block",":",":","python","from","mlflow.deployments","import","get_deploy_client","client","=","get_deploy_client","(","``","http",":","\/\/localhost:5000","''",")","client.predict","(","endpoint=","''","completions","''",",","inputs=","{","``","prompt","''",":","``","Hello","!","``",",","``","temperature","''",":","0.3",",","``","max_tokens","''",":","500",",","}",",",")"]
code: def predict(
      self, deployment_name=None, inputs=None, endpoint=None
  ) -> Dict[str, Any]:
      """
      Submit a query to a configured provider endpoint.
  
      Args:
          deployment_name: Unused.
          inputs: The inputs to the query, as a dictionary.
          endpoint: The name of the endpoint to query.
  
      Returns:
          A dictionary containing the response from the endpoint.
  
      Example:
  
      .. code-block:: python
  
          from mlflow.deployments import get_deploy_client
  
          client = get_deploy_client("http://localhost:5000")
  
          response = client.predict(
              endpoint="chat",
              inputs={"messages": [{"role": "user", "content": "Hello"}]},
          )
          assert response == {
              "id": "chatcmpl-8OLoQuaeJSLybq3NBoe0w5eyqjGb9",
              "object": "chat.completion",
              "created": 1700814410,
              "model": "gpt-3.5-turbo-0613",
              "choices": [
                  {
                      "index": 0,
                      "message": {
                          "role": "assistant",
                          "content": "Hello! How can I assist you today?",
                      },
                      "finish_reason": "stop",
                  }
              ],
              "usage": {
                  "prompt_tokens": 9,
                  "completion_tokens": 9,
                  "total_tokens": 18,
              },
          }
  
      Additional parameters that are valid for a given provider and endpoint configuration can be
      included with the request as shown below, using an openai completions endpoint request as
      an example:
  
      .. code-block:: python
  
          from mlflow.deployments import get_deploy_client
  
          client = get_deploy_client("http://localhost:5000")
          client.predict(
              endpoint="completions",
              inputs={
                  "prompt": "Hello!",
                  "temperature": 0.3,
                  "max_tokens": 500,
              },
          )
      """
      query_route = join_paths(
          MLFLOW_DEPLOYMENTS_ENDPOINTS_BASE,
          endpoint,
          MLFLOW_DEPLOYMENTS_QUERY_SUFFIX,
      )
      try:
          return self._call_endpoint(
              "POST",
              query_route,
              inputs,
              MLFLOW_DEPLOYMENT_PREDICT_TIMEOUT.get(),
          )
      except MlflowException as e:
          if isinstance(e.__cause__, requests.exceptions.Timeout):
              raise MlflowException(
                  message=(
                      "The provider has timed out while generating a response to your "
                      "query. Please evaluate the available parameters for the query "
                      "that you are submitting. Some parameter values and inputs can "
                      "increase the computation time beyond the allowable route "
                      f"timeout of {MLFLOW_DEPLOYMENT_PREDICT_TIMEOUT} "
                      "seconds."
                  ),
                  error_code=BAD_REQUEST,
              )
          raise e
  
imports: from typing import TYPE_CHECKING, Any, Dict, List, Optional
  import requests
  from mlflow import MlflowException
  from mlflow.deployments import BaseDeploymentClient
  from mlflow.deployments.constants import MLFLOW_DEPLOYMENT_CLIENT_REQUEST_RETRY_CODES, MLFLOW_DEPLOYMENT_PREDICT_TIMEOUT
  from mlflow.deployments.server.config import Endpoint
  from mlflow.deployments.server.constants import MLFLOW_DEPLOYMENTS_CRUD_ENDPOINT_BASE, MLFLOW_DEPLOYMENTS_ENDPOINTS_BASE, MLFLOW_DEPLOYMENTS_QUERY_SUFFIX
  from mlflow.deployments.utils import resolve_endpoint_url
  from mlflow.environment_variables import MLFLOW_HTTP_REQUEST_TIMEOUT
  from mlflow.protos.databricks_pb2 import BAD_REQUEST
  from mlflow.store.entities.paged_list import PagedList
  from mlflow.tracking._tracking_service.utils import _get_default_host_creds
  from mlflow.utils.annotations import experimental
  from mlflow.utils.rest_utils import augmented_raise_for_status, http_request
  from mlflow.utils.uri import join_paths
label_desc: Use image node_id 13 for calling the MlflowDeploymentClient obj's underlying member method code with example usage: obj.predict(deployment_name, inputs, endpoint) and returns: self