This commit is contained in:
narawat lamaiin
2025-01-05 17:41:21 +07:00
parent cff0d31ae6
commit 022cb5caf0
2 changed files with 5 additions and 5 deletions

View File

@@ -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