com.dingtalk.baymax.framework.sdk.mercury.prompt.StringPromptValue Maven / Gradle / Ivy
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;
}
}