update
This commit is contained in:
@@ -302,7 +302,7 @@ function decisionMaker(a::T)::Dict{Symbol, Any} where {T<:agent}
|
||||
end
|
||||
|
||||
for i ∈ [:thought, :plan, :action_name]
|
||||
if length(JSON3.write(responsedict[i])) == 0
|
||||
if length(responsedict[i]) == 0
|
||||
error("$i is empty ", @__LINE__)
|
||||
end
|
||||
end
|
||||
@@ -321,8 +321,8 @@ function decisionMaker(a::T)::Dict{Symbol, Any} where {T<:agent}
|
||||
isMemEmpty = isempty(a.memory[:shortmem])
|
||||
if occursin("Yes", responsedict[:recommending_wine]) && isMemEmpty &&
|
||||
responsedict[:action_name] != "CHECKINVENTORY"
|
||||
checkinventory_flag = "You must check inventory before recommending wine to the user."
|
||||
error( "You must check inventory before recommending wine")
|
||||
checkinventory_flag = "You must check your inventory before recommending wine to the user."
|
||||
error( "You must check your inventory before recommending wine")
|
||||
else
|
||||
checkinventory_flag = ""
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user