update
This commit is contained in:
@@ -289,6 +289,9 @@ julia> result = checkinventory(agent, input)
|
||||
"""
|
||||
function checkinventory(a::T1, input::T2
|
||||
) where {T1<:agent, T2<:AbstractString}
|
||||
|
||||
# [WORKING] make sure input has no french or german character
|
||||
|
||||
println("\n~~~ checkinventory order: $input ", @__FILE__, " ", @__LINE__)
|
||||
wineattributes_1 = extractWineAttributes_1(a, input)
|
||||
wineattributes_2 = extractWineAttributes_2(a, input)
|
||||
@@ -428,6 +431,8 @@ function extractWineAttributes_1(a::T1, input::T2)::String where {T1<:agent, T2<
|
||||
|
||||
responsedict = GeneralUtils.textToDict(response, attributes, rightmarker=":", symbolkey=true)
|
||||
|
||||
#[WORKING] check if winery, wine_name, region, country, wine_type, grape_variety are in the query because sometime AI halucinates
|
||||
|
||||
for i ∈ attributes
|
||||
if length(JSON3.write(responsedict[Symbol(i)])) == 0
|
||||
error("$i is empty ", @__LINE__)
|
||||
|
||||
Reference in New Issue
Block a user