update
This commit is contained in:
@@ -753,6 +753,7 @@ function conversation(a::T, userinput::Dict) where {T<:agent}
|
||||
addNewMessage(a, "user", userinput[:text])
|
||||
|
||||
if isempty(a.plan[:currenttrajectory])
|
||||
|
||||
a.plan[:currenttrajectory] = Dict{Symbol, Any}(
|
||||
# deepcopy the info to prevent modifying the info unintentionally during MCTS planning
|
||||
:customerinfo=> deepcopy(a.keywordinfo[:customerinfo]),
|
||||
@@ -769,7 +770,10 @@ function conversation(a::T, userinput::Dict) where {T<:agent}
|
||||
:thoughtHistory=> OrderedDict{Symbol, Any}(
|
||||
#[] :recap=>,
|
||||
:question=> userinput[:text],
|
||||
)
|
||||
),
|
||||
:virtualCustomerChatHistory=> Vector{Dict{Symbol, Any}}(
|
||||
[Dict(:name=> "user", :text=> userinput[:text])]
|
||||
),
|
||||
)
|
||||
else
|
||||
_, a.plan[:currenttrajectory] = makeNewState(a.plan[:currenttrajectory],
|
||||
@@ -780,7 +784,7 @@ function conversation(a::T, userinput::Dict) where {T<:agent}
|
||||
|
||||
while true
|
||||
bestNextState, besttrajectory = runMCTS(a, a.plan[:currenttrajectory], decisionMaker,
|
||||
evaluator, reflector, totalsample=2, maxDepth=2, maxiterations=1, explorationweight=1.0)
|
||||
evaluator, reflector, totalsample=2, maxDepth=2, maxiterations=2, explorationweight=1.0)
|
||||
a.plan[:activeplan] = bestNextState
|
||||
|
||||
latestActionKey, latestActionIndice =
|
||||
|
||||
Reference in New Issue
Block a user