update
This commit is contained in:
@@ -733,15 +733,18 @@ function evaluator(state::T1, text2textInstructLLM::Function;
|
|||||||
|
|
||||||
# mark as terminal state when the answer is achieved
|
# mark as terminal state when the answer is achieved
|
||||||
if accepted_as_answer == "Yes"
|
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
|
state[:isterminal] = true
|
||||||
|
|
||||||
# user score as reward because different answers hold different value for the user.
|
# user score as reward because different answers hold different value for the user.
|
||||||
state[:reward] = responsedict[:score]
|
state[:reward] = responsedict[:score]
|
||||||
|
|
||||||
# add to vectorDB
|
|
||||||
if addSQLVectorDB !== nothing
|
|
||||||
addSQLVectorDB(state)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
println("\n~~~ Evaluator() ", @__FILE__, " ", @__LINE__)
|
println("\n~~~ Evaluator() ", @__FILE__, " ", @__LINE__)
|
||||||
pprintln(Dict(responsedict))
|
pprintln(Dict(responsedict))
|
||||||
|
|||||||
Reference in New Issue
Block a user