File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change 2
2
from typing import ClassVar
3
3
4
4
class CoT (BaseModel ):
5
- available_patterns : ClassVar [ list ] = [ 'cot' , 'reflection' ]
6
- # available_patterns: ClassVar[list] = ['cot', 'one_shot']
5
+
6
+ available_patterns : ClassVar [list ] = ['cot' , 'one_shot' ]
7
7
8
8
cot : bool = Field (default = False , description = "Default cot prompt" )
9
- reflection : bool = Field (default = False , description = "Flag to use reflection" )
10
- # one_shot: bool = Field(default=False, description="Cot prompt with single example")
9
+ one_shot : bool = Field (default = False , description = "Cot prompt with single example" )
11
10
12
11
@model_validator (mode = "before" )
13
12
@classmethod
@@ -73,16 +72,7 @@ def get_reflection_prompt(self):
73
72
74
73
def fetch_prompt (self ):
75
74
"""Returns the correct prompt based on the selected flag."""
76
- if self .reflection :
77
- return self .get_reflection_prompt ()
78
- # elif self.cot:
75
+ if self .one_shot :
76
+ return self .get_cot_oneshot_prompt ()
79
77
self .cot = True
80
- return self .get_cot_prompt ()
81
- # else:
82
- # raise Exception("Invalid Pattern Passed ,Available patterns are",self.available_patterns)
83
-
84
-
85
- # if self.one_shot:
86
- # return self.get_cot_oneshot_prompt()
87
- # self.cot=True
88
- # return self.get_cot_prompt()
78
+ return self .get_cot_prompt ()
You can’t perform that action at this time.
0 commit comments