View Source TxtaiEx.Extractor (txtai_ex v0.1.1)

txtai extractor instance for interfacing with a remote txtai service via REST API calls, providing functionality for extracting answers to input questions.

Summary

Functions

Extracts answers to input questions from provided texts.

Functions

Link to this function

extract(api, queue, texts)

View Source

Extracts answers to input questions from provided texts.

Parameters

  • api: The API struct containing configuration for URL and token.
  • queue: A list of maps, each representing a question to be answered. Each map should contain keys: name, query, question, and snippet.
  • texts: A list of texts from which the answers should be extracted.

Returns

  • on success, where answers is a list of maps with keys name and answer, corresponding to the input questions.
  • on failure.