(
            self,
            data_instance: Any,
            client: AsyncClient,
            proc_callback: Callable[[bool], None] = None,
    )
return emb
Function get an data instance. It extract data from it and send them to
        server and retrieve responses.

        Parameters
        ----------
        data_instance
            Single row of the input table.
        client
            HTTPX client that communicates with the server
        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
        -------
        Embedding. For items that are not successfully embedded returns None.
Function get an data instance. It extract data from it and send them to
        server and retrieve responses.
Function get an data instance . It extract data from it and send them to server and retrieve responses .
async def _send_to_server(
            self,
            data_instance: Any,
            client: AsyncClient,
            proc_callback: Callable[[bool], None] = None,
    ) -> Optional[List[float]]:
        """
        Function get an data instance. It extract data from it and send them to
        server and retrieve responses.

        Parameters
        ----------
        data_instance
            Single row of the input table.
        client
            HTTPX client that communicates with the server
        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
        -------
        Embedding. For items that are not successfully embedded returns None.
        """
        await self.__wait_until_released()
        self.__check_cancelled()

        self.num_parallel_requests += 1
        # load bytes
        data_bytes = await self._encode_data_instance(data_instance)
        if data_bytes is None:
            self.num_parallel_requests -= 1
            return None

        # if data in cache return it
        cache_key = self._cache.md5_hash(data_bytes)
        emb = self._cache.get_cached_result_or_none(cache_key)

        if emb is None:
            # in case that embedding not sucessfull resend it to the server
            # maximally for MAX_REPEATS time
            for i in range(1, self.MAX_REPEATS + 1):
                self.__check_cancelled()
                url = (
                    f"/{self.embedder_type}/{self._model}?"
                    f"machine={self.machine_id}"
                    f"&session={self.session_id}&retry={i}"
                )
                emb = await self._send_request(client, data_bytes, url)
                if emb is not None:
                    self._cache.add(cache_key, emb)
                    break  # repeat only when embedding None
        if proc_callback:
            proc_callback(emb is not None)

        self.num_parallel_requests -= 1
        return emb
async def _send_to_server ( self , data_instance : Any , client : AsyncClient , proc_callback : Callable [ [ bool ] , None ] = None , ) -> Optional [ List [ float ] ] : await self . __wait_until_released ( ) self . __check_cancelled ( ) self . num_parallel_requests += 1 # load bytes data_bytes = await self . _encode_data_instance ( data_instance ) if data_bytes is None : self . num_parallel_requests -= 1 return None # if data in cache return it cache_key = self . _cache . md5_hash ( data_bytes ) emb = self . _cache . get_cached_result_or_none ( cache_key ) if emb is None : # in case that embedding not sucessfull resend it to the server # maximally for MAX_REPEATS time for i in range ( 1 , self . MAX_REPEATS + 1 ) : self . __check_cancelled ( ) url = ( f"/{self.embedder_type}/{self._model}?" f"machine={self.machine_id}" f"&session={self.session_id}&retry={i}" ) emb = await self . _send_request ( client , data_bytes , url ) if emb is not None : self . _cache . add ( cache_key , emb ) break # repeat only when embedding None if proc_callback : proc_callback ( emb is not None ) self . num_parallel_requests -= 1 return emb