update
This commit is contained in:
@@ -823,7 +823,7 @@ function transition(state::T, args::NamedTuple
|
||||
# so that other simulation start from this same node is not contaminated with actioninput
|
||||
listAllTable_json(executeSQL)
|
||||
elseif thoughtDict[:action_name] == "TABLEINFO"
|
||||
input = thoughtDict[:action_input] # BUG thoughtDict[:action_input] = "\"wine\""
|
||||
input = thoughtDict[:action_input]
|
||||
tableinfo(executeSQL, input)
|
||||
elseif thoughtDict[:action_name] == "GETDATA"
|
||||
response = SQLexecution(executeSQL, thoughtDict[:action_input])
|
||||
@@ -978,11 +978,13 @@ function query(query::T, executeSQL::Function, text2textInstructLLM::Function;
|
||||
|
||||
earlystop(state) = state[:reward] >= 8 ? true : false
|
||||
|
||||
_, resultState = LLMMCTS.runMCTS(initialstate, transition, transitionargs;
|
||||
_, _, resultState = LLMMCTS.runMCTS(initialstate, transition, transitionargs;
|
||||
horizontalSampleExpansionPhase=2,
|
||||
horizontalSampleSimulationPhase=1,
|
||||
maxdepth=3, maxiterations=2, explorationweight=1.0,
|
||||
earlystop=earlystop)
|
||||
maxSimulationDepth=3, maxiterations=2,
|
||||
explorationweight=1.0,
|
||||
earlystop=earlystop,
|
||||
saveSimulatedNode=true)
|
||||
latestKey, latestInd = GeneralUtils.findHighestIndexKey(resultState[:thoughtHistory], "observation")
|
||||
action_input = Symbol("action_input_$latestInd") # latest sql
|
||||
sql = resultState[:thoughtHistory][action_input]
|
||||
|
||||
Reference in New Issue
Block a user