(response: Response)
This function get response and extract embeddings out of them.

        Parameters
        ----------
        response
            Response by the server

        Returns
        -------
        Embedding. For items that are not successfully embedded returns None.
This function get response and extract embeddings out of them.
This function get response and extract embeddings out of them .
def _parse_response(response: Response) -> Optional[List[float]]:
        """
        This function get response and extract embeddings out of them.

        Parameters
        ----------
        response
            Response by the server

        Returns
        -------
        Embedding. For items that are not successfully embedded returns None.
        """
        if response.content:
            try:
                cont = json.loads(response.content.decode("utf-8"))
                return cont.get("embedding", None)
            except JSONDecodeError:
                # in case that embedding was not successful response is not
                # valid JSON
                return None
        else:
            return None
def _parse_response ( response : Response ) -> Optional [ List [ float ] ] : if response . content : try : cont = json . loads ( response . content . decode ( "utf-8" ) ) return cont . get ( "embedding" , None ) except JSONDecodeError : # in case that embedding was not successful response is not # valid JSON return None else : return None