From bfc6c234ae669112fe8131b665111278a02c41dc Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Sat, 1 Jun 2024 15:03:30 +0700 Subject: [PATCH] update --- src/interface.jl | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index 82626d5..1cfdb8e 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -787,13 +787,6 @@ function reflector(config::T1, state::T2)::String where {T1<:AbstractDict, T2<:A end -function transition() - error("--> transition") -end - - - - """ Get a new state # Arguments @@ -833,7 +826,7 @@ julia> thoughtDict = Dict( # Signature """ -function transition(config::T1, state::T2, decisionMaker::Function, evaluator::Function, +function transition(state::T2, config::T1, decisionMaker::Function, evaluator::Function, reflector::Function )::Tuple{String, Dict{Symbol, <:Any}, Integer} where {T1<:AbstractDict, T2<:AbstractDict} @@ -982,8 +975,8 @@ function conversation(a::T, userinput::Dict) where {T<:agent} end while true - bestNextState, besttrajectory = LLMMCTS.runMCTS(config, a.plan[:currenttrajectory], - decisionMaker, evaluator, reflector, transition; + bestNextState, besttrajectory = LLMMCTS.runMCTS(a.plan[:currenttrajectory], + transition, config, decisionMaker, evaluator, reflector; totalsample=2, maxDepth=3, maxiterations=3, explorationweight=1.0) a.plan[:activeplan] = bestNextState