All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dingtalk.baymax.framework.sdk.mercury.prompt.StringPromptValue Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.dingtalk.baymax.framework.sdk.mercury.prompt;

import com.dingtalk.baymax.framework.sdk.mercury.domain.BaseMessage;
import com.dingtalk.baymax.framework.sdk.mercury.domain.HumanMessage;

import java.util.Arrays;
import java.util.List;

public class StringPromptValue extends PromptValue {

    private String text;

    @Override
    public String toString() {
        return text;
    }

    @Override
    public List toMessages() {
        HumanMessage humanMessage = new HumanMessage();
        humanMessage.setContent(text);
        return Arrays.asList(new BaseMessage[] { humanMessage }) ;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy