compass.extraction.apply.extract_date#

async extract_date(doc, model_config, usage_tracker=None)[source]#

Parse a single document for date information

Parameters:
  • doc (elm.web.document.BaseDocument) – A document potentially containing date information.

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

Returns:

elm.web.document.BaseDocument – Document that has been parsed for dates. The results of the parsing are stored in the documents attrs. In particular, the attrs will contain a "date" key that will contain the parsed date information.