def _get_request_body(
        self,
        provider: str,
        payload: Union[str, List[str]],
        input_type: Literal["text", "query"],
    ) -> Any:
        """
        Build the request body as per the provider.
        Currently supported providers are amazon, cohere.

        amazon:
            Sample Payload of type str
            "Hello World!"

        cohere:
            Sample Payload of type dict of following format
            {
                'texts': ["This is a test document", "This is another document"],
                'input_type': 'search_document'
            }

        """
        if provider == PROVIDERS.AMAZON:
            if isinstance(payload, list):
                raise ValueError("Amazon provider does not support list of texts")

            titan_body_request = {"inputText": payload}

            # Titan Embedding V2.0 has additional body parameters to check.
            if "dimensions" in self.additional_kwargs:
                if self.model_name == Models.TITAN_EMBEDDING_V2_0:
                    titan_body_request["dimensions"] = self.additional_kwargs[
                        "dimensions"
                    ]
                else:
                    raise ValueError(
                        "'dimensions' param not supported outside of 'titan-embed-text-v2:0' model."
                    )
            if "normalize" in self.additional_kwargs:
                if self.model_name == Models.TITAN_EMBEDDING_V2_0:
                    titan_body_request["normalize"] = self.additional_kwargs[
                        "normalize"
                    ]
                else:
                    raise ValueError(
                        "'normalize' param not supported outside of 'titan-embed-text-v2:0' model."
                    )

            request_body = json.dumps(titan_body_request)

        elif provider == PROVIDERS.COHERE:
            input_types = {
                "text": "search_document",
                "query": "search_query",
            }
            payload = [payload] if isinstance(payload, str) else payload
            payload = [p[:2048] if len(p) > 2048 else p for p in payload]
            request_body = json.dumps(
                {
                    "texts": payload,
                    "input_type": input_types[input_type],
                }
            )
        else:
            raise ValueError("Provider not supported")
        return request_body

        Build the request body as per the provider.
        Currently supported providers are amazon, cohere.

        amazon:
            Sample Payload of type str
            "Hello World!"

        cohere:
            Sample Payload of type dict of following format
            {
                'texts': ["This is a test document", "This is another document"],
                'input_type': 'search_document'
            }

        
llama-index-integrations/embeddings/llama-index-embeddings-bedrock/llama_index/embeddings/bedrock/base.py