Skip to content

Commit

Permalink
Added a no-topic DialogAgentMessage constructor (#299)
Browse files Browse the repository at this point in the history
jastier authored May 1, 2022
1 parent 5b10014 commit 7951dbe
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/scala/org/clulab/asist/messages/DialogAgentMessage.scala
Original file line number Diff line number Diff line change
@@ -80,6 +80,22 @@ object DialogAgentMessage {
version = BuildInfo.version
)

/** build without topic
* @param header A CommonHeader object
* @param msg A CommonMsg object
* @param data A DialogAgentMessageData object
*/
def apply(
header: CommonHeader, // required
msg: CommonMsg, // required
data: DialogAgentMessageData // required
): DialogAgentMessage = DialogAgentMessage(
topic = "N/A",
header,
msg,
data
)

/** build from Minecraft chat object
* @param source_type Source of message data
* @param source_name topic or filename

0 comments on commit 7951dbe

Please sign in to comment.