package tech.easyflow.ai.rag;

import com.easyagents.rag.retrieval.RetrievalMode;

import java.math.BigInteger;

public class KnowledgeRetrievalRequest {

    private BigInteger knowledgeId;
    private String query;
    private Integer limit;
    private Double minSimilarity;
    private RetrievalMode retrievalMode = RetrievalMode.HYBRID;
    private String callerType;
    private String callerId;

    public BigInteger getKnowledgeId() {
        return knowledgeId;
    }

    public void setKnowledgeId(BigInteger knowledgeId) {
        this.knowledgeId = knowledgeId;
    }

    public String getQuery() {
        return query;
    }

    public void setQuery(String query) {
        this.query = query;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    /**
     * 返回检索时使用的最小相似度阈值。
     *
     * @return 最小相似度阈值
     */
    public Double getMinSimilarity() {
        return minSimilarity;
    }

    /**
     * 设置检索时使用的最小相似度阈值。
     *
     * @param minSimilarity 最小相似度阈值
     */
    public void setMinSimilarity(Double minSimilarity) {
        this.minSimilarity = minSimilarity;
    }

    public RetrievalMode getRetrievalMode() {
        return retrievalMode;
    }

    public void setRetrievalMode(RetrievalMode retrievalMode) {
        this.retrievalMode = retrievalMode == null ? RetrievalMode.HYBRID : retrievalMode;
    }

    public String getCallerType() {
        return callerType;
    }

    public void setCallerType(String callerType) {
        this.callerType = callerType;
    }

    public String getCallerId() {
        return callerId;
    }

    public void setCallerId(String callerId) {
        this.callerId = callerId;
    }
}
