From 390b9d71b64be121669a3cbf9658cbc33f82ed0d Mon Sep 17 00:00:00 2001 From: narawat Date: Tue, 8 Sep 2026 06:04:02 +0700 Subject: [PATCH] update --- src/agentCore.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agentCore.jl b/src/agentCore.jl index 57c00e1..876051a 100644 --- a/src/agentCore.jl +++ b/src/agentCore.jl @@ -267,7 +267,7 @@ function _agentLoop(agent::yiemAgent) agent.eventSink("_agentLoop 1 agent._state.messages length $(length(agent._state.messages))"; publish=false, log=true) # agent process new user msg immediately after the current tool call finished. newUserMsg = take!(agent.inputChannel) - agent.eventSink("new user msg\n$newUserMsg"; publish=false, log=true) + # agent.eventSink("new user msg\n$newUserMsg"; publish=false, log=true) else # check followUp message after _processMessage() is done if typeof(processingTask) == Task && istaskdone(processingTask) == true @@ -448,7 +448,7 @@ function _processMessage( # Call formatMessagesForLLM() to format for LLM formattedMessages = formatMessagesForLLM(preparedContext, eventSink) - eventSink("_processMessage 10 formattedMessages $formattedMessages"; publish=false, log=true) + # eventSink("_processMessage 10 formattedMessages $formattedMessages"; publish=false, log=true) """ response example response = JSON.Object{String, Any}("finish_reason" => "tool_calls", "index" => 0, "message" => JSON.Object{String, Any}("role" => "assistant", "content" => "", "reasoning_content" => "Here's a thinking process:\n\n1. **Identify User Request**: The user is asking for the weather in Bangkok.\n2. **Locate Relevant Tool**: I have a `getWeather` function available.\n3. **Check Function Parameters**:\n - `city` (required): City and country, e.g., 'San Francisco, CA' or 'Tokyo, Japan'\n - `units` (optional, default \"celsius\"): Temperature scale (\"celsius\" or \"fahrenheit\")\n4. **Prepare Parameters**:\n - `city`: \"Bangkok, Thailand\" (adding country for clarity, though just \"Bangkok\" might work, following the example format is safer)\n - `units`: Not specified, so I'll use the default (\"celsius\")\n5. **Execute Tool Call**: Call `getWeather` with `city: \"Bangkok, Thailand\"`\n6. **Anticipate Response**: The function will return current weather and forecast data for Bangkok. I'll then format it nicely for the user.\n - *Self-Correction/Verification during thought*: The prompt says \"city: City and country, e.g., 'San Francisco, CA' or 'Tokyo, Japan'\". I'll use \"Bangkok, Thailand\". The `units` parameter is optional, so I'll omit it to use the default.\n - Proceed with tool call.✅\n", "tool_calls" => Any[JSON.Object{String, Any}("type" => "function", "function" => JSON.Object{String, Any}("name" => "getWeather", "arguments" => "{\"city\":\"Bangkok, Thailand\"}"), "id" => "6fOilR5QPcdppbAAHluhkRyUDu3oWMAL")]))