From 1c1713fb7e151344e07762659adf96f2677cab3a Mon Sep 17 00:00:00 2001 From: tonaerospace Date: Tue, 5 Dec 2023 11:51:16 +0000 Subject: [PATCH] update --- src/interface.jl | 11 ++++++----- src/type.jl | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index 970f28d..27a180e 100755 --- a/src/interface.jl +++ b/src/interface.jl @@ -80,7 +80,6 @@ function clearMessage(a::T) where {T<:agent} break end end - a.thought = "nothing" end function removeLatestMsg(a::T) where {T<:agent} @@ -768,7 +767,7 @@ function actor(a::agentReflex) println("") @show decision @show reason - a.memory[:shortterm]["Check $(a.step):"] = reason + # a.memory[:shortterm]["Check $(a.step):"] = reason if decision == "Yes" # in case there is a cancel, go straight to evaluation a.step += 1 elseif decision == "No" @@ -1199,10 +1198,12 @@ function goNogo(a) Your work: $work - Consider the plan and Obs $(a.step), your job is to choose one of the following choices: - If you need to repeat the latest step say, "{No}". And what is the rationale behind the decision? - If you are ready to do the next step of the plan say, "{Yes}". And what is the rationale behind the decision? + From the plan, your job is to check whether the latest step of your work is complete and choose only one of the following choices. + choice 1: If you are ready to do the next step of the plan say, "{Yes}". And what is the rationale behind the decision? + choice 2: If you need to repeat the latest step say, "{No}". And what is the rationale behind the decision? <|im_end|> + <|im_start|>assistant + """ respond = sendReceivePrompt(a, prompt) diff --git a/src/type.jl b/src/type.jl index 9794425..dadc067 100644 --- a/src/type.jl +++ b/src/type.jl @@ -14,7 +14,7 @@ abstract type agent end @kwdef mutable struct agentReflex <: agent availableRole::AbstractVector = ["system", "user", "assistant"] agentName::String = "Jene" # ex. Jene - maxUserMsg::Int = 10 + maxUserMsg::Int = 30 earlierConversation::String = "" # summary of earlier conversation mqttClient::Union{mqttClient, Nothing} = nothing msgMeta::Union{Dict, Nothing} = nothing @@ -105,7 +105,7 @@ function agentReflex( Stimulus: the input user gives to you and you must respond Plan: first you should always think about the stimulus, the info you need and the info you have thoroughly then extract and devise a step by step plan (pay attention to correct numeral calculation and commonsense). p.s.1 each step should be a single question/action. - p.s.2 Do not respond yet. + p.s.2 Do not include respond step. """, :actor=> """