// Path: core/src/main/java/org/aimlang/core/bot/Bot.java
// public interface Bot extends Named {
//     String getRespond(String phrase);
// 
//     default void startChat(String userId, ChannelType channelType) {
//         setChatContext(getChatContextStorage().getContext(userId, channelType));
//         buildChat().start();
//     }
// 
//     Chat buildChat();
// 
//     ChatContextStorage getChatContextStorage();
// 
//     void setChatContext(ChatContext context);
// 
//     boolean wakeUp();
// }


import org.aimlang.core.bot.Bot;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import static org.aimlang.core.channels.ChannelType.CONSOLE;
    }

    public ConsoleChannel(Bot bot) {
        this.bot = bot;
        reader = new BufferedReader(new InputStreamReader(System.in));
    }

    @Override
    public Bot getBot() {
        return bot;
    }

    @Override
    public String read() {
        String textLine = null;
        try {
            textLine = reader.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return textLine;
    }

    @Override
    public void write(String message) {
        System.out.print(message);
    }

    @Override
    public ChannelType getType() {
// Path: core/src/main/java/org/aimlang/core/bot/Bot.java
// public interface Bot extends Named {
//     String getRespond(String phrase);
// 
//     default void startChat(String userId, ChannelType channelType) {
//         setChatContext(getChatContextStorage().getContext(userId, channelType));
//         buildChat().start();
//     }
// 
//     Chat buildChat();
// 
//     ChatContextStorage getChatContextStorage();
// 
//     void setChatContext(ChatContext context);
// 
//     boolean wakeUp();
// }


// Path: core/src/main/java/org/aimlang/core/channels/ConsoleChannel.java
import org.aimlang.core.bot.Bot;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import static org.aimlang.core.channels.ChannelType.CONSOLE;

    }

    public ConsoleChannel(Bot bot) {
        this.bot = bot;
        reader = new BufferedReader(new InputStreamReader(System.in));
    }

    @Override
    public Bot getBot() {
        return bot;
    }

    @Override
    public String read() {
        String textLine = null;
        try {
            textLine = reader.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return textLine;
    }

    @Override
    public void write(String message) {
        System.out.print(message);
    }

    @Override
    public ChannelType getType() {
        return CONSOLE;