File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
libs/labelbox/src/labelbox/schema/tool_building Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,18 @@ def build_fact_checking_definition():
61
61
return _Definition (variants = variants )
62
62
63
63
64
+ class UnsupportedStepActions (Enum ):
65
+ WRITE_JUSTIFICATION = "writeJustification"
66
+
67
+
68
+ class CanConfidentlyAssessStepActions (Enum ):
69
+ WRITE_JUSTIFICATION = "writeJustification"
70
+
71
+
72
+ class NoFactualInformationStepActions (Enum ):
73
+ WRITE_JUSTIFICATION = "writeJustification"
74
+
75
+
64
76
@dataclass
65
77
class FactCheckingTool (_BaseStepReasoningTool ):
66
78
"""
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ class VariantWithActions:
22
22
actions : List [str ] = field (default_factory = list )
23
23
_available_actions : Set [str ] = field (default_factory = set )
24
24
25
- def set_actions (self , actions : Set [str ]) -> None :
25
+ def set_actions (self , actions : List [str ]) -> None :
26
+ self .actions = []
26
27
for action in actions :
27
28
if action in self ._available_actions :
28
29
self .actions .append (action )
@@ -31,8 +32,11 @@ def reset_actions(self) -> None:
31
32
self .actions = []
32
33
33
34
def asdict (self ) -> Dict [str , Any ]:
34
- return {
35
+ data = {
35
36
"id" : self .id ,
36
37
"name" : self .name ,
37
- "actions" : list (set (self .actions )),
38
38
}
39
+ if len (self .actions ) > 0 :
40
+ data ["actions" ] = self .actions
41
+
42
+ return data
You can’t perform that action at this time.
0 commit comments