code: def _prepare_completion_response_payload(self, resp):
      return completions.ResponsePayload(
          id=resp["id"],
          # The chat models response from OpenAI is of object type "chat.completion". Since
          # we're using the completions response format here, we hardcode the "text_completion"
          # object type in the response instead
          object="text_completion",
          created=resp["created"],
          model=resp["model"],
          choices=[
              completions.Choice(
                  index=idx,
                  text=c["message"]["content"],
                  finish_reason=c["finish_reason"],
              )
              for idx, c in enumerate(resp["choices"])
          ],
          usage=completions.CompletionsUsage(
              prompt_tokens=resp["usage"]["prompt_tokens"],
              completion_tokens=resp["usage"]["completion_tokens"],
              total_tokens=resp["usage"]["total_tokens"],
          ),
      )
  
file_path: mlflow/mlflow/gateway/providers/openai.py
imports: from mlflow.exceptions import MlflowException
  from mlflow.gateway.config import OpenAIAPIType, OpenAIConfig, RouteConfig
  from mlflow.gateway.providers.base import BaseProvider
  from mlflow.gateway.providers.utils import send_request
  from mlflow.gateway.schemas import chat, completions, embeddings
  from mlflow.utils.uri import append_to_uri_path, append_to_uri_query_params
label_desc: Use image node_id 6 for calling the OpenAIProvider obj's underlying member method code with example usage: obj._prepare_completion_response_payload(resp) and returns: completions