update
This commit is contained in:
@@ -499,7 +499,7 @@ julia>
|
||||
function evaluator(state::T1, text2textInstructLLM::Function;
|
||||
addSQLVectorDB::Union{Function, Nothing}=nothing
|
||||
) where {T1<:AbstractDict}
|
||||
|
||||
println("Evaluating state", @__FILE__, " ", @__LINE__)
|
||||
# systemmsg =
|
||||
# """
|
||||
# You are a helpful assistant that analyzes agent's trajectories to find solutions and observations (i.e., the results of actions) to answer the user's questions.
|
||||
@@ -982,7 +982,7 @@ function transition(state::T, args::NamedTuple
|
||||
if actionname == "listalltables"
|
||||
# deepcopy(state[:virtualCustomerChatHistory]) because I want to keep it clean
|
||||
# so that other simulation start from this same node is not contaminated with actioninput
|
||||
listAllTable_json(executeSQLF) # virtual customer
|
||||
listAllTable_json(executeSQLF)
|
||||
elseif actionname == "TABLEINFO"
|
||||
input = copy(JSON3.read(actioninput))
|
||||
tableinfo(executeSQLF, input)
|
||||
@@ -1002,7 +1002,7 @@ function transition(state::T, args::NamedTuple
|
||||
success::Bool = haskey(response, :success) ? response[:success] : false
|
||||
|
||||
newNodeKey, newstate = makeNewState(state, thoughtDict, JSON3.write(result), select, reward, isterminal)
|
||||
|
||||
println("SQLLLM transition() 1 ", @__FILE__, " ", @__LINE__)
|
||||
progressvalue::Integer = evaluatorF(newstate, text2textInstructLLM;
|
||||
addSQLVectorDB=addSQLVectorDBF)
|
||||
|
||||
@@ -1090,8 +1090,8 @@ function query(query::T, executeSQL::Function, text2textInstructLLM::Function;
|
||||
addSQLVectorDB::Union{Function, Nothing}=nothing,
|
||||
querySQLVectorDB::Union{Function, Nothing}=nothing
|
||||
)::String where {T<:AbstractString}
|
||||
# add extra context for Evaluator so that it knows the observation is from seaching a database
|
||||
query = "Search the database for " * query
|
||||
#[WORKING] add extra context for Evaluator so that it knows the observation is from seaching a database
|
||||
query = "Search the database for {$query}"
|
||||
initialstate = Dict{Symbol, Any}(
|
||||
:reward=> 0,
|
||||
:isterminal=> false,
|
||||
|
||||
Reference in New Issue
Block a user