Class ServiceRegistryAgentToolCallbackCreator
java.lang.Object
com.flowable.platform.service.agent.ServiceRegistryAgentToolCallbackCreator
- All Implemented Interfaces:
AgentToolCallbackCreator
public class ServiceRegistryAgentToolCallbackCreator
extends Object
implements AgentToolCallbackCreator
- Author:
- Filip Hrisafov
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServiceRegistryAgentToolCallbackCreator(ServiceRegistryEngineConfiguration serviceRegistryEngineConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionCollection<org.springframework.ai.tool.ToolCallback> createToolCallbacks(String definitionKey, String parentDeploymentId, String tenantId, Collection<AgentDefinitionModel.Tool> tools) Creates a collection of tool callbacks based on the provided definition key and tools.protected org.springframework.ai.tool.definition.ToolDefinitioncreateToolDefinition(String definitionKey, AgentDefinitionModel.Tool tool, String operationKey, ServiceDefinitionModel model, ServiceOperation operation, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
Field Details
-
serviceRegistryEngineConfiguration
-
-
Constructor Details
-
ServiceRegistryAgentToolCallbackCreator
public ServiceRegistryAgentToolCallbackCreator(ServiceRegistryEngineConfiguration serviceRegistryEngineConfiguration)
-
-
Method Details
-
getDefinitionType
- Specified by:
getDefinitionTypein interfaceAgentToolCallbackCreator- Returns:
- The type of the definition that the creator is responsible for
-
createToolCallbacks
public Collection<org.springframework.ai.tool.ToolCallback> createToolCallbacks(String definitionKey, String parentDeploymentId, String tenantId, Collection<AgentDefinitionModel.Tool> tools) Description copied from interface:AgentToolCallbackCreatorCreates a collection of tool callbacks based on the provided definition key and tools. All the tools belong to the same definition.- Specified by:
createToolCallbacksin interfaceAgentToolCallbackCreator- Parameters:
definitionKey- the key identifying the definition for which the callbacks should be createdparentDeploymentId- the parent deployment id of the definition, if applicabletenantId- the tenant id of the definitiontools- a collection of tools to be processed for creating the callbacks- Returns:
- a collection of tool callbacks created from the provided tools
-
createToolDefinition
protected org.springframework.ai.tool.definition.ToolDefinition createToolDefinition(String definitionKey, AgentDefinitionModel.Tool tool, String operationKey, ServiceDefinitionModel model, ServiceOperation operation, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-