class_docstr: Client for interacting with OpenAI endpoints.
  
  Example:
  
  First, set up credentials for authentication:
  
  .. code-block:: bash
  
      export OPENAI_API_KEY=...
  
  .. seealso::
  
      See https://mlflow.org/docs/latest/python_api/openai/index.html for other authentication methods.
  
  Then, create a deployment client and use it to interact with OpenAI endpoints:
  
  .. code-block:: python
  
      from mlflow.deployments import get_deploy_client
  
      client = get_deploy_client("openai")
      client.predict(
          endpoint="gpt-3.5-turbo",
          inputs={
              "messages": [
                  {"role": "user", "content": "Hello!"},
              ],
          },
      )
class_docstr_tok: ["Client","for","interacting","with","OpenAI","endpoints",".","Example",":","First",",","set","up","credentials","for","authentication",":","..","code-block",":",":","bash","export","OPENAI_API_KEY=","...","..","seealso",":",":","See","https",":","\/\/mlflow.org\/docs\/latest\/python_api\/openai\/index.html","for","other","authentication","methods",".","Then",",","create","a","deployment","client","and","use","it","to","interact","with","OpenAI","endpoints",":","..","code-block",":",":","python","from","mlflow.deployments","import","get_deploy_client","client","=","get_deploy_client","(","``","openai","''",")","client.predict","(","endpoint=","''","gpt-3.5-turbo","''",",","inputs=","{","``","messages","''",":","[","{","``","role","''",":","``","user","''",",","``","content","''",":","``","Hello","!","``","}",",","]",",","}",",",")"]
docstr: Get information about a specific model.
docstr_tok: ["Get","information","about","a","specific","model","."]
code: def get_endpoint(self, endpoint):
      """
      Get information about a specific model.
      """
  
      _check_openai_key()
  
      api_config = _get_api_config_without_openai_dep()
      import requests
  
      if api_config.api_type in ("azure", "azure_ad", "azuread"):
          raise NotImplementedError(
              "Get endpoint is not implemented for Azure OpenAI API",
          )
      else:
          api_key = os.environ["OPENAI_API_KEY"]
          request_header = {"Authorization": f"Bearer {api_key}"}
  
          response = requests.get(
              f"https://api.openai.com/v1/models/{endpoint}",
              headers=request_header,
          )
  
          augmented_raise_for_status(response)
  
          return response.json()
  
imports: import logging
  import os
  from mlflow.exceptions import MlflowException
  from mlflow.protos.databricks_pb2 import INVALID_PARAMETER_VALUE
  from mlflow.utils.openai_utils import REQUEST_URL_CHAT, _OAITokenHolder, _OpenAIApiConfig, _OpenAIEnvVar
  from mlflow.utils.rest_utils import augmented_raise_for_status
  from mlflow.deployments import BaseDeploymentClient
label_desc: Use image node_id 11 for calling the OpenAIDeploymentClient obj's underlying member method code with example usage: obj.get_endpoint(endpoint) and returns: response