From 022cb5caf021cbc8515f74296d84136e23d88e84 Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Sun, 5 Jan 2025 17:41:21 +0700 Subject: [PATCH] update --- src/interface.jl | 3 ++- src/llmfunction.jl | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index b779f7e..6b8756c 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -159,9 +159,10 @@ function decisionMaker(a::T; recent::Integer=5)::Dict{Symbol,Any} where {T<:agen 1) Make an informed decision about what you need to do to achieve the goal 2) Thanks the user when they don't need any further assistance and invite them to comeback next time - Your responsibility do not include: + Your responsibility does NOT include: 1) Asking or guiding the user to make a purchase 2) Processing sales orders or engaging in any other sales-related activities + 3) Providing services other than making recommendations. At each round of conversation, you will be given the current situation: Your recent events: latest 5 events of the situation diff --git a/src/llmfunction.jl b/src/llmfunction.jl index fb8d685..5979a13 100644 --- a/src/llmfunction.jl +++ b/src/llmfunction.jl @@ -783,9 +783,9 @@ function extractWineAttributes_2(a::T1, input::T2)::String where {T1<:agent, T2< # some time LLM not put integer range for (k, v) in responsedict - if !occursin("keyword", string(k)) - if !occursin('-', v) || length(v) > 5 - errornote = "WARNING: The non-range value for $k is not allowed. It should be specified in a range format, such as min-max." + if !occursin("keyword", string(k)) + if v !== "NA" && (!occursin('-', v) || length(v) > 5) + errornote = "WARNING: The non-range value {$k: $v} is not allowed. It should be specified in a range format, such as min-max." println("Attempt $attempt $errornote ", @__FILE__, " ", @__LINE__) continue end @@ -807,7 +807,6 @@ function extractWineAttributes_2(a::T1, input::T2)::String where {T1<:agent, T2< result *= "$k: $v, " end end - result = result[1:end-2] # remove the ending ", " return result