update
This commit is contained in:
@@ -1082,21 +1082,18 @@ function checkTaskCompletion(a)
|
||||
"""
|
||||
response = nothing
|
||||
_response = nothing
|
||||
while true
|
||||
_response = sendReceivePrompt(a, prompt, max_tokens=512)
|
||||
_response = split(_response, "</s|>")[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, "</s|>")[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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user