update
This commit is contained in:
@@ -761,7 +761,6 @@ function actor(a::agentReflex)
|
||||
totalsteps = checkTotalStepInPlan(a)
|
||||
|
||||
while true # Actor loop
|
||||
#WORKING
|
||||
if a.step == 0
|
||||
a.step = 1
|
||||
else
|
||||
@@ -774,8 +773,9 @@ function actor(a::agentReflex)
|
||||
a.step += 1
|
||||
elseif decision == "No"
|
||||
# repeat the latest step
|
||||
# TODO delete Thought/Act/ActInput from the latest input
|
||||
error("repete step $(a.step)")
|
||||
# WORKING delete Thought/Act/ActInput from the latest input
|
||||
a.memory[:shortterm] = removeHeaders(a.memory[:shortterm], a.step, ["Plan"])
|
||||
println("repeating step $(a.step)")
|
||||
elseif decision == "formulateUserRespond"
|
||||
actorState = "formulateUserRespond"
|
||||
msgToUser = nothing
|
||||
@@ -1234,52 +1234,6 @@ function goNogo(a)
|
||||
|
||||
return decision, reason
|
||||
end
|
||||
# function goNogo(a)
|
||||
# stimulus = a.memory[:shortterm]["user:"]
|
||||
# work = ""
|
||||
# for (k, v) in a.memory[:shortterm]
|
||||
# if k ∉ ["user:"]
|
||||
# work *= "$k $v"
|
||||
# end
|
||||
# end
|
||||
|
||||
|
||||
# prompt =
|
||||
# """
|
||||
# <|im_start|>system
|
||||
# You have access to the following tools:
|
||||
# chatbox: Useful for when you need to ask a customer for more context. Input should be a conversation to customer.
|
||||
# wikisearch: Useful for when you need to search an encyclopedia Input is keywords and not a question.
|
||||
|
||||
# Symbol:
|
||||
# Stimulus: the input user gives to you and you must respond
|
||||
# Plan: a plan
|
||||
# Thought: your thought
|
||||
# Act: the action you took
|
||||
# ActInput: the input to the action
|
||||
# Obs: the result of the action
|
||||
|
||||
# Stimulus:
|
||||
# $stimulus
|
||||
|
||||
# Your work:
|
||||
# $work
|
||||
|
||||
# From your work, you job is to decide whether you're ready to do the next step in the plan by choosing one of the following choices:
|
||||
# If you are ready say, "{Yes}". And what is the rationale behind the decision?
|
||||
# If you are not ready say, "{No}". And what is the rationale behind the decision?
|
||||
# <|im_end|>
|
||||
# """
|
||||
|
||||
# respond = sendReceivePrompt(a, prompt)
|
||||
|
||||
# decision = GeneralUtils.getStringBetweenCharacters(respond, "{", "}")
|
||||
# start = findfirst("}", respond)[end] +1
|
||||
# reason = respond[start:end]
|
||||
|
||||
# return decision, reason
|
||||
# end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user