diff --git a/src/interface.jl b/src/interface.jl index 3e6436f..6031abd 100755 --- a/src/interface.jl +++ b/src/interface.jl @@ -1082,21 +1082,18 @@ function checkTaskCompletion(a) """ response = nothing _response = nothing - while true - _response = sendReceivePrompt(a, prompt, max_tokens=512) - _response = split(_response, "")[1] - if occursin("}", _response) - break - end - end - response = "I " * split(_response, "{")[1] # sometime response have more than 1 {answer: done} + _response = sendReceivePrompt(a, prompt, max_tokens=512) + @show checkTaskCompletion_raw = _response + _response = split(_response, "")[1] + _response = split(_response, "\n\n")[1] + # response = "I " * split(_response, "{")[1] # sometime response have more than 1 {answer: done} decision = nothing - if occursin("done", response) - decision = true - else - decision = false - end + # if occursin("done", response) + # decision = true + # else + # decision = false + # end return decision, response end diff --git a/src/type.jl b/src/type.jl index 2ffd7ac..629567c 100644 --- a/src/type.jl +++ b/src/type.jl @@ -170,7 +170,7 @@ function agentReflex( Use the following format: Thought: based on the plan and progress evaluation of the plan, what to do? (pay attention to correct numeral calculation and commonsense). Act: an action to take based on your thought, must be one of [{toolnames}] - Actinput: your input to the action you chose (pay attention to the tool's input) + Actinput: your input to the action based on your thought (pay attention to the tool's input) Obs: observed result of the action P.S.1 ask user one by one question.