This commit is contained in:
narawat lamaiin
2024-10-14 21:14:32 +07:00
parent 061f5ee712
commit c46f670f7a

View File

@@ -733,15 +733,18 @@ function evaluator(state::T1, text2textInstructLLM::Function;
# mark as terminal state when the answer is achieved
if accepted_as_answer == "Yes"
# add to vectorDB only if the answer is achieved and the state is terminal
# (found some row in the database)
if addSQLVectorDB !== nothing && state[:isterminal] == true
addSQLVectorDB(state)
end
# mark the state as terminal state because the evaluation say so.
state[:isterminal] = true
# user score as reward because different answers hold different value for the user.
state[:reward] = responsedict[:score]
# add to vectorDB
if addSQLVectorDB !== nothing
addSQLVectorDB(state)
end
end
println("\n~~~ Evaluator() ", @__FILE__, " ", @__LINE__)
pprintln(Dict(responsedict))