import spacy
            values["nlp"] = spacy.load("en_core_web_sm")
        except OSError:
            # If the model is not found, raise a ValueError
            raise ValueError(
                "Spacy model 'en_core_web_sm' not found. "
                "Please install it with"
                " `python -m spacy download en_core_web_sm`."
            )
        return values  # Return the validated values
[docs]    def embed_documents(self, texts: List[str]) -> List[List[float]]:
        """
        Generates embeddings for a list of documents.
        Args:
            texts (List[str]): The documents to generate embeddings for.
        Returns:
            A list of embeddings, one for each document.
        """
        return [self.nlp(text).vector.tolist() for text in texts]
[docs]    def embed_query(self, text: str) -> List[float]:
        """
        Generates an embedding for a single piece of text.
        Args:
            text (str): The text to generate an embedding for.
        Returns:
            The embedding for the text.
        """
        return self.nlp(text).vector.tolist()
[docs]    async def aembed_documents(self, texts: List[str]) -> List[List[float]]:
        """
        Asynchronously generates embeddings for a list of documents.
        This method is not implemented and raises a NotImplementedError.
        Args:
            texts (List[str]): The documents to generate embeddings for.
        Raises:
            NotImplementedError: This method is not implemented.
        """
        raise NotImplementedError("Asynchronous embedding generation is not supported.")
[docs]    async def aembed_query(self, text: str) -> List[float]:
        """
        Asynchronously generates an embedding for a single piece of text.