You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

retrieval_methods.py 606B

12345678910111213141516
  1. from enum import Enum
  2. class RetrievalMethod(Enum):
  3. SEMANTIC_SEARCH = "semantic_search"
  4. FULL_TEXT_SEARCH = "full_text_search"
  5. HYBRID_SEARCH = "hybrid_search"
  6. KEYWORD_SEARCH = "keyword_search"
  7. @staticmethod
  8. def is_support_semantic_search(retrieval_method: str) -> bool:
  9. return retrieval_method in {RetrievalMethod.SEMANTIC_SEARCH.value, RetrievalMethod.HYBRID_SEARCH.value}
  10. @staticmethod
  11. def is_support_fulltext_search(retrieval_method: str) -> bool:
  12. return retrieval_method in {RetrievalMethod.FULL_TEXT_SEARCH.value, RetrievalMethod.HYBRID_SEARCH.value}