This commit is contained in:
narawat lamaiin
2024-06-01 15:03:30 +07:00
parent ae3d340248
commit bfc6c234ae

View File

@@ -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