This commit is contained in:
2026-08-05 19:33:40 +07:00
parent ec28e0ff54
commit 4cb01c71bb
+5 -5
View File
@@ -81,7 +81,7 @@ function _agent_loop(agent::yiemAgent)
while msg === nothing while msg === nothing
if isready(agent.inputChannel) if isready(agent.inputChannel)
# message will be taken then process in _process_message() # message will be taken in _process_message()
msg = fetch!(agent.inputChannel) msg = fetch!(agent.inputChannel)
else else
yield() yield()
@@ -109,7 +109,7 @@ function _agent_loop(agent::yiemAgent)
# make active # make active
if agent._state.activeRun == false if agent._state.activeRun == false
# Dispatch message through the processing pipeline # Dispatch message through the processing pipeline
processing_task = @spawn _process_message(agent, msg) processing_task = @spawn _process_message(agent)
agent._state.activeRun = true agent._state.activeRun = true
end end
@@ -173,7 +173,7 @@ should be implemented. Currently a placeholder that echoes back the received mes
julia> # Currently returns a placeholder echo response julia> # Currently returns a placeholder echo response
``` ```
""" """
function _process_message(agent::yiemAgent, msg)::assistantMessage function _process_message(agent::yiemAgent)::assistantMessage
# WORKING # WORKING
# loop until llmCall() response didn't use tool calls # loop until llmCall() response didn't use tool calls
@@ -187,13 +187,13 @@ function _process_message(agent::yiemAgent, msg)::assistantMessage
# Call llmCall() (blocking — the task waits here) # Call llmCall() (blocking — the task waits here)
# if LLM use tool calls # if (LLM use tool calls)
# call executeToolCalls() # call executeToolCalls()
# save toolResults to agent._state.messages # save toolResults to agent._state.messages
# else # else (LLM not use tool calls)
# break out of while loop # break out of while loop
end end