File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
src/labelbox/schema/tool_building Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def asdict(self) -> Dict[str, Any]:
1717class IncorrectStepReasoningVariant :
1818 id : int
1919 name : str
20- regenerate_conversations_after_incorrect_step : Optional [bool ] = False
20+ regenerate_conversations_after_incorrect_step : Optional [bool ] = True
2121 rate_alternative_responses : Optional [bool ] = False
2222
2323 def asdict (self ) -> Dict [str , Any ]:
@@ -156,11 +156,12 @@ class StepReasoningTool:
156156 default_factory = StepReasoningDefinition
157157 )
158158
159- def set_regenerate_conversations_after_incorrect_step (self ):
159+ def reset_regenerate_conversations_after_incorrect_step (self ):
160160 """
161- For live models, will invoke the model to generate alternatives if a step is marked as incorrect
161+ For live models, the default acation will invoke the model to generate alternatives if a step is marked as incorrect
162+ This method will reset the action to not regenerate the conversation
162163 """
163- self .definition .variants .incorrect_step .regenerate_conversations_after_incorrect_step = True
164+ self .definition .variants .incorrect_step .regenerate_conversations_after_incorrect_step = False
164165
165166 def set_rate_alternative_responses (self ):
166167 """
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def test_step_reasoning_as_dict_default():
1616 {
1717 "id" : 2 ,
1818 "name" : "Incorrect" ,
19- "actions" : [],
19+ "actions" : ["regenerateSteps" ],
2020 },
2121 ],
2222 "version" : 1 ,
@@ -27,7 +27,7 @@ def test_step_reasoning_as_dict_default():
2727def test_step_reasoning_as_dict_with_actions ():
2828 tool = StepReasoningTool (name = "step reasoning" )
2929 tool .set_rate_alternative_responses ()
30- tool .set_regenerate_conversations_after_incorrect_step ()
30+ tool .reset_regenerate_conversations_after_incorrect_step ()
3131 assert tool .asdict () == {
3232 "tool" : "step-reasoning" ,
3333 "name" : "step reasoning" ,
@@ -42,7 +42,6 @@ def test_step_reasoning_as_dict_with_actions():
4242 "id" : 2 ,
4343 "name" : "Incorrect" ,
4444 "actions" : [
45- "regenerateSteps" ,
4645 "generateAndRateAlternativeSteps" ,
4746 ],
4847 },
You can’t perform that action at this time.
0 commit comments