From 913e56366013bf6841ee46b26b6951c42f8956f0 Mon Sep 17 00:00:00 2001 From: tonaerospace Date: Thu, 2 Nov 2023 14:23:39 +0000 Subject: [PATCH] typepo --- src/interface.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/interface.jl b/src/interface.jl index e3e2f55..68e2c10 100755 --- a/src/interface.jl +++ b/src/interface.jl @@ -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