This commit is contained in:
2023-12-05 14:27:43 +00:00
parent 290b813c7f
commit 04100d2508
2 changed files with 6 additions and 6 deletions

View File

@@ -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:"])

View File

@@ -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