From ac75eccd0b7b1b5d2120184cfcbe160d93d48c41 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Tue, 16 Jan 2024 17:19:38 +0200 Subject: [PATCH] wac: use TYPESENSE_SEMANTIC_MODE in wac_search The default for the semantic argument was hardcoded to "off" instead of using the environment variable. --- app/internal/wac.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/internal/wac.py b/app/internal/wac.py index 10ac8d0..841369d 100644 --- a/app/internal/wac.py +++ b/app/internal/wac.py @@ -353,7 +353,7 @@ def add_ha_entities(): # WAC Search -def wac_search(command, exact_match=False, distance=SEARCH_DISTANCE, num_results=CORRECT_ATTEMPTS, raw=False, token_match_threshold=TOKEN_MATCH_THRESHOLD, semantic="off", semantic_model=TYPESENSE_SEMANTIC_MODEL, vector_distance_threshold=VECTOR_DISTANCE_THRESHOLD, hybrid_score_threshold=HYBRID_SCORE_THRESHOLD): +def wac_search(command, exact_match=False, distance=SEARCH_DISTANCE, num_results=CORRECT_ATTEMPTS, raw=False, token_match_threshold=TOKEN_MATCH_THRESHOLD, semantic=TYPESENSE_SEMANTIC_MODE, semantic_model=TYPESENSE_SEMANTIC_MODEL, vector_distance_threshold=VECTOR_DISTANCE_THRESHOLD, hybrid_score_threshold=HYBRID_SCORE_THRESHOLD): log.info(f"Searching for command '{command}' with distance {distance} token match threshold {token_match_threshold} exact match {exact_match} semantic {semantic} with vector distance threshold {vector_distance_threshold} and hybrid threshold {hybrid_score_threshold}") # Set fail by default success = False