This commit is contained in:
2026-08-04 21:42:42 +07:00
parent 2072ebe554
commit 96ff9f0924
2 changed files with 43 additions and 29 deletions
+18 -12
View File
@@ -163,7 +163,7 @@ should be implemented. Currently a placeholder that echoes back the received mes
- Implement the full processing pipeline:
1. Add `msg` to `agent._state.messages`
2. Call `agent.formatMsgForLLM(agent._state)` 1 to format for LLM
3. If `agent.preprocessMessages` is set, call it on the formatted messages
3. If `agent.preprocessContext` is set, call it on the formatted messages
4. Call the LLM (blocking — the task waits here)
5. If agent has tools, handle tool calls in a loop
6. Build `assistantMessage` and return it
@@ -173,19 +173,23 @@ should be implemented. Currently a placeholder that echoes back the received mes
julia> # Currently returns a placeholder echo response
```
"""
function _process_message(agent::yiemAgent, msg)
# WORKING Replace with actual processing logic
function _process_message(agent::yiemAgent, msg)::assistantMessage
# WORKING
# take every messages from agent.inputChannel, convert them into userMessage
# and add them to agent._state.messages
# call agent.preprocessContext()
# Call agent.formatMsgForLLM(agent._state) to format for LLM
# Call the LLM (blocking — the task waits here)
# 2. Call agent.formatMsgForLLM(agent._state) to format for LLM
# 3. If preprocessMessages is set, call agent.preprocessMessages(...)
# 4. Call the LLM (blocking — the task waits here)
# 5. If agent has tools, handle tool calls in a loop
# 6. Build assistantMessage and return it
# call toolArgumentValidation() to make sure soon-to-call tools has valid arguments
# If agent has tools, handle tool calls in a loop
# Build assistantMessage and return it
# Placeholder: echo back the message as a simple response
@warn "TODO: implement _process_message"
@@ -200,6 +204,11 @@ function _process_message(agent::yiemAgent, msg)
end
function createToolResultMessage()::toolResultMessage
end
@@ -264,9 +273,6 @@ end