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

Function _resolve_description

openkb/agent/compiler.py:692–702  ·  view source on GitHub ↗

Return a non-empty description string from a frontmatter dict. Checks ``description`` first, then the legacy ``brief`` key. Returns an empty string when neither key holds a non-blank string value.

(fm: dict)

Source from the content-addressed store, hash-verified

690
691
692def _resolve_description(fm: dict) -> str:
693 """Return a non-empty description string from a frontmatter dict.
694
695 Checks ``description`` first, then the legacy ``brief`` key. Returns
696 an empty string when neither key holds a non-blank string value.
697 """
698 for key in ("description", "brief"):
699 v = fm.get(key)
700 if isinstance(v, str) and v.strip():
701 return v.strip()
702 return ""
703
704
705def _read_concept_briefs(wiki_dir: Path) -> str:

Callers 2

_read_concept_briefsFunction · 0.85
_read_entity_briefsFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected