langchain/embeddings/self_hosted_hugging_face.py/SelfHostedHuggingFaceInstructEmbeddings/embed_documents
class SelfHostedHuggingFaceInstructEmbeddings:    def embed_documents(self, texts: List[str]) -> List[List[float]]:
        """Compute doc embeddings using a HuggingFace instruct model.

        Args:
            texts: The list of texts to embed.

        Returns:
            List of embeddings, one for each text.
        """
        instruction_pairs = []
        for text in texts:
            instruction_pairs.append([self.embed_instruction, text])
        embeddings = self.client(self.pipeline_ref, instruction_pairs)
        return embeddings.tolist()