compass.scripts.download.filter_ordinance_docs#
- async filter_ordinance_docs(docs, jurisdiction, model_configs, heuristic, tech, ordinance_text_collector_class, permitted_use_text_collector_class, usage_tracker=None, check_for_correct_jurisdiction=True)[source]#
Filter a list of documents to only those that contain ordinances
- Parameters:
jurisdiction (
Jurisdiction) – Location objects representing the jurisdiction.model_configs (
dict) – Dictionary of LLMConfig instances. Should have at minium a “default” key that is used as a fallback for all tasks.tech (
str) – Technology of interest (e.g. “solar”, “wind”, etc). This is used to set up some document validation decision trees.usage_tracker (
UsageTracker, optional) – Optional tracker instance to monitor token usage during LLM calls. By default,None.
- Returns:
listorNone– List ofBaseDocumentinstances possibly containing ordinance information, orNoneif no ordinance document was found.