update
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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=>
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user