Models Module
The models module provides model management and caching functionality.
Model Cache
-
flagevalmm.models.model_cache.calculate_hash(data: Any) → str[source]
-
class flagevalmm.models.model_cache.ModelCache(db_name='model_cache', cache_dir='./.cache')[source]
Bases: object
-
__init__(db_name='model_cache', cache_dir='./.cache')[source]
-
insert(question: str, answer: str) → None[source]
Thread-safe insert operation
-
get(question: str) → str | None[source]
Thread-safe query operation
-
clear() → None[source]
Clear the cache
-
close() → None[source]
Close the database connection for the current thread
-
exists(question: str) → bool[source]
Check if a question exists in the cache
-
delete(question: str) → None[source]
Model Utilities
This section will be expanded as more model utilities are documented.