code: def model_to_embeddings(cls, resp, config):
      # Response example (https://docs.cohere.com/reference/embed):
      # ```
      # {
      #   "id": "bc57846a-3e56-4327-8acc-588ca1a37b8a",
      #   "texts": [
      #     "hello world"
      #   ],
      #   "embeddings": [
      #     [
      #       3.25,
      #       0.7685547,
      #       2.65625,
      #       ...
      #       -0.30126953,
      #       -2.3554688,
      #       1.2597656
      #     ]
      #   ],
      #   "meta": [
      #     {
      #       "api_version": [
      #         {
      #           "version": "1"
      #         }
      #       ]
      #     }
      #   ]
      # }
      # ```
      return embeddings.ResponsePayload(
          data=[
              embeddings.EmbeddingObject(
                  embedding=output,
                  index=idx,
              )
              for idx, output in enumerate(resp["embeddings"])
          ],
          model=config.model.name,
          usage=embeddings.EmbeddingsUsage(
              prompt_tokens=None,
              total_tokens=None,
          ),
      )
  
file_path: mlflow/mlflow/gateway/providers/cohere.py
imports: import time
  from typing import Any, Dict
  from fastapi import HTTPException
  from fastapi.encoders import jsonable_encoder
  from mlflow.gateway.config import CohereConfig, RouteConfig
  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 2 for calling the CohereAdapter obj's underlying member method code with example usage: obj.model_to_embeddings(cls, resp, config) and returns: embeddings