Class ProjectContextFunctionTools

java.lang.Object
org.machanism.machai.gw.tools.ProjectContextFunctionTools
All Implemented Interfaces:
FunctionTools

public class ProjectContextFunctionTools extends Object implements FunctionTools
  • Constructor Details

    • ProjectContextFunctionTools

      public ProjectContextFunctionTools()
  • Method Details

    • applyTools

      public void applyTools(Genai provider)
      Specified by:
      applyTools in interface FunctionTools
    • putProjectContextVariable

      public Object putProjectContextVariable(com.fasterxml.jackson.databind.JsonNode props, File workingDir)
      Sets a variable in the act context.
      Parameters:
      params - The first argument is expected to be a JsonNode containing 'name' and 'value' properties.
      Returns:
      A confirmation message or error.
    • getProjectContextVariable

      public Object getProjectContextVariable(com.fasterxml.jackson.databind.JsonNode props, File workingDir)
      Retrieves the value of a variable from the project-specific context.
      Parameters:
      params - The first argument is expected to be a JsonNode containing 'name' property. The second argument is a File representing the project directory.
      Returns:
      The value of the context variable, or a message if not found.
    • pushProjectContextVariable

      public Object pushProjectContextVariable(com.fasterxml.jackson.databind.JsonNode props, File workingDir)
    • popProjectContextVariable

      public Object popProjectContextVariable(com.fasterxml.jackson.databind.JsonNode props, File workingDir)