to embed the documents and stores the results in the cache.
        Args:
            texts: A list of texts to embed.
        Returns:
            A list of embeddings for the given texts.
        """
        vectors: List[Union[List[float], None]] = self.document_embedding_store.mget(
            texts
        )
        missing_indices: List[int] = [
            i for i, vector in enumerate(vectors) if vector is None
        ]
        missing_texts = [texts[i] for i in missing_indices]
        if missing_texts:
            missing_vectors = self.underlying_embeddings.embed_documents(missing_texts)
            self.document_embedding_store.mset(
                list(zip(missing_texts, missing_vectors))
            )
            for index, updated_vector in zip(missing_indices, missing_vectors):
                vectors[index] = updated_vector
        return cast(
            List[List[float]], vectors
        )  # Nones should have been resolved by now
[docs]    def embed_query(self, text: str) -> List[float]:
        """Embed query text.
        This method does not support caching at the moment.
        Support for caching queries is easily to implement, but might make
        sense to hold off to see the most common patterns.
        If the cache has an eviction policy, we may need to be a bit more careful
        about sharing the cache between documents and queries. Generally,
        one is OK evicting query caches, but document caches should be kept.
        Args:
            text: The text to embed.
        Returns:
            The embedding for the given text.
        """
        return self.underlying_embeddings.embed_query(text)
[docs]    @classmethod
    def from_bytes_store(
        cls,
        underlying_embeddings: Embeddings,