package com.easyagents.rag.retrieval;

public enum RetrievalMode {
    VECTOR,
    KEYWORD,
    HYBRID;

    public static RetrievalMode from(String value) {
        if (value == null || value.trim().isEmpty()) {
            return HYBRID;
        }
        for (RetrievalMode mode : values()) {
            if (mode.name().equalsIgnoreCase(value.trim())) {
                return mode;
            }
        }
        throw new IllegalArgumentException("Unsupported retrieval mode: " + value);
    }
}
