MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / remove_doc_from_entity_pages

Function remove_doc_from_entity_pages

openkb/agent/compiler.py:1429–1445  ·  view source on GitHub ↗

Update or delete entity pages affected by removing a document. Mirrors ``remove_doc_from_concept_pages`` for the entities/ directory. Returns ``{"modified": [...], "deleted": [...]}``.

(
    wiki_dir: Path,
    doc_name: str,
    *,
    keep_empty: bool = False,
)

Source from the content-addressed store, hash-verified

1427
1428
1429def remove_doc_from_entity_pages(
1430 wiki_dir: Path,
1431 doc_name: str,
1432 *,
1433 keep_empty: bool = False,
1434) -> dict[str, list[str]]:
1435 """Update or delete entity pages affected by removing a document.
1436
1437 Mirrors ``remove_doc_from_concept_pages`` for the entities/ directory.
1438 Returns ``{"modified": [...], "deleted": [...]}``.
1439 """
1440 return _remove_doc_from_pages(
1441 wiki_dir,
1442 doc_name,
1443 page_dir="entities",
1444 keep_empty=keep_empty,
1445 )
1446
1447
1448def remove_doc_from_index(

Calls 1

_remove_doc_from_pagesFunction · 0.85