(
            self,
            data: List[Any],
            processed_callback: Callable[[bool], None] = None,
    )
return embeddings
This function repeats calling embedding function until all items
        are embedded. It prevents skipped items due to network issues.
        The process is repeated for each item maximally MAX_REPEATS times.

        Parameters
        ----------
        data
            List with data that needs to be embedded.
        processed_callback
            A function that is called after each item is embedded
            by either getting a successful response from the server,
            getting the result from cache or skipping the item.

        Returns
        -------
        List of float list (embeddings) for successfully embedded
        items and Nones for skipped items.

        Raises
        ------
        EmbeddingConnectionError
            Error which indicate that the embedding is not possible due to
            connection error.
        EmbeddingCancelledException:
            If cancelled attribute is set to True (default=False).
This function repeats calling embedding function until all items
        are embedded. It prevents skipped items due to network issues.
        The process is repeated for each item maximally MAX_REPEATS times.
This function repeats calling embedding function until all items are embedded . It prevents skipped items due to network issues . The process is repeated for each item maximally MAX_REPEATS times .
def embedd_data(
            self,
            data: List[Any],
            processed_callback: Callable[[bool], None] = None,
    ) -> List[Optional[List[float]]]:
        """
        This function repeats calling embedding function until all items
        are embedded. It prevents skipped items due to network issues.
        The process is repeated for each item maximally MAX_REPEATS times.

        Parameters
        ----------
        data
            List with data that needs to be embedded.
        processed_callback
            A function that is called after each item is embedded
            by either getting a successful response from the server,
            getting the result from cache or skipping the item.

        Returns
        -------
        List of float list (embeddings) for successfully embedded
        items and Nones for skipped items.

        Raises
        ------
        EmbeddingConnectionError
            Error which indicate that the embedding is not possible due to
            connection error.
        EmbeddingCancelledException:
            If cancelled attribute is set to True (default=False).
        """
        # if there is less items than 10 connection error should be raised
        # earlier
        self.max_errors = min(len(data) * self.MAX_REPEATS, 10)

        loop = asyncio.new_event_loop()
        asyncio.set_event_loop(loop)
        try:
            embeddings = asyncio.get_event_loop().run_until_complete(
                self.embedd_batch(data, processed_callback)
            )
        except Exception:
            loop.close()
            raise

        loop.close()
        return embeddings
def embedd_data ( self , data : List [ Any ] , processed_callback : Callable [ [ bool ] , None ] = None , ) -> List [ Optional [ List [ float ] ] ] : # if there is less items than 10 connection error should be raised # earlier self . max_errors = min ( len ( data ) * self . MAX_REPEATS , 10 ) loop = asyncio . new_event_loop ( ) asyncio . set_event_loop ( loop ) try : embeddings = asyncio . get_event_loop ( ) . run_until_complete ( self . embedd_batch ( data , processed_callback ) ) except Exception : loop . close ( ) raise loop . close ( ) return embeddings