forked from danswer-ai/danswer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Co <alex.tuan@mindvalley.com>
- Loading branch information
Showing
11 changed files
with
1,922 additions
and
86 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"""NOTE: this needs to be separate from models.py because of circular imports. | ||
Both search/models.py and db/models.py import enums from this file AND | ||
search/models.py imports from db/models.py.""" | ||
from enum import Enum | ||
|
||
|
||
class RecencyBiasSetting(str, Enum): | ||
FAVOR_RECENT = "favor_recent" # 2x decay rate | ||
BASE_DECAY = "base_decay" | ||
NO_DECAY = "no_decay" | ||
# Determine based on query if to use base_decay or favor_recent | ||
AUTO = "auto" | ||
|
||
|
||
class OptionalSearchSetting(str, Enum): | ||
ALWAYS = "always" | ||
NEVER = "never" | ||
# Determine whether to run search based on history and latest query | ||
AUTO = "auto" | ||
|
||
|
||
class SearchType(str, Enum): | ||
KEYWORD = "keyword" | ||
SEMANTIC = "semantic" | ||
|
||
|
||
class LLMEvaluationType(str, Enum): | ||
AGENTIC = "agentic" # applies agentic evaluation | ||
BASIC = "basic" # applies boolean evaluation | ||
SKIP = "skip" # skips evaluation | ||
UNSPECIFIED = "unspecified" # reverts to default | ||
|
||
|
||
class QueryFlow(str, Enum): | ||
SEARCH = "search" | ||
QUESTION_ANSWER = "question-answer" |
Oops, something went wrong.