"""Embed documents using a Bookend deployed embeddings model.
        Args:
            texts: The list of texts to embed.
        Returns:
            List of embeddings, one for each text.
        """
        result = []
        headers = self.auth_header
        headers["Content-Type"] = "application/json; charset=utf-8"
        params = {
            "model_id": self.model_id,
            "task": DEFAULT_TASK,
        }
        for text in texts:
            data = json.dumps(
                {"text": text, "question": None, "context": None, "instruction": None}
            )
            r = requests.request(
                "POST",
                API_URL + self.domain + PATH,
                headers=headers,
                params=params,
                data=data,
            )
            result.append(r.json()[0]["data"])
        return result
[docs]    def embed_query(self, text: str) -> List[float]:
        """Embed a query using a Bookend deployed embeddings model.
        Args:
            text: The text to embed.
        Returns:
            Embeddings for the text.
        """
        return self.embed_documents([text])[0]