Package io.micronaut.langchain4j.tools
Class ToolRegistry
java.lang.Object
io.micronaut.langchain4j.tools.ToolRegistry
- All Implemented Interfaces:
io.micronaut.context.processor.AnnotationProcessor<dev.langchain4j.agent.tool.Tool,
,io.micronaut.inject.ExecutableMethod<?, ?>> io.micronaut.context.processor.ExecutableMethodProcessor<dev.langchain4j.agent.tool.Tool>
@Singleton
public class ToolRegistry
extends Object
implements io.micronaut.context.processor.ExecutableMethodProcessor<dev.langchain4j.agent.tool.Tool>
Register of tools.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet all available tools.getToolsTyped
(Set<?> toolTypes) Get tools for the given types.void
process
(io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?, ?> method)
-
Constructor Details
-
ToolRegistry
public ToolRegistry(io.micronaut.context.BeanContext beanContext)
-
-
Method Details
-
process
public void process(io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?, ?> method) - Specified by:
process
in interfaceio.micronaut.context.processor.AnnotationProcessor<dev.langchain4j.agent.tool.Tool,
io.micronaut.inject.ExecutableMethod<?, ?>> - Specified by:
process
in interfaceio.micronaut.context.processor.ExecutableMethodProcessor<dev.langchain4j.agent.tool.Tool>
-
getAllTools
Get all available tools.- Returns:
- The tools
-
getToolsTyped
Get tools for the given types.- Parameters:
toolTypes
- The tool types.- Returns:
- A list of types
-