This commit is contained in:
2026-08-05 04:21:44 +07:00
parent ba13ccc4b9
commit a3f9e39249
3 changed files with 279 additions and 33 deletions
+9 -7
View File
@@ -176,7 +176,7 @@ julia> # Currently returns a placeholder echo response
function _process_message(agent::yiemAgent, msg)::assistantMessage
# WORKING
# loop until LLM didn't use tool calls
# loop until llmCall() response didn't use tool calls
while
# take every messages from agent.inputChannel, convert them into userMessage
# and add them to agent._state.messages
@@ -185,11 +185,15 @@ function _process_message(agent::yiemAgent, msg)::assistantMessage
# Call agent.formatMsgForLLM(agent._state) to format for LLM
# Call the LLM (blocking — the task waits here)
# Call llmCall() (blocking — the task waits here)
# call toolArgumentValidation() to make sure soon-to-call tools has valid arguments
# if LLM use tool calls
# If agent has tools, handle tool calls in a loop, save tool
# call executeToolCalls()
# else
# break out of while loop
end
# Build assistantMessage and return it
@@ -207,9 +211,7 @@ function _process_message(agent::yiemAgent, msg)::assistantMessage
end
function createToolResultMessage()::toolResultMessage
end
+1 -1
View File
@@ -386,7 +386,7 @@ mutable struct yiemAgent <: agent # High-level agent wrapper
# Callback invoked before executing a tool call (ask for user permission/confirmation/abort, etc..)
beforeToolCall::Union{Function, Nothing}
executeToolCalls::Function # execute tool calls
executeToolCalls::Function # execute tool calls ()
# Callback invoked after executing a tool call to sanitize tools output so the output is ready
# to be converted into toolResults message