update
This commit is contained in:
30
src/utils.jl
30
src/utils.jl
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user