src/python/txtai/api.py
def similarity(t1: str, t2: List[str]=Query(None)):
    """
    Calculates the similarity between text1 and list of elements in text2.

    Args:
        t1: text
        t2: list of text to compare against

    Returns:
        list of similarity scores
    """

    return INDEX.similarity(t1, t2)

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

    Args:
        t1: text
        t2: 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(t1: str, t2: List[str]=Query(None)):
    return INDEX.similarity(t1, t2)
def similarity ( t1 : str , t2 : List [ str ] = Query ( None ) ) : return INDEX . similarity ( t1 , t2 )
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:
        t1: text
        t2: list of text to compare against

    Returns:
        list of similarity scores
    """
list of similarity scores
list of similarity scores
t1
str
None
t2
List[str]
list of text to compare against
list of text to compare against