add return chat
This commit is contained in:
@@ -209,7 +209,10 @@ function conversation(a::agent, usermsg::String)
|
||||
#WORKING 1) add if-else user intention logic. 2) add recursive thinking
|
||||
if userIntent == "chat"
|
||||
generatePrompt_tokenPrefix(a, userToken="Q:", assistantToken="A:")
|
||||
result = sendReceivePrompt(a, usermsg)
|
||||
addNewMessage(a, "assistant", result)
|
||||
|
||||
return result
|
||||
elseif userIntent == "task"
|
||||
|
||||
else
|
||||
@@ -322,7 +325,7 @@ function sendReceivePrompt(a::agent, prompt::String; timeout::Int=10)
|
||||
)
|
||||
payloadChannel = Channel(1)
|
||||
|
||||
#WORKING send prompt
|
||||
# send prompt
|
||||
CommUtils.request(a.mqttClient, msg)
|
||||
starttime = Dates.now()
|
||||
result = nothing
|
||||
|
||||
Reference in New Issue
Block a user