This commit is contained in:
narawat lamaiin
2024-04-27 08:35:35 +07:00
parent aacae344c2
commit 4a41b0feb4
5 changed files with 121 additions and 123 deletions

View File

@@ -20,16 +20,19 @@ msgMeta = GeneralUtils.generate_msgMeta(
)
agentConfig = Dict(
:receiveprompt=>Dict(
:mqtttopic=> config[:servicetopic][:value], # topic to receive prompt i.e. frontend send msg to this topic
),
:receiveinternal=>Dict(
:mqtttopic=> instanceInternalTopic, # receive topic for model's internal
),
:text2text=>Dict(
:mqtttopic=> config[:text2text][:value],
),
)
:mqttServerInfo=> Dict(
:broker=> config[:mqttServerInfo][:value][:broker],
:port=> config[:mqttServerInfo][:value][:port],
),
:receivemsg=> Dict(
:prompt=> config[:servicetopic][:value], # topic to receive prompt i.e. frontend send msg to this topic
:internal=> instanceInternalTopic,
),
:externalService=> Dict(
:text2textinstruct=> config[:externalService][:text2textinstruct][:value],
:text2textchat=> config[:externalService][:text2textchat][:value],
),
)
# Instantiate an agent
tools=Dict( # update input format
@@ -56,7 +59,6 @@ tools=Dict( # update input format
a = YiemAgent.sommelier(
receiveUserMsgChannel,
receiveInternalMsgChannel,
msgMeta,
agentConfig,
name= "assistant",
id= "randomSessionID", # agent instance id