diff --git a/src/interface.jl b/src/interface.jl index 6b7af80..3cf6eb7 100755 --- a/src/interface.jl +++ b/src/interface.jl @@ -682,6 +682,10 @@ function work(a::agentReflex, usermsg::String) println("all steps done") respond = formulateUserRespond(a) + + println("") + formulatedRedpond = respond + @show formulateUserRespond a.memory[:shortterm]["Respond $(a.attempt):"] = respond a.memory[:log]["Respond $mark:"] = respond @@ -1108,10 +1112,6 @@ function formulateUserRespond(a) prompt = """ <|im_start|>system - You have access to the following tools: - chatbox: Useful for when you need to ask a customer for more context. Input should be a conversation to customer. - wikisearch: Useful for when you need to search an encyclopedia Input is keywords and not a question. - Symbol: Stimulus: the input user gives to you and you must respond Plan: a plan @@ -1161,7 +1161,7 @@ julia> shorttermMemory = OrderedDict{String, Any}( julia> decision = goNogo(agent) "Yes" ``` -""" +""" #BUG sometime AI ready to formulate respond before all step are completed function goNogo(a) stimulus = a.memory[:shortterm]["user:"] work = shortMemoryToString(a.memory[:shortterm], ["user:"]) diff --git a/src/type.jl b/src/type.jl index 6d52334..0691539 100644 --- a/src/type.jl +++ b/src/type.jl @@ -109,7 +109,7 @@ function agentReflex( :actor=> """ Use the following format: - Thought: ask yourself do you have what you need and what to do according to step {step} of the plan (pay attention to correct numeral calculation and commonsense). + Thought: ask yourself do you have all the info you need? And think about what to do according to step {step} of the plan (pay attention to correct numeral calculation and commonsense). Act: the action to take that match your thought, should be one of [{toolnames}] ActInput: the input to the action (pay attention to the tool's input) Obs: the result of the action