update
This commit is contained in:
@@ -731,9 +731,9 @@ function work(a::agentReflex, usermsg::String)
|
||||
end
|
||||
|
||||
|
||||
function evaluate()
|
||||
# function evaluate()
|
||||
|
||||
end
|
||||
# end
|
||||
|
||||
|
||||
|
||||
@@ -786,7 +786,7 @@ function actor(a::agentReflex)
|
||||
|
||||
|
||||
@show a.step
|
||||
if a.step <= totalsteps
|
||||
if a.step < totalsteps
|
||||
|
||||
prompt_actor = actor_mistral_openorca(a)
|
||||
println("")
|
||||
@@ -986,7 +986,7 @@ julia> shorttermMemory = OrderedDict{String, Any}(
|
||||
"Obs 2:" => "No info available for your search query.")
|
||||
julia> report = analyze(agent, shorttermMemory)
|
||||
```
|
||||
"""
|
||||
""" #WORKING analyze sometime result in empty string ""
|
||||
function analyze(a)
|
||||
shorttermMemory = shortMemoryToString(a.memory[:shortterm], ["user:"])
|
||||
prompt =
|
||||
@@ -1008,6 +1008,15 @@ function analyze(a)
|
||||
"""
|
||||
|
||||
respond = sendReceivePrompt(a, prompt, max_tokens=2048)
|
||||
|
||||
println("")
|
||||
analyze_prompt = prompt
|
||||
@show analyze_prompt
|
||||
|
||||
println("")
|
||||
analyze_respond = respond
|
||||
@show analyze_respond
|
||||
error(11)
|
||||
return respond
|
||||
end
|
||||
|
||||
@@ -1198,7 +1207,7 @@ function goNogo(a)
|
||||
Your work:
|
||||
$work
|
||||
|
||||
From the plan, your job is to check whether the latest step of your work is complete and choose only one of the following choices.
|
||||
Your job is to check whether step $(a.step) of your work is completed according to the plan and choose only one of the following choices.
|
||||
choice 1: If you are ready to do the next step of the plan say, "{Yes}". And what is the rationale behind the decision?
|
||||
choice 2: If you need to repeat the latest step say, "{No}". And what is the rationale behind the decision?
|
||||
<|im_end|>
|
||||
|
||||
@@ -104,8 +104,7 @@ function agentReflex(
|
||||
Use the following format:
|
||||
Stimulus: the input user gives to you and you must respond
|
||||
Plan: first you should always think about the stimulus, the info you need and the info you have thoroughly then extract and devise a step by step plan (pay attention to correct numeral calculation and commonsense).
|
||||
p.s.1 each step should be a single question/action.
|
||||
p.s.2 Do not include respond step.
|
||||
p.s.1 each step should be a single action.
|
||||
""",
|
||||
:actor=>
|
||||
"""
|
||||
@@ -114,7 +113,6 @@ function agentReflex(
|
||||
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
|
||||
Check: check whether you are ready for the next step of the plan
|
||||
""",
|
||||
),
|
||||
tools::Dict=Dict(
|
||||
|
||||
Reference in New Issue
Block a user