Package net.thevpc.naru.impl.registry
Class NaruRegistryImpl
java.lang.Object
net.thevpc.naru.impl.registry.NaruRegistryImpl
- All Implemented Interfaces:
NaruRegistry
Registry of all tools available to the agent.
Tools are kept in insertion order so the model always sees them in a deterministic sequence.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeclareMode(NaruPromptMode mode) Dispatch a tool call by name and return its string result.dispatch(NaruToolCall toolCall, NaruTask context) Dispatch a tool call by name and return its string result.voiddispatchSlash(String name, String argument, NaruTask task) net.thevpc.nuts.util.NOptional<NaruDirective>findDirective(String name) net.thevpc.nuts.util.NOptional<NaruModelKey>findModel(String keyOrName, NaruSession session) net.thevpc.nuts.util.NOptional<NaruTool>booleanisEmpty()net.thevpc.nuts.util.NOptional<NaruPromptMode>net.thevpc.nuts.util.NOptional<NaruPromptMode>mode(NaruStandardMode mode) modelsInfos(NaruSession session) modelsKeys(NaruSession session) modes()net.thevpc.nuts.util.NOptional<NaruModelProtocol>protocol(NaruModelConfig model, NaruSession session) net.thevpc.nuts.util.NOptional<NaruModelProvider>registerDirectiveProvider(NaruDirectiveProvider directiveProvider) registerModelProvider(NaruModelProvider provider) registerToolset(NaruToolset toolset) tools()
-
Constructor Details
-
NaruRegistryImpl
-
-
Method Details
-
modes
- Specified by:
modesin interfaceNaruRegistry
-
modeNames
- Specified by:
modeNamesin interfaceNaruRegistry
-
modeNamesAndAliases
- Specified by:
modeNamesAndAliasesin interfaceNaruRegistry
-
declareMode
- Specified by:
declareModein interfaceNaruRegistry
-
mode
- Specified by:
modein interfaceNaruRegistry
-
mode
- Specified by:
modein interfaceNaruRegistry
-
registerDirectiveProvider
- Specified by:
registerDirectiveProviderin interfaceNaruRegistry
-
registerToolsetProvider
- Specified by:
registerToolsetProviderin interfaceNaruRegistry
-
registerToolset
-
findTool
- Specified by:
findToolin interfaceNaruRegistry
-
tools
- Specified by:
toolsin interfaceNaruRegistry
-
directives
- Specified by:
directivesin interfaceNaruRegistry
-
registerModelProvider
- Specified by:
registerModelProviderin interfaceNaruRegistry
-
modelProviders
- Specified by:
modelProvidersin interfaceNaruRegistry
-
modelsInfos
- Specified by:
modelsInfosin interfaceNaruRegistry
-
modelsKeys
- Specified by:
modelsKeysin interfaceNaruRegistry
-
provider
- Specified by:
providerin interfaceNaruRegistry
-
protocol
public net.thevpc.nuts.util.NOptional<NaruModelProtocol> protocol(NaruModelConfig model, NaruSession session) - Specified by:
protocolin interfaceNaruRegistry
-
findModel
public net.thevpc.nuts.util.NOptional<NaruModelKey> findModel(String keyOrName, NaruSession session) - Specified by:
findModelin interfaceNaruRegistry
-
dispatch
Dispatch a tool call by name and return its string result.- Specified by:
dispatchin interfaceNaruRegistry- Throws:
IllegalArgumentException- if the tool name is unknown
-
findDirective
- Specified by:
findDirectivein interfaceNaruRegistry
-
dispatchSlash
- Specified by:
dispatchSlashin interfaceNaruRegistry
-
dispatch
Dispatch a tool call by name and return its string result.- Specified by:
dispatchin interfaceNaruRegistry- Throws:
IllegalArgumentException- if the tool name is unknown
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceNaruRegistry
-
toolNames
- Specified by:
toolNamesin interfaceNaruRegistry
-
registerDefaults
-