Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /topoteretes_cognee /cognee /modules /recall /config.py
| """Configuration for recall behavior flags. | |
| Currently holds the warm-up short-circuit: when a recall targets datasets | |
| whose knowledge graph has never been built, the graph lane returns a cheap | |
| "memory warming up" marker instead of spinning up search machinery. | |
| """ | |
| from functools import lru_cache | |
| from pydantic_settings import BaseSettings, SettingsConfigDict | |
| class RecallConfig(BaseSettings): | |
| # Kill switch for the graph-lane warm-up short-circuit. When off, | |
| # recall's graph lane behaves exactly as before. | |
| recall_warmup_shortcircuit: bool = True | |
| # Minimum graph datapoint count considered "warm". Default 1: only | |
| # truly-empty graphs short-circuit. The probe is binary and reports a | |
| # large fixed count for any populated graph, so values above that cap | |
| # are clamped — they can never read a populated graph as cold. | |
| recall_warmup_threshold: int = 1 | |
| # Seconds an in-process *warm* verdict is cached, so repeated recalls | |
| # against a warm graph skip even the relational probe. Cold verdicts | |
| # are never cached: a graph populated moments after a cold probe must | |
| # be searchable on the very next recall. | |
| recall_warmup_cache_ttl: float = 60.0 | |
| model_config = SettingsConfigDict(env_file=".env", extra="allow") | |
| def to_dict(self) -> dict: | |
| return { | |
| "recall_warmup_shortcircuit": self.recall_warmup_shortcircuit, | |
| "recall_warmup_threshold": self.recall_warmup_threshold, | |
| "recall_warmup_cache_ttl": self.recall_warmup_cache_ttl, | |
| } | |
| def get_recall_config() -> RecallConfig: | |
| return RecallConfig() | |
Xet Storage Details
- Size:
- 1.62 kB
- Xet hash:
- 2d347526983f60ff68bdd47175449c35d0b5d47e53729c0cba513c48cc121750
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.