V0.8.0 async think loop #40

Merged
ton merged 50 commits from v0.8.0-async_think_loop into v0.8.0 2026-08-08 04:13:05 +00:00
2 changed files with 12 additions and 9 deletions
Showing only changes of commit ba13ccc4b9 - Show all commits
+10 -7
View File
@@ -176,18 +176,21 @@ julia> # Currently returns a placeholder echo response
function _process_message(agent::yiemAgent, msg)::assistantMessage function _process_message(agent::yiemAgent, msg)::assistantMessage
# WORKING # WORKING
# take every messages from agent.inputChannel, convert them into userMessage # loop until LLM didn't use tool calls
# and add them to agent._state.messages while
# take every messages from agent.inputChannel, convert them into userMessage
# and add them to agent._state.messages
# call agent.preprocessContext() # call agent.preprocessContext()
# Call agent.formatMsgForLLM(agent._state) to format for LLM # Call agent.formatMsgForLLM(agent._state) to format for LLM
# Call the LLM (blocking — the task waits here) # Call the LLM (blocking — the task waits here)
# call toolArgumentValidation() to make sure soon-to-call tools has valid arguments # call toolArgumentValidation() to make sure soon-to-call tools has valid arguments
# If agent has tools, handle tool calls in a loop # If agent has tools, handle tool calls in a loop, save tool
end
# Build assistantMessage and return it # Build assistantMessage and return it
+2 -2
View File
@@ -204,7 +204,7 @@ A tool available to the agent.
- `parameters::TParameters`: Tool parameters schema (JSON schema) - `parameters::TParameters`: Tool parameters schema (JSON schema)
- `execute::Function`: Tool execution function - `execute::Function`: Tool execution function
- `prepareArguments::Union{Function, Nothing}`: Optional argument preparation callback - `prepareArguments::Union{Function, Nothing}`: Optional argument preparation callback
- `executionMode::Union{toolExecutionMode, Nothing}`: Override: run tool calls sequentially or in parallel - `parallelExecute::Union{toolparallelExecute, Nothing}`: Override: run tool calls sequentially or in parallel
# Returns # Returns
- A new `agentTool` instance - A new `agentTool` instance
@@ -216,7 +216,7 @@ struct agentTool{TParameters, TDetails} # A tool available to the agent
parameters::TParameters # Tool parameters schema (JSON schema) parameters::TParameters # Tool parameters schema (JSON schema)
execute::Function # Tool execution function execute::Function # Tool execution function
prepareArguments::Union{Function, Nothing} # Optional argument preparation callback prepareArguments::Union{Function, Nothing} # Optional argument preparation callback
executionMode::Union{toolExecutionMode, Nothing} # Override: run tool calls sequentially or in parallel parallelExecute::Union{toolparallelExecute, Nothing} # Override: run tool calls sequentially or in parallel
end end