update
This commit is contained in:
@@ -445,6 +445,16 @@ function extractWineAttributes_1(a::T1, input::T2)::String where {T1<:agent, T2<
|
||||
end
|
||||
end
|
||||
|
||||
# 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")
|
||||
else
|
||||
responsedict[:region] = "NA"
|
||||
end
|
||||
end
|
||||
|
||||
responsedict[:flavors] = replace(responsedict[:flavors], "notes"=>"")
|
||||
delete!(responsedict, :reasoning)
|
||||
delete!(responsedict, :tasting_notes)
|
||||
|
||||
Reference in New Issue
Block a user