hf_question_answering_payload: Question Answering Payload

View source: R/inference.R

hf_question_answering_payloadR Documentation

Question Answering Payload

Description

Want to have a nice know-it-all bot that can answer any question?

Usage

hf_question_answering_payload(question, context)

Arguments

question

a question to be answered based on the provided context

context

the context to consult for answering the question

Value

An inference payload

See Also

https://huggingface.co/docs/api-inference/detailed_parameters#question-answering-task

Examples

hf_question_answering_payload(
  question = "What is R?",
  context = "R is a language for statistical computing."
)

huggingfaceR documentation built on Aug. 30, 2026, 1:06 a.m.