From cd6f6ef96103ccf16921fcfafc0a7df1a734d54d Mon Sep 17 00:00:00 2001 From: narawat Date: Sun, 12 Jul 2026 11:14:30 +0700 Subject: [PATCH] update --- src/llmfunction.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/llmfunction.jl b/src/llmfunction.jl index e09e164..4152564 100644 --- a/src/llmfunction.jl +++ b/src/llmfunction.jl @@ -480,12 +480,12 @@ function generatesql(a::T, searchterm::String, errornote = "" # provide similar sql only for the first attempt sql, distance = a.context.similarSQLVectorDB(searchterm) - # if sql is really close, just use it - if sql !== nothing && distance <= 0.1 - return similarSQL_ - end similarSQL_ = sql !== nothing ? sql : "None" + # if sql is really close, just use it + if similarSQL_ != "None" && distance <= 0.1 + return similarSQL_ + end context = """