code: def model_to_completions(cls, resp, config):
      stop_reason = (
          "stop" if resp["stop_reason"] == "stop_sequence" else "length"
      )
  
      return completions.ResponsePayload(
          created=int(time.time()),
          object="text_completion",
          model=resp["model"],
          choices=[
              completions.Choice(
                  index=0,
                  text=resp["completion"],
                  finish_reason=stop_reason,
              )
          ],
          usage=completions.CompletionsUsage(
              prompt_tokens=None,
              completion_tokens=None,
              total_tokens=None,
          ),
      )
  
file_path: mlflow/mlflow/gateway/providers/anthropic.py
imports: import time
  from fastapi import HTTPException
  from fastapi.encoders import jsonable_encoder
  from mlflow.gateway.config import AnthropicConfig, RouteConfig
  from mlflow.gateway.constants import MLFLOW_AI_GATEWAY_ANTHROPIC_DEFAULT_MAX_TOKENS, MLFLOW_AI_GATEWAY_ANTHROPIC_MAXIMUM_MAX_TOKENS
  from mlflow.gateway.providers.base import BaseProvider, ProviderAdapter
  from mlflow.gateway.providers.utils import rename_payload_keys, send_request
  from mlflow.gateway.schemas import chat, completions, embeddings
label_desc: Use image node_id 1 for calling the AnthropicAdapter obj's underlying member method code with example usage: obj.model_to_completions(cls, resp, config) and returns: completions