Interface IToolProvider

All Superinterfaces:
IParametersProvider

public interface IToolProvider extends IParametersProvider
Interface for tool providers used in the context of a language model configuration Tool providers are responsible for executing specific tools and returning results
  • Method Details

    • initialize

      void initialize(IContext userContext, IAssistant assistant, Properties parameters, IToolConfiguration toolConfiguration)
      Initialize the tool provider with the given context, assistant, parameters and tool configuration
      Parameters:
      userContext - context of the user
      assistant - assistant instance
      parameters - parameters for the tool provider
      toolConfiguration - configuration of the tool
    • schema

      IToolSchema schema(String language)
      Get the tool configuration schema : list of parameters to be retrieved by AI to trigger tool
      Parameters:
      language - language to be used in schema description
      Returns:
      ToolConfiguration object
    • execute

      String execute(Object memoryId, Map<String,Object> arguments)
      Execute the tool with the given parameters
      Parameters:
      memoryId - id of chat memory
      arguments - arguments retrieved from the schema by AI
      Returns:
      result of the tool execution