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