Package org.machanism.machai.ai.provider.none
package org.machanism.machai.ai.provider.none
Provides a no-op
Genai implementation for offline, disabled, or test-only
execution paths.
This package contains NoneProvider, which satisfies the
Genai contract without invoking any external model backend. It is useful
when AI integration must be turned off while still preserving the surrounding application flow and prompt assembly
behavior.
The provider collects prompt content in memory, optionally persists configured instructions and prompt input to local files during execution, and reports zero usage because no remote or local model inference is performed.
Supported behavior
- Accumulates prompt text passed through
NoneProvider.prompt(String). - Optionally writes the prompt buffer to a configured log file through
NoneProvider.inputsLog(java.io.File)whenNoneProvider.perform()is invoked. - Optionally writes configured instructions to a sibling
instructions.txtfile. - Returns
nullfrom execution and zero-valued usage metrics.
Unsupported behavior
- Embedding generation via
NoneProvider.embedding(String, long). - Tool execution and working-directory configuration beyond interface compatibility no-ops.
Example
Genai provider = new NoneProvider();
provider.inputsLog(new File("./inputsLog/inputs.txt"));
provider.instructions("You are a helpful assistant.");
provider.prompt("Describe the weather.");
provider.perform();
-
Classes