"""Compute query embeddings using a Bedrock model.
        Args:
            text: The text to embed.
        Returns:
            Embeddings for the text.
        """
        return self._embedding_func(text)
[docs]    async def aembed_query(self, text: str) -> List[float]:
        """Asynchronous compute query embeddings using a Bedrock model.
        Args:
            text: The text to embed.
        Returns:
            Embeddings for the text.
        """
        return await asyncio.get_running_loop().run_in_executor(
            None, partial(self.embed_query, text)
        )
[docs]    async def aembed_documents(self, texts: List[str]) -> List[List[float]]:
        """Asynchronous compute doc embeddings using a Bedrock model.
        Args:
            texts: The list of texts to embed
        Returns:
            List of embeddings, one for each text.
        """
        result = await asyncio.gather(*[self.aembed_query(text) for text in texts])
        return list(result)