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 Details

  • Constructor Details

  • Method Details

    • getDefinitionType

      public String getDefinitionType()
      Specified by:
      getDefinitionType in interface AgentToolCallbackCreator
      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: AgentToolCallbackCreator
      Creates a collection of tool callbacks based on the provided definition key and tools. All the tools belong to the same definition.
      Specified by:
      createToolCallbacks in interface AgentToolCallbackCreator
      Parameters:
      definitionKey - the key identifying the definition for which the callbacks should be created
      parentDeploymentId - the parent deployment id of the definition, if applicable
      tenantId - the tenant id of the definition
      tools - 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)