This commit is contained in:
Your Name
2023-12-28 10:16:33 +00:00
parent cefb6c166b
commit 0f62a0d96b
2 changed files with 21 additions and 17 deletions

View File

@@ -367,22 +367,24 @@ function isUsePlans(a::agentReflex)
<|assistant|>
"""
# if LLM mentions any tools, use Plan/Thought/Act loop
isuseplan = false
response = sendReceivePrompt(a, prompt, temperature=0.2, max_tokens=64)
response = split(response, "<|assistant|>")[1]
response = split(response, "<|user|>")[1]
# # if LLM mentions any tools, use Plan/Thought/Act loop
# isuseplan = false
# response = sendReceivePrompt(a, prompt, temperature=0.2, max_tokens=64)
# response = split(response, "<|assistant|>")[1]
# response = split(response, "<|user|>")[1]
for (toolname, v) in a.tools
if occursin("Yes", String(response))
isuseplan = true
break
end
end
# for (toolname, v) in a.tools
# if occursin("Yes", String(response))
# isuseplan = true
# break
# end
# end
if length(a.memory[:shortterm]) != 0
isuseplan = true
end
# if length(a.memory[:shortterm]) != 0
# isuseplan = true
# end
isuseplan = true #XXX true because i'm testing sommelier role.
return isuseplan
end