src/python/txtai/api.py
def similarity(self, text1, text2):
        """
        Calculates the similarity between text1 and list of elements in text2.

        Args:
            text1: text
            text2: list of text to compare against

        Returns:
            list of similarity scores
        """

        return [float(x) for x in self.embeddings.similarity(text1, text2)]

        Calculates the similarity between text1 and list of elements in text2.

        Args:
            text1: text
            text2: list of text to compare against

        Returns:
            list of similarity scores
        
Calculates the similarity between text1 and list of elements in text2.
Calculates the similarity between text1 and list of elements in text2 .
def similarity(self, text1, text2):
        return [float(x) for x in self.embeddings.similarity(text1, text2)]
def similarity ( self , text1 , text2 ) : return [ float ( x ) for x in self . embeddings . similarity ( text1 , text2 ) ]
Calculates the similarity between text1 and list of elements in text2.
Calculates the similarity between text1 and list of elements in text2 .
"""
        Calculates the similarity between text1 and list of elements in text2.

        Args:
            text1: text
            text2: list of text to compare against

        Returns:
            list of similarity scores
        """
list of similarity scores
list of similarity scores
self
text1
None
text2
list of text to compare against
list of text to compare against