This commit is contained in:
2023-12-02 13:42:49 +00:00
parent 5681c2350d
commit 07555c2613
2 changed files with 6 additions and 6 deletions

View File

@@ -373,7 +373,7 @@ function actor_mistral_openorca(a::agentReflex)
{context}
<|im_end|>
{shorttermMemory}
Thought $mark:
Thought:
"""
prompt = replace(prompt, "{role}" => a.roles[a.role])
@@ -780,9 +780,10 @@ function actor(a::agentReflex)
respond = split(respond, "Obs")[1]
respond_actor_raw = respond
@show respond_actor_raw
ind = findfirst(":", respond)[end]
respond = respond[ind+1:end]
if occursin("Thought", respond)
ind = findfirst(":", respond)[end]
respond = respond[ind+1:end]
end
respond = "Thought: " * respond
# some time LLM not generate a number after headers but I want it
@@ -825,7 +826,6 @@ function actor(a::agentReflex)
respond = toolinput
msgToUser = respond
actorState = toolname
a.step += 1
break
else # function call
f = a.tools[Symbol(toolname)][:func]

View File

@@ -110,7 +110,7 @@ function agentReflex(
:actor=>
"""
Use the following format:
Thought: think about 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 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