Package org.machanism.machai.gw.tools
Class ProjectContextFunctionTools
java.lang.Object
org.machanism.machai.gw.tools.ProjectContextFunctionTools
- All Implemented Interfaces:
FunctionTools
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTools(Genai provider) getProjectContextVariable(com.fasterxml.jackson.databind.JsonNode props, File workingDir) Retrieves the value of a variable from the project-specific context.popProjectContextVariable(com.fasterxml.jackson.databind.JsonNode props, File workingDir) pushProjectContextVariable(com.fasterxml.jackson.databind.JsonNode props, File workingDir) putProjectContextVariable(com.fasterxml.jackson.databind.JsonNode props, File workingDir) Sets a variable in the act context.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.machanism.machai.ai.tools.FunctionTools
setConfigurator
-
Constructor Details
-
ProjectContextFunctionTools
public ProjectContextFunctionTools()
-
-
Method Details
-
applyTools
- Specified by:
applyToolsin interfaceFunctionTools
-
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
-
popProjectContextVariable
-