refac: task flag

Co-Authored-By: Michael Poluektov <78477503+michaelpoluektov@users.noreply.github.com>
This commit is contained in:
Timothy J. Baek
2024-07-03 15:46:56 -07:00
parent d0e0aba593
commit c83704d6ca
2 changed files with 16 additions and 8 deletions

View File

@@ -89,3 +89,14 @@ class ERROR_MESSAGES(str, Enum):
OLLAMA_API_DISABLED = (
"The Ollama API is disabled. Please enable it to use this feature."
)
class TASKS(str, Enum):
def __str__(self) -> str:
return super().__str__()
DEFAULT = lambda task="": f"{task if task else 'default'}"
TITLE_GENERATION = "Title Generation"
EMOJI_GENERATION = "Emoji Generation"
QUERY_GENERATION = "Query Generation"
FUNCTION_CALLING = "Function Calling"