async def METHOD_NAME(self, payload: METHOD_NAME.RequestPayload) -> METHOD_NAME.ResponsePayload:
    payload = jsonable_encoder(payload, exclude_none=True)
    self.check_for_model_field(payload)
    key_mapping = {
        "stop": "stop_sequences",
        "candidate_count": "num_generations",
    }
    for k1, k2 in key_mapping.items():
        if k2 in payload:
            raise HTTPException(
                status_code=400, detail=f"Invalid parameter {k2}. Use {k1} instead."
            )
    # The range of Cohere's temperature is 0-5, but ours is 0-1, so we scale it.
    payload["temperature"] = 5 * payload["temperature"]
    payload = rename_payload_keys(payload, key_mapping)
    resp = await self._request(
        "generate",
        {"model": self.config.model.name, **payload},
    )
    # Response example (https://docs.cohere.com/reference/generate)
    # ```
    # {
    #   "id": "string",
    #   "generations": [
    #     {
    #       "id": "string",
    #       "text": "string"
    #     }
    #   ],
    #   "prompt": "string"
    # }
    # ```
    return METHOD_NAME.ResponsePayload(
        **{
            "candidates": [
                {
                    "text": c["text"],
                    "metadata": {},
                }
                for c in resp["generations"]
            ],
            "metadata": {
                "model": self.config.model.name,
                "route_type": self.config.route_type,
            },
        }
    )