update
This commit is contained in:
@@ -454,8 +454,8 @@ function extractWineAttributes_1(a::T1, input::T2)::String where {T1<:agent, T2<
|
||||
# check if grape_variety is mentioned in the input
|
||||
if !occursin("NA", responsedict[:grape_variety]) && !occursin(responsedict[:grape_variety], input)
|
||||
if attempt < maxattempt
|
||||
errornote = "You are halucinating, $(responsedict[:grape_variety]) is not mentioned in the input"
|
||||
error("$(responsedict[:grape_variety]) is not mentioned in the input")
|
||||
errornote = "$(responsedict[:grape_variety]) is not mentioned in the user query, you must only use the info from the query.."
|
||||
error("$(responsedict[:grape_variety]) is not mentioned in the user query, you must only use the info from the query.")
|
||||
else
|
||||
responsedict[:grape_variety] = "NA"
|
||||
end
|
||||
@@ -464,8 +464,8 @@ function extractWineAttributes_1(a::T1, input::T2)::String where {T1<:agent, T2<
|
||||
# check if region is mentioned in the input
|
||||
if !occursin("NA", responsedict[:region]) && !occursin(responsedict[:region], input)
|
||||
if attempt < maxattempt
|
||||
errornote = "You are halucinating, $(responsedict[:region]) is not mentioned in the input"
|
||||
error("$(responsedict[:region]) is not mentioned in the input")
|
||||
errornote = "$(responsedict[:region]) is not mentioned in the user query, you must only use the info from the query.."
|
||||
error("$(responsedict[:region]) is not mentioned in the user query, you must only use the info from the query..")
|
||||
else
|
||||
responsedict[:region] = "NA"
|
||||
end
|
||||
@@ -506,7 +506,7 @@ function extractWineAttributes_1(a::T1, input::T2)::String where {T1<:agent, T2<
|
||||
errorMsg = String(take!(io))
|
||||
st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
||||
println("")
|
||||
println("Attempt $attempt. Error occurred: $errorMsg\n$st")
|
||||
println("Attempt $attempt. Error occurred: $errorMsg\n$st ", @__FILE__, " ", @__LINE__)
|
||||
println("")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user