package com.yutou.qqbot.data.baidu;

import lombok.Data;

@Data
public class Message {
    private String role = "user";
    private String content;

    public Message() {
    }


    public boolean checkIsUser() {
        return "user".equals(role);
    }

    public static Message create(String message) {
        return create(message, false);
    }

    public static Message create(String message, boolean isGTP) {
        Message msg = new Message();
        msg.content = message;
        msg.role = isGTP ? "assistant" : "user";
        return msg;
    }
}
