package tech.easyflow.ai.rag;

import com.easyagents.rag.retrieval.RetrievalMode;
import tech.easyflow.common.web.exceptions.BusinessException;

public final class KnowledgeRetrievalModes {

    private KnowledgeRetrievalModes() {
    }

    public static RetrievalMode parse(String value) {
        try {
            return RetrievalMode.from(value);
        } catch (IllegalArgumentException e) {
            throw new BusinessException("不支持的检索方式: " + value);
        }
    }
}
