This commit is contained in:
2025-03-18 07:34:51 +07:00
parent 14c881741e
commit 7c9ceb06f8
4 changed files with 388 additions and 37 deletions

View File

@@ -1,30 +1,78 @@
using Revise
using SQLLLM, LLMMCTS, DataStructures
using SQLLLM, LLMMCTS, DataStructures, JSON3
query = "How many German wines do you have?"
highValueStateList = copy(JSON3.read("/appfolder/app/highValueState_1.json"))
selectedState = SQLLLM.compareState(query, highValueStateList)
initialstate = Dict{Symbol, Any}(
:reward=> 0,
:isterminal=> false,
:evaluation=> "None",
:evaluationscore=> 0,
:suggestion=> "None",
:accepted_as_answer=> "No",
:lesson=> nothing,
# contain question, thought_1, action_1, observation_1, thought_2, ...
:thoughtHistory=> OrderedDict{Symbol, Any}(
#[] :recap=>,
:question=> "query",
),
)
root = MCTSNode("root", initialstate, 0, 0, 0, 0, false, nothing, Dict{String,MCTSNode}(),
Dict{Symbol,Any}())
field = fieldnames(typeof(root))
for f in field
println(getfield(root, f))
setfield!(root, f, 1)
end
println("\n done")