Skip to contents

Performs a prepared request and returns the response

Usage

hf_perform_request(request, ...)

Arguments

request

An httr2 request object created by hf_build_request

...

ellipsis is sent to httr2::req_perform, e.g. for path and verbosityarguments.

Value

A httr2 response object

Examples

if (FALSE) { # \dontrun{
  # Create and perform request
  req <- hf_build_request(
    input = "This is a sample text to embed",
    endpoint_url = "https://my-endpoint.huggingface.cloud"
  )
  embeddings <- hf_perform_request(req)

} # }