update
This commit is contained in:
@@ -185,8 +185,9 @@ function decisionMaker(a::T1, state::T2)::Dict{Symbol, Any} where {T1<:agent, T2
|
||||
)
|
||||
|
||||
attempt = 0
|
||||
while attempt <= 5
|
||||
while true
|
||||
attempt += 1
|
||||
if attempt <= 5
|
||||
try
|
||||
response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg)
|
||||
_responseJsonStr = response[:response][:text]
|
||||
@@ -218,7 +219,7 @@ function decisionMaker(a::T1, state::T2)::Dict{Symbol, Any} where {T1<:agent, T2
|
||||
println("")
|
||||
end
|
||||
|
||||
if attempt > 5
|
||||
else
|
||||
error("DecisionMaker failed to generate a thought")
|
||||
end
|
||||
end
|
||||
@@ -315,8 +316,9 @@ function progressValueEstimator(a::T1, state::T2)::Tuple{String, Integer} where
|
||||
)
|
||||
|
||||
attempt = 0
|
||||
while attempt <= 5
|
||||
while true
|
||||
attempt += 1
|
||||
if attempt <= 5
|
||||
try
|
||||
response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg)
|
||||
_responseJsonStr = response[:response][:text]
|
||||
@@ -343,7 +345,7 @@ function progressValueEstimator(a::T1, state::T2)::Tuple{String, Integer} where
|
||||
println("")
|
||||
end
|
||||
|
||||
if attempt > 5
|
||||
else
|
||||
error("progressValueEstimator failed to generate an evaluation")
|
||||
end
|
||||
end
|
||||
@@ -451,8 +453,9 @@ function reflector(a::T1, state::T2)::String where {T1<:agent, T2<:AbstractDict}
|
||||
)
|
||||
|
||||
attempt = 0
|
||||
while attempt <= 5
|
||||
while true
|
||||
attempt += 1
|
||||
if attempt <= 5
|
||||
try
|
||||
response = GeneralUtils.sendReceiveMqttMsg(outgoingMsg)
|
||||
_responseJsonStr = response[:response][:text]
|
||||
@@ -478,7 +481,7 @@ function reflector(a::T1, state::T2)::String where {T1<:agent, T2<:AbstractDict}
|
||||
println("")
|
||||
end
|
||||
|
||||
if attempt > 5
|
||||
else
|
||||
error("reflector failed to generate a thought")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -164,8 +164,9 @@ function virtualWineCustomerChatbox(a::T1, input::T2
|
||||
)
|
||||
|
||||
attempt = 0
|
||||
while attempt <= 5
|
||||
while true
|
||||
attempt += 1
|
||||
if attempt <= 5
|
||||
try
|
||||
result = GeneralUtils.sendReceiveMqttMsg(outgoingMsg; timeout=120)
|
||||
response = result[:response]
|
||||
@@ -181,7 +182,7 @@ function virtualWineCustomerChatbox(a::T1, input::T2
|
||||
println("")
|
||||
end
|
||||
|
||||
if attempt > 5
|
||||
else
|
||||
error("virtualWineCustomerChatbox failed to get a response")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user