summaryrefslogtreecommitdiff
path: root/continuedev/src/continuedev/steps/react.py
diff options
context:
space:
mode:
Diffstat (limited to 'continuedev/src/continuedev/steps/react.py')
-rw-r--r--continuedev/src/continuedev/steps/react.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/continuedev/src/continuedev/steps/react.py b/continuedev/src/continuedev/steps/react.py
index 411adc87..6b6024ce 100644
--- a/continuedev/src/continuedev/steps/react.py
+++ b/continuedev/src/continuedev/steps/react.py
@@ -1,13 +1,15 @@
from textwrap import dedent
-from typing import List
+from typing import List, Union
from ..core.main import Step
from ..core.sdk import ContinueSDK
-from .main import MessageStep
+from .core.core import MessageStep
class NLDecisionStep(Step):
user_input: str
steps: List[Step]
+ hide: bool = True
+ default_step: Union[Step, None] = None
async def run(self, sdk: ContinueSDK):
step_descriptions = "\n".join([
@@ -24,14 +26,13 @@ class NLDecisionStep(Step):
Select the step which should be taken next. Say only the name of the selected step:""")
- resp = (await sdk.models.gpt35.complete(prompt)).lower()
+ resp = sdk.models.gpt35.complete(prompt).lower()
step_to_run = None
for step in self.steps:
- if step.name in resp:
+ if step.name.lower() in resp:
step_to_run = step
- step_to_run = step_to_run or MessageStep(
- message="Unable to decide the next step")
+ step_to_run = step_to_run or self.default_step or self.steps[0]
await sdk.run_step(step_to_run)