Resolve a free-form topic label back to the stored profile key when possible.
(profile: Dict[str, Any], topic_text: str)
| 580 | |
| 581 | |
| 582 | def find_profile_topic_key(profile: Dict[str, Any], topic_text: str) -> Optional[str]: |
| 583 | """Resolve a free-form topic label back to the stored profile key when possible.""" |
| 584 | matches = find_related_profile_topic_keys(profile, topic_text) |
| 585 | return matches[0] if matches else None |
| 586 | |
| 587 | |
| 588 | def _parse_profile_update_with_llm(text: str, profile: Optional[Dict[str, Any]] = None) -> Optional[Dict[str, Any]]: |
no test coverage detected