update
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user