personabot-api / tests /test_cache_reference_tokens.py
GitHub Actions
Deploy 91b3f47
acfcc03
from app.pipeline.nodes.cache import _has_unresolved_reference
def test_has_unresolved_reference_ignores_spatial_and_temporal_words() -> None:
assert _has_unresolved_reference("tell me about there") is False
assert _has_unresolved_reference("what happened then") is False
def test_has_unresolved_reference_detects_pronouns_and_demonstratives() -> None:
assert _has_unresolved_reference("tell me about this") is True
assert _has_unresolved_reference("what is that project") is True