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