This commit is contained in:
2025-03-19 19:11:06 +07:00
parent 418c543d44
commit 83a20faab6
2 changed files with 4 additions and 3 deletions

View File

@@ -816,8 +816,8 @@ julia>
- Each state in highValueStateList should contain a thoughtHistory with action_input and observation - Each state in highValueStateList should contain a thoughtHistory with action_input and observation
- The LLM evaluates attempts based on accuracy and relevance to the original question - The LLM evaluates attempts based on accuracy and relevance to the original question
""" """
function compareState(question::String, highValueStateList::Vector{Dict}, function compareState(question::String, highValueStateList::Vector{T},
text2textInstructLLM::Function)::Integer text2textInstructLLM::Function)::Integer where {T<:AbstractDict}
systemmsg = systemmsg =
""" """

View File

@@ -53,7 +53,7 @@ function text2textInstructLLM(prompt::String; maxattempt=3)
response = nothing response = nothing
for attempts in 1:maxattempt for attempts in 1:maxattempt
_response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg; timeout=180, maxattempt=2) _response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg; timeout=300, maxattempt=2)
payload = _response[:response] payload = _response[:response]
if _response[:success] && payload[:text] !== nothing if _response[:success] && payload[:text] !== nothing
response = _response[:response][:text] response = _response[:response][:text]
@@ -126,6 +126,7 @@ function similarSQLVectorDB(query; maxdistance::Integer=100)
# get embedding of the query # get embedding of the query
df = findSimilarTextFromVectorDB(query, tablename, df = findSimilarTextFromVectorDB(query, tablename,
"function_input_embedding", executeSQLVectorDB) "function_input_embedding", executeSQLVectorDB)
# println(df[1, [:id, :function_output]])
row, col = size(df) row, col = size(df)
distance = row == 0 ? Inf : df[1, :distance] distance = row == 0 ? Inf : df[1, :distance]
# distance = 100 # CHANGE this is for testing only # distance = 100 # CHANGE this is for testing only