The /autocomplete facade calls the /exact_match, /fuzzy_match and /semantic_similarity_match endpoints to return a list of suggested questions for autocomplete based on the search bar input.
If combined results of get_exact_match() and get_fuzzy_match() return less than 5 results, the get_semantic_similarity_match() method is called after every new "space" character in the question (user query) is added as well as when a "?" character is added at the end of the question. This makes a POST request to the /embed endpoint (and thus currently consumes OpenAI tokens for embedding).
Description
The /autocomplete facade calls the /exact_match, /fuzzy_match and /semantic_similarity_match endpoints to return a list of suggested questions for autocomplete based on the search bar input.
If combined results of get_exact_match() and get_fuzzy_match() return less than 5 results, the get_semantic_similarity_match() method is called after every new "space" character in the question (user query) is added as well as when a "?" character is added at the end of the question. This makes a POST request to the /embed endpoint (and thus currently consumes OpenAI tokens for embedding).