Skip to content

Commit

Permalink
wac: use TYPESENSE_SEMANTIC_MODE in wac_search
Browse files Browse the repository at this point in the history
The default for the semantic argument was hardcoded to "off" instead of
using the environment variable.
  • Loading branch information
stintel committed Jan 16, 2024
1 parent 4b28022 commit ac75ecc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/internal/wac.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac75ecc

Please sign in to comment.