langtest.utils.custom_types.helpers.build_qa_input#

build_qa_input(context: str | None = None, question: str | None = None, options: str | None = None)#

Builds the input data for a question-answering model.

Parameters:
  • context (str) – The context for the input.

  • question (str) – The question for the input.

  • options (List[str]) – The list of options for the input.

Returns:

The input data with keys ‘question’, ‘context’, and ‘options’.

Return type:

Dict[str, Union[str, List[str]]]