Class NaruCustomProvider
java.lang.Object
net.thevpc.naru.api.model.AbstractNaruModelProvider
net.thevpc.naru.ext.models.custom.NaruCustomProvider
- All Implemented Interfaces:
NaruModelProvider,net.thevpc.nuts.spi.NComponent
Generic OpenAI-compatible provider driven entirely by configuration.
Lets users point NARU at any OpenAI-compatible endpoint
(LM Studio, vLLM, llama.cpp server, LiteLLM proxy, ...) with zero code.
Configuration (per named endpoint):
custom.endpoints=<name1>,<name2>,... custom.endpoints.<name>.url=https://my-server/v1 custom.endpoints.<name>.apiKey=sk-... custom.endpoints.<name>.models=model-a,model-b custom.endpoints.<name>.chatPath=chat/completions (optional) custom.endpoints.<name>.contextLength=32768 (optional)
Models are addressed as custom/<endpoint>/<model>.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindModelIds(NaruSession session) net.thevpc.nuts.util.NOptional<NaruModelProtocol>getProtocol(NaruModelConfig model, NaruSession session) Methods inherited from class net.thevpc.naru.api.model.AbstractNaruModelProvider
apiKey, defaultEnvKey, getParam, getParamNames, getSecureParam, isEnabled, name, onParamChanged, setEnabled, setParamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.thevpc.naru.api.model.NaruModelProvider
installModel, isSupportedInstallModel, isSupportedPsModel, isSupportedUninstallModel, isSupportedUnloadModel, psModel, uninstallModel, unloadModel
-
Constructor Details
-
NaruCustomProvider
public NaruCustomProvider()
-
-
Method Details
-
getProtocol
public net.thevpc.nuts.util.NOptional<NaruModelProtocol> getProtocol(NaruModelConfig model, NaruSession session) -
findModelIds
-