Package org.machanism.machai.bindex
Class BindexCreator
java.lang.Object
org.machanism.machai.project.ProjectProcessor
org.machanism.machai.bindex.BindexProjectProcessor
org.machanism.machai.bindex.BindexCreator
BindexCreator is responsible for generating and updating Bindex
representation files for the supplied project layout using a GenAIProvider.
Usage example:
BindexCreator creator = new BindexCreator(provider, true); creator.processFolder(layout);This class can update or create Bindex documents based on the model provided by the builder and the current contents in the project directory.
- Since:
- 0.0.2
- Author:
- Viktor Tovstyi
- See Also:
-
Field Summary
Fields inherited from class org.machanism.machai.bindex.BindexProjectProcessor
BINDEX_FILE_NAMEFields inherited from class org.machanism.machai.project.ProjectProcessor
MACHAI_TEMP_DIR -
Constructor Summary
ConstructorsConstructorDescriptionBindexCreator(org.machanism.machai.ai.manager.GenAIProvider provider) Constructs a BindexCreator with the specified GenAIProvider and LLM invocation setting. -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessFolder(ProjectLayout projectLayout) Processes the specified project layout folder to create/update the Bindex file.update(boolean update) Toggles the update mode for Bindex creation, enabling file updates if set to true.Methods inherited from class org.machanism.machai.bindex.BindexProjectProcessor
getBindex, getBindexFileMethods inherited from class org.machanism.machai.project.ProjectProcessor
getProjectLayout, processModule, scanFolder
-
Constructor Details
-
BindexCreator
public BindexCreator(org.machanism.machai.ai.manager.GenAIProvider provider) Constructs a BindexCreator with the specified GenAIProvider and LLM invocation setting.- Parameters:
provider- GenAIProvider used for generating Bindex datacallLLM- Indicates if LLM should be involved in the process
-
-
Method Details
-
processFolder
Processes the specified project layout folder to create/update the Bindex file.- Specified by:
processFolderin classProjectProcessor- Parameters:
projectLayout- The project layout to be processed for indexing- Throws:
IllegalArgumentException- If any IO errors occur during processing- See Also:
-
update
Toggles the update mode for Bindex creation, enabling file updates if set to true.- Parameters:
update- true to update existing Bindex files, false otherwise- Returns:
- This BindexCreator instance for chained calls
-