From 83a20faab68914b0687da70c0af94727ebe4919b Mon Sep 17 00:00:00 2001 From: tonaerospace Date: Wed, 19 Mar 2025 19:11:06 +0700 Subject: [PATCH] update --- src/llmfunction.jl | 4 ++-- test/runtest.jl | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/llmfunction.jl b/src/llmfunction.jl index 505ddd5..d56da2b 100644 --- a/src/llmfunction.jl +++ b/src/llmfunction.jl @@ -816,8 +816,8 @@ julia> - 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 """ -function compareState(question::String, highValueStateList::Vector{Dict}, - text2textInstructLLM::Function)::Integer +function compareState(question::String, highValueStateList::Vector{T}, + text2textInstructLLM::Function)::Integer where {T<:AbstractDict} systemmsg = """ diff --git a/test/runtest.jl b/test/runtest.jl index ee5105b..07e7206 100644 --- a/test/runtest.jl +++ b/test/runtest.jl @@ -53,7 +53,7 @@ function text2textInstructLLM(prompt::String; maxattempt=3) response = nothing for attempts in 1:maxattempt - _response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg; timeout=180, maxattempt=2) + _response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg; timeout=300, maxattempt=2) payload = _response[:response] if _response[:success] && payload[:text] !== nothing response = _response[:response][:text] @@ -126,6 +126,7 @@ function similarSQLVectorDB(query; maxdistance::Integer=100) # get embedding of the query df = findSimilarTextFromVectorDB(query, tablename, "function_input_embedding", executeSQLVectorDB) + # println(df[1, [:id, :function_output]]) row, col = size(df) distance = row == 0 ? Inf : df[1, :distance] # distance = 100 # CHANGE this is for testing only