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

com.dingtalk.baymax.framework.sdk.mercury.agent.BaseSingleActionAgent Maven / Gradle / Ivy

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

import com.alibaba.fastjson.annotation.JSONField;
import com.dingtalk.baymax.framework.sdk.mercury.chain.Chain;
import com.dingtalk.baymax.framework.sdk.mercury.domain.BaseModel;

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

/**
 * 代理基类
 *
 * @author xiaoxuan.lp
 */
public abstract class BaseSingleActionAgent extends BaseModel {

    /**
     * 返回输入key
     *
     * @return
     */
    public abstract  List getInputKeys();

    /**
     * 代理的返回值
     *
     * @return
     */
    public List returnValues() {
        return Arrays.asList(new String[] { "output" });
    }

    public List getAllowedTools() {
        return null;
    }

    /**
     * 给定输入来决定做什么
     *
     * @param intermediateSteps 中间结果
     * @param inputs
     * @return
     */
    public abstract Object plan(List intermediateSteps, Map inputs);

    @JSONField(serialize = false, deserialize=false)
    public abstract Chain getChain();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy