(
            self, data: List[Any], proc_callback: Callable[[bool], None] = None
    )
return embeddings
Function perform embedding of a batch of data items.

        Parameters
        ----------
        data
            A list of data that must be embedded.
        proc_callback
            A function that is called after each item is fully processed
            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
        ------
        EmbeddingCancelledException:
            If cancelled attribute is set to True (default=False).
Function perform embedding of a batch of data items.
Function perform embedding of a batch of data items .
async def embedd_batch(
            self, data: List[Any], proc_callback: Callable[[bool], None] = None
    ) -> List[Optional[List[float]]]:
        """
        Function perform embedding of a batch of data items.

        Parameters
        ----------
        data
            A list of data that must be embedded.
        proc_callback
            A function that is called after each item is fully processed
            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
        ------
        EmbeddingCancelledException:
            If cancelled attribute is set to True (default=False).
        """
        requests = []
        async with AsyncClient(
                timeout=self.timeout, base_url=self.server_url, proxies=get_proxies()
        ) as client:
            for p in data:
                if self._cancelled:
                    raise EmbeddingCancelledException()
                requests.append(self._send_to_server(p, client, proc_callback))

            embeddings = await asyncio.gather(*requests)
        self._cache.persist_cache()
        assert self.num_parallel_requests == 0

        return embeddings
async def embedd_batch ( self , data : List [ Any ] , proc_callback : Callable [ [ bool ] , None ] = None ) -> List [ Optional [ List [ float ] ] ] : requests = [ ] async with AsyncClient ( timeout = self . timeout , base_url = self . server_url , proxies = get_proxies ( ) ) as client : for p in data : if self . _cancelled : raise EmbeddingCancelledException ( ) requests . append ( self . _send_to_server ( p , client , proc_callback ) ) embeddings = await asyncio . gather ( * requests ) self . _cache . persist_cache ( ) assert self . num_parallel_requests == 0 return embeddings