hf_sentence_similarity_payload: Sentence Similarity Payload

View source: R/inference.R

hf_sentence_similarity_payloadR Documentation

Sentence Similarity Payload

Description

Calculate the semantic similarity between one text and a list of other sentences by comparing their embeddings.

Usage

hf_sentence_similarity_payload(source_sentence, sentences)

Arguments

source_sentence

The string that you wish to compare the other strings with. This can be a phrase, sentence, or longer passage, depending on the model being used.

sentences

A list of strings which will be compared against the source_sentence.

Value

An inference payload

See Also

https://huggingface.co/docs/api-inference/detailed_parameters#sentence-similarity-task


farach/huggingfaceR documentation built on Feb. 4, 2023, 10:31 p.m.