Fix variable typo (#8084)

This commit is contained in:
Nam Vu 2024-09-08 12:14:11 +07:00 • committed by GitHub
commit 2d7954c7da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
215 changed files with 599 additions and 597 deletions

View file

@ -0,0 +1,15 @@
from enum import Enum
class RetrievalMethod(Enum):
SEMANTIC_SEARCH = 'semantic_search'
FULL_TEXT_SEARCH = 'full_text_search'
HYBRID_SEARCH = 'hybrid_search'
@staticmethod
def is_support_semantic_search(retrieval_method: str) -> bool:
return retrieval_method in {RetrievalMethod.SEMANTIC_SEARCH.value, RetrievalMethod.HYBRID_SEARCH.value}
@staticmethod
def is_support_fulltext_search(retrieval_method: str) -> bool:
return retrieval_method in {RetrievalMethod.FULL_TEXT_SEARCH.value, RetrievalMethod.HYBRID_SEARCH.value}