compass.plugin.noop.NoOpTextExtractor#

class NoOpTextExtractor(llm_service, usage_tracker=None, **kwargs)[source]#

Bases: BaseTextExtractor

NoOp text extractor that returns the full text

Parameters:
  • llm_service (Service) – LLM service used for queries.

  • usage_tracker (UsageTracker, optional) – Optional tracker instance to monitor token usage during LLM calls. By default, None.

  • **kwargs

    Keyword arguments to be passed to the underlying service processing function (i.e. llm_service.call(**kwargs)). Should not contain the following keys:

    • usage_sub_label

    • messages

    These arguments are provided by this caller object.

Methods

return_original(text_chunks)

No processing, just return original text

Attributes

IN_LABEL

Identifier for text ingested by this class

OUT_LABEL

Identifier for final text extracted by this class

TASK_DESCRIPTION

Task description to show in progress bar

TASK_ID

ID to use for this extraction for linking with LLM configs

parsers

Iterable of parsers provided by this extractor

async return_original(text_chunks)[source]#

No processing, just return original text

Parameters:

text_chunks (list of str) – List of strings, each of which represent a chunk of text. The order of the strings should be the order of the text chunks.

Returns:

str – Ordinance text extracted from text chunks.

abstract property IN_LABEL#

Identifier for text ingested by this class

Type:

str

abstract property OUT_LABEL#

Identifier for final text extracted by this class

Type:

str

TASK_DESCRIPTION = 'Condensing text for extraction'#

Task description to show in progress bar

TASK_ID = 'text_extraction'#

ID to use for this extraction for linking with LLM configs

property parsers#

Iterable of parsers provided by this extractor

Yields:
  • name (str) – Name describing the type of text output by the parser.

  • parser (callable()) – Async function that takes a text_chunks input and outputs parsed text.