Skip to content

Commit

Permalink
Fix for questions
Browse files Browse the repository at this point in the history
  • Loading branch information
wi0lono committed Jun 21, 2024
1 parent 40094f4 commit 35e1231
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nl2dsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from termcolor import cprint
from typing import List, Dict, Callable

from .utils.mini_llm import call_llm_for_json
from .utils.mini_llm import call_llm_for_json, chat_completion_request
from .utils.dsl_utils import (
update_flow,
update_global_variables,
Expand Down
4 changes: 2 additions & 2 deletions nl2dsl/utils/dsl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def update_flow(step, plugins={}, flow=[], debug=False):
dsl_list.insert(-1, llm_response)
elif step_type == "edit":
edited_task = llm_response
if edited_task["task_id"] == "end":
if edited_task["name"] == "end":
cprint(f"Cannot edit end task.", "red")

elif edited_task["task_id"] == "start":
elif edited_task["name"] == "start":
for i, task in enumerate(dsl_list):
if task["name"] == "start":
if edited_task.get("goto"):
Expand Down

0 comments on commit 35e1231

Please sign in to comment.