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: Create a new serving endpoint with the provided name and configuration.
  
  See https://docs.databricks.com/api/workspace/servingendpoints/create for request/response
  schema.
  
  Args:
      name: The name of the serving endpoint to create.
      config: A dictionary containing the configuration of the serving endpoint to create.
  
  Returns:
      A :py:class:`DatabricksEndpoint` object containing the request response.
  
  Example:
  
  .. code-block:: python
  
      from mlflow.deployments import get_deploy_client
  
      client = get_deploy_client("databricks")
      endpoint = client.create_endpoint(
          name="chat",
          config={
              "served_entities": [
                  {
                      "name": "test",
                      "external_model": {
                          "name": "gpt-4",
                          "provider": "openai",
                          "task": "llm/v1/chat",
                          "openai_config": {
                              "openai_api_key": "{{secrets/scope/key}}",
                          },
                      },
                  }
              ],
          },
      )
      assert endpoint == {
          "name": "chat",
          "creator": "alice@company.com",
          "creation_timestamp": 0,
          "last_updated_timestamp": 0,
          "state": {...},
          "config": {...},
          "tags": [...],
          "id": "88fd3f75a0d24b0380ddc40484d7a31b",
      }
docstr_tok: ["Create","a","new","serving","endpoint","with","the","provided","name","and","configuration",".","See","https",":","\/\/docs.databricks.com\/api\/workspace\/servingendpoints\/create","for","request\/response","schema",".","Args",":","name",":","The","name","of","the","serving","endpoint","to","create",".","config",":","A","dictionary","containing","the","configuration","of","the","serving","endpoint","to","create",".","Returns",":","A",":","py",":","class",":","`","DatabricksEndpoint","`","object","containing","the","request","response",".","Example",":","..","code-block",":",":","python","from","mlflow.deployments","import","get_deploy_client","client","=","get_deploy_client","(","``","databricks","''",")","endpoint","=","client.create_endpoint","(","name=","''","chat","''",",","config=","{","``","served_entities","''",":","[","{","``","name","''",":","``","test","''",",","``","external_model","''",":","{","``","name","''",":","``","gpt-4","''",",","``","provider","''",":","``","openai","''",",","``","task","''",":","``","llm\/v1\/chat","''",",","``","openai_config","''",":","{","``","openai_api_key","''",":","``","{","{","secrets\/scope\/key","}","}","''",",","}",",","}",",","}","]",",","}",",",")","assert","endpoint","==","{","``","name","''",":","``","chat","''",",","``","creator","''",":","``","alice","@","company.com","''",",","``","creation_timestamp","''",":","0",",","``","last_updated_timestamp","''",":","0",",","``","state","''",":","{","...","}",",","``","config","''",":","{","...","}",",","``","tags","''",":","[","...","]",",","``","id","''",":","``","88fd3f75a0d24b0380ddc40484d7a31b","''",",","}"]
code: def create_endpoint(self, name, config=None):
      """
      Create a new serving endpoint with the provided name and configuration.
  
      See https://docs.databricks.com/api/workspace/servingendpoints/create for request/response
      schema.
  
      Args:
          name: The name of the serving endpoint to create.
          config: A dictionary containing the configuration of the serving endpoint to create.
  
      Returns:
          A :py:class:`DatabricksEndpoint` object containing the request response.
  
      Example:
  
      .. code-block:: python
  
          from mlflow.deployments import get_deploy_client
  
          client = get_deploy_client("databricks")
          endpoint = client.create_endpoint(
              name="chat",
              config={
                  "served_entities": [
                      {
                          "name": "test",
                          "external_model": {
                              "name": "gpt-4",
                              "provider": "openai",
                              "task": "llm/v1/chat",
                              "openai_config": {
                                  "openai_api_key": "{{secrets/scope/key}}",
                              },
                          },
                      }
                  ],
              },
          )
          assert endpoint == {
              "name": "chat",
              "creator": "alice@company.com",
              "creation_timestamp": 0,
              "last_updated_timestamp": 0,
              "state": {...},
              "config": {...},
              "tags": [...],
              "id": "88fd3f75a0d24b0380ddc40484d7a31b",
          }
  
      """
      config = config.copy() if config else {}  # avoid mutating config
      extras = {}
      for key in ("tags", "rate_limits"):
          if tags := config.pop(key, None):
              extras[key] = tags
      payload = {"name": name, "config": config, **extras}
      return self._call_endpoint(method="POST", json_body=payload)
  
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 8 for calling the DatabricksDeploymentClient obj's underlying member method code with example usage: obj.create_endpoint(name, config) and returns: self