This commit is contained in:
2023-12-15 11:35:36 +00:00
parent 7066f46504
commit 05ccee2f92
2 changed files with 48 additions and 32 deletions

View File

@@ -403,16 +403,16 @@ function isUseTools(a::agentReflex)
# if LLM mentions any tools, use Plan/Thought/Act loop
isusetool = false
objective = sendReceivePrompt(a, prompt, temperature=0.2)
response = sendReceivePrompt(a, prompt, temperature=0.0)
response = split(response, "<|im_end|>")[1]
for (toolname, v) in a.tools
if occursin(toolname, objective)
if occursin(toolname, response)
isusetool = true
break
end
end
@show objective
return isusetool, objective
return isusetool
end