class_docstr: Client for interacting with Databricks serving endpoints.
  
  Example:
  
  First, set up credentials for authentication:
  
  .. code-block:: bash
  
      export DATABRICKS_HOST=...
      export DATABRICKS_TOKEN=...
  
  .. seealso::
  
      See https://docs.databricks.com/en/dev-tools/auth.html for other authentication methods.
  
  Then, create a deployment client and use it to interact with Databricks serving endpoints:
  
  .. code-block:: python
  
      from mlflow.deployments import get_deploy_client
  
      client = get_deploy_client("databricks")
      endpoints = client.list_endpoints()
      assert endpoints == [
          {
              "name": "chat",
              "creator": "alice@company.com",
              "creation_timestamp": 0,
              "last_updated_timestamp": 0,
              "state": {...},
              "config": {...},
              "tags": [...],
              "id": "88fd3f75a0d24b0380ddc40484d7a31b",
          },
      ]
class_docstr_tok: ["Client","for","interacting","with","Databricks","serving","endpoints",".","Example",":","First",",","set","up","credentials","for","authentication",":","..","code-block",":",":","bash","export","DATABRICKS_HOST=","...","export","DATABRICKS_TOKEN=","...","..","seealso",":",":","See","https",":","\/\/docs.databricks.com\/en\/dev-tools\/auth.html","for","other","authentication","methods",".","Then",",","create","a","deployment","client","and","use","it","to","interact","with","Databricks","serving","endpoints",":","..","code-block",":",":","python","from","mlflow.deployments","import","get_deploy_client","client","=","get_deploy_client","(","``","databricks","''",")","endpoints","=","client.list_endpoints","(",")","assert","endpoints","==","[","{","``","name","''",":","``","chat","''",",","``","creator","''",":","``","alice","@","company.com","''",",","``","creation_timestamp","''",":","0",",","``","last_updated_timestamp","''",":","0",",","``","state","''",":","{","...","}",",","``","config","''",":","{","...","}",",","``","tags","''",":","[","...","]",",","``","id","''",":","``","88fd3f75a0d24b0380ddc40484d7a31b","''",",","}",",","]"]
docstr: Query a serving endpoint with the provided model inputs.
  See https://docs.databricks.com/api/workspace/servingendpoints/query for request/response
  schema.
  
  Args:
      deployment_name: Unused.
      inputs: A dictionary containing the model inputs to query.
      endpoint: The name of the serving endpoint to query.
  
  Returns:
      A :py:class:`DatabricksEndpoint` object containing the query response.
  
  Example:
  
  .. code-block:: python
  
      from mlflow.deployments import get_deploy_client
  
      client = get_deploy_client("databricks")
      response = client.predict(
          endpoint="chat",
          inputs={
              "messages": [
                  {"role": "user", "content": "Hello!"},
              ],
          },
      )
      assert response == {
          "id": "chatcmpl-8OLm5kfqBAJD8CpsMANESWKpLSLXY",
          "object": "chat.completion",
          "created": 1700814265,
          "model": "gpt-4-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,
          },
      }
docstr_tok: ["Query","a","serving","endpoint","with","the","provided","model","inputs",".","See","https",":","\/\/docs.databricks.com\/api\/workspace\/servingendpoints\/query","for","request\/response","schema",".","Args",":","deployment_name",":","Unused",".","inputs",":","A","dictionary","containing","the","model","inputs","to","query",".","endpoint",":","The","name","of","the","serving","endpoint","to","query",".","Returns",":","A",":","py",":","class",":","`","DatabricksEndpoint","`","object","containing","the","query","response",".","Example",":","..","code-block",":",":","python","from","mlflow.deployments","import","get_deploy_client","client","=","get_deploy_client","(","``","databricks","''",")","response","=","client.predict","(","endpoint=","''","chat","''",",","inputs=","{","``","messages","''",":","[","{","``","role","''",":","``","user","''",",","``","content","''",":","``","Hello","!","``","}",",","]",",","}",",",")","assert","response","==","{","``","id","''",":","``","chatcmpl-8OLm5kfqBAJD8CpsMANESWKpLSLXY","''",",","``","object","''",":","``","chat.completion","''",",","``","created","''",":","1700814265",",","``","model","''",":","``","gpt-4-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",",","}",",","}"]
code: def predict(self, deployment_name=None, inputs=None, endpoint=None):
      """
      Query a serving endpoint with the provided model inputs.
      See https://docs.databricks.com/api/workspace/servingendpoints/query for request/response
      schema.
  
      Args:
          deployment_name: Unused.
          inputs: A dictionary containing the model inputs to query.
          endpoint: The name of the serving endpoint to query.
  
      Returns:
          A :py:class:`DatabricksEndpoint` object containing the query response.
  
      Example:
  
      .. code-block:: python
  
          from mlflow.deployments import get_deploy_client
  
          client = get_deploy_client("databricks")
          response = client.predict(
              endpoint="chat",
              inputs={
                  "messages": [
                      {"role": "user", "content": "Hello!"},
                  ],
              },
          )
          assert response == {
              "id": "chatcmpl-8OLm5kfqBAJD8CpsMANESWKpLSLXY",
              "object": "chat.completion",
              "created": 1700814265,
              "model": "gpt-4-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,
              },
          }
      """
      return self._call_endpoint(
          method="POST",
          prefix="/",
          route=posixpath.join(endpoint, "invocations"),
          json_body=inputs,
          timeout=MLFLOW_DEPLOYMENT_PREDICT_TIMEOUT.get(),
      )
  
imports: import posixpath
  from typing import Any, Dict, Optional
  from mlflow.deployments import BaseDeploymentClient
  from mlflow.deployments.constants import MLFLOW_DEPLOYMENT_CLIENT_REQUEST_RETRY_CODES, MLFLOW_DEPLOYMENT_PREDICT_TIMEOUT
  from mlflow.environment_variables import MLFLOW_HTTP_REQUEST_TIMEOUT
  from mlflow.utils import AttrDict
  from mlflow.utils.annotations import experimental
  from mlflow.utils.databricks_utils import get_databricks_host_creds
  from mlflow.utils.rest_utils import augmented_raise_for_status, http_request
label_desc: Use image node_id 7 for calling the DatabricksDeploymentClient obj's underlying member method code with example usage: obj.predict(deployment_name, inputs, endpoint) and returns: self