typepo
This commit is contained in:
@@ -277,14 +277,14 @@ function identifyUserIntention(a::agent, usermsg::String)
|
||||
payloadChannel = Channel(1)
|
||||
|
||||
# send prompt
|
||||
CommUtils.request(a.mqttClient, msg, pubtopic=a.mqttClient.pubtopic.llmAIgpu)
|
||||
CommUtils.request(a.mqttClient, msg, pubtopic=a.mqttClient.pubtopic.llmAI)
|
||||
starttime = Dates.now()
|
||||
timeout = 10
|
||||
result = nothing
|
||||
|
||||
while true
|
||||
timepass = (Dates.now() - starttime).value / 1000.0
|
||||
CommUtils.mqttRun(mqttclient, payloadChannel)
|
||||
CommUtils.mqttRun(a.mqttClient, payloadChannel)#BUG no msg received
|
||||
if isready(payloadChannel)
|
||||
topic, payload = take!(payloadChannel)
|
||||
if payload[:msgMeta][:repondToMsgId] == msgPrompt[:msgMeta][:msgId]
|
||||
@@ -300,9 +300,8 @@ function identifyUserIntention(a::agent, usermsg::String)
|
||||
error("undefined condition $(@__LINE__)")
|
||||
end
|
||||
end
|
||||
|
||||
answer = getStringBetweenCharacters(result, "{", "}")
|
||||
|
||||
answer = result === nothing ? nothing : getStringBetweenCharacters(result, "{", "}")
|
||||
@show answer
|
||||
return answer
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user