) -> List[List[float]]:
        embeddings = await self.async_client.embed(
            model=self.model,
            texts=texts,
            input_type=input_type,
            truncate=self.truncate,
        ).embeddings
        return [list(map(float, e)) for e in embeddings]
[docs]    def embed_documents(self, texts: List[str]) -> List[List[float]]:
        """Embed a list of document texts.
        Args:
            texts: The list of texts to embed.
        Returns:
            List of embeddings, one for each text.
        """
        return self.embed(texts, input_type="search_document")
[docs]    async def aembed_documents(self, texts: List[str]) -> List[List[float]]:
        """Async call out to Cohere's embedding endpoint.
        Args:
            texts: The list of texts to embed.
        Returns:
            List of embeddings, one for each text.
        """
        return await self.aembed(texts, input_type="search_document")
[docs]    def embed_query(self, text: str) -> List[float]:
        """Call out to Cohere's embedding endpoint.
        Args:
            text: The text to embed.
        Returns:
            Embeddings for the text.
        """
        return self.embed([text], input_type="search_query")[0]
[docs]    async def aembed_query(self, text: str) -> List[float]:
        """Async call out to Cohere's embedding endpoint.
        Args:
            text: The text to embed.
        Returns:
            Embeddings for the text.
        """
        return (await self.aembed([text], input_type="search_query"))[0]