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 = """