docs
(List[str]
): A list of documents to encode.batch_size
: The batch size for encoding.name
(str
): The name of the encoder.huggingface_url
(str
): The URL of the Hugging Face API endpoint.huggingface_api_key
(str
): The API key for the Hugging Face API.score_threshold
(float
): A threshold for processing the embeddings.ValueError
: If either huggingface_url
or huggingface_api_key
is None.docs
(List[str]
): A list of documents to encode.ValueError
: If no embeddings are returned for a document.List[List[float]]
: A list of embeddings for the given documents.
payload
(dict
): The payload to send in the request.ValueError
: If the query fails or the response status is not 200.dict
: The response from the Hugging Face API.