Skip to content

Commit 1a11059

Browse files
authored
New step types (#198)
1 parent fa52e17 commit 1a11059

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

enums.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,8 @@ class StrategyStepType(Enum):
569569
TEMPLATED = "TEMPLATED"
570570
RERANKER = "RERANKER"
571571
FULL_TEXT_SEARCH = "FULL_TEXT_SEARCH"
572+
CURRENT_TIME = "CURRENT_TIME"
573+
COMPLIANT_WEBSEARCH = "COMPLIANT_WEBSEARCH"
572574

573575
def get_description(self):
574576
return STEP_DESCRIPTIONS.get(self, "No description available")
@@ -599,6 +601,8 @@ def get_progress_text(self):
599601
StrategyStepType.TEMPLATED: "Templated step",
600602
StrategyStepType.RERANKER: "Reranker",
601603
StrategyStepType.FULL_TEXT_SEARCH: "Full text search",
604+
StrategyStepType.CURRENT_TIME: "Get current time",
605+
StrategyStepType.COMPLIANT_WEBSEARCH: "Web search",
602606
}
603607

604608
STEP_WHEN_TO_USE = {
@@ -619,6 +623,8 @@ def get_progress_text(self):
619623
StrategyStepType.TEMPLATED: "When you want to reuse existing templates",
620624
StrategyStepType.RERANKER: "When you want to rerank results",
621625
StrategyStepType.FULL_TEXT_SEARCH: "When you want to perform a full text search",
626+
StrategyStepType.CURRENT_TIME: "When you want to get the current time",
627+
StrategyStepType.COMPLIANT_WEBSEARCH: "When you want to perform a web search",
622628
}
623629

624630
STEP_PROGRESS_TEXTS = {
@@ -640,6 +646,8 @@ def get_progress_text(self):
640646
StrategyStepType.TEMPLATED: "Running templated step",
641647
StrategyStepType.RERANKER: "Running reranker",
642648
StrategyStepType.FULL_TEXT_SEARCH: "Running full text search",
649+
StrategyStepType.CURRENT_TIME: "Getting current time",
650+
StrategyStepType.COMPLIANT_WEBSEARCH: "Searching the web",
643651
}
644652

645653
STEP_ERRORS = {
@@ -981,6 +989,7 @@ class CognitionPrivateUsage(Enum):
981989
OPEN_AI = "OPEN_AI" # hosted by openai
982990
PRIVATEMODE_AI = "PRIVATEMODE_AI" # encrypted and hosted by privatemode.ai
983991
REQUESTS_USED = "REQUESTS_USED" # special case, is set handled separately => only for final result set
992+
COMPLIANT_WEBSEARCH_PROVIDER = "COMPLIANT_WEBSEARCH_PROVIDER" # e.g. staan.ai
984993
__SCORES = {
985994
"KERN_INTERNAL": 1.0,
986995
"KERN_EXTERNAL_RESOURCE": 0.95,
@@ -990,6 +999,7 @@ class CognitionPrivateUsage(Enum):
990999
"AZURE_KERN": 0.85,
9911000
"OPEN_AI": 0.3,
9921001
"PRIVATEMODE_AI": 0.95,
1002+
"COMPLIANT_WEBSEARCH_PROVIDER": 0.85,
9931003
"REQUESTS_USED": 0.9, # final project multiplier
9941004
}
9951005

0 commit comments

Comments
 (0)