import { llmFromSettingsOrContext } from "../Settings.js";
import { LLMMultiSelector, LLMSingleSelector } from "./llmSelectors.js";
export const getSelectorFromContext = (serviceContext, isMulti = false)=>{
    let selector = null;
    const llm = llmFromSettingsOrContext(serviceContext);
    if (isMulti) {
        selector = new LLMMultiSelector({
            llm
        });
    } else {
        selector = new LLMSingleSelector({
            llm
        });
    }
    if (selector === null) {
        throw new Error("Selector is null");
    }
    return selector;
};
