Copy to ClipboardCopied!Toggle word wrapToggle overflow
ChatBotLogic 是一种简单的 bean,它实施通用字符串到字符串的方法。
public class ChatBotLogic {
public String chatBotProcess(String message) {
if( "do-not-reply".equals(message) ) {
return null; // no response in the chat
}
return "echo from the bot: " + message; // echoes the message
}
}
public class ChatBotLogic {
public String chatBotProcess(String message) {
if( "do-not-reply".equals(message) ) {
return null; // no response in the chat
}
return "echo from the bot: " + message; // echoes the message
}
}
Copy to ClipboardCopied!Toggle word wrapToggle overflow