This commit is contained in:
youremail@yourdomain.com
2023-12-25 15:02:13 +00:00
parent 802d080205
commit 3b3cbbc83f

View File

@@ -320,7 +320,8 @@ function actor_mistral_openorca(a::agentReflex, taskrecap="")
aware = ""
if taskrecap != ""
start = "Self-awareness"
aware = "Self-awareness: based on the recap, check your progress against the plan and assess the current situation to identify tasks that you need to address."
aware = "Self-awareness: based on the recap and the plan, state your current understanding of the matter."
# aware = "Self-awareness: based on the recap, check your progress against the plan and assess the current situation to identify tasks that you need to address."
end
winestockResult = ""
@@ -427,6 +428,7 @@ function actor_mistral_openorca(a::agentReflex, taskrecap="")
"Act:", "Actinput:", "Obs:", "...",
"Answer:", "Conclusion:", "Summary:"]
response = replaceHeaders(response, headerToDetect, latestTask)
println("")
@show actor_response = response
headerToDetect = ["Plan $(a.attempt):",
"Thought $latestTask:",
@@ -674,7 +676,7 @@ function actor(a::agentReflex)
f = a.tools[toolname][:func]
toolresult = f(a, toolinput)
@show toolresult
if toolname == "winestock"
if toolname == "temp"
a.winestockResult = toolresult
a.memory[:shortterm]["Obs $latestTask:"] = "winestock search done, refers to <winestock search result>"
a.memory[:log]["Obs $latestTask:"] = "winestock search done"
@@ -1141,6 +1143,7 @@ function checkTaskCompletion(a)
return decision, response
end
function recap(a)
# stimulus = a.memory[:shortterm]["user:"]
getonlykeys = ["Actinput", "Obs"]
@@ -1199,7 +1202,7 @@ function recap(a)
$work
</Your earlier work>
<Your job>
Extract info: extract all info in details from your earlier work.
Extract info: extract each info in details from your earlier work into a bullet summary.
</Your job>
Let's think step by step.
@@ -1207,7 +1210,7 @@ function recap(a)
<|assistant|>
Extracted info:
"""
aware = "Self-awareness: map the info from the recap to the plan's tasks then state your mapping."
response = sendReceivePrompt(a, prompt, max_tokens=512, temperature=0.0)
response = split(response, "</")[1]
response = split(response, "<|")[1]