Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- abbreviate(String) - Method in class org.machanism.machai.ai.provider.ToolLogger
-
Abbreviates long log strings to keep logs concise and clean.
- AbstractAIProvider - Class in org.machanism.machai.ai.provider
-
Base implementation of the
Genaicontract shared by concrete provider integrations. - AbstractAIProvider() - Constructor for class org.machanism.machai.ai.provider.AbstractAIProvider
-
Creates a provider base instance.
- addMcpServer(String, String, String, String) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Registers one MCP server/tool with the underlying provider SDK.
- addMcpServer(String, String, String, String) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Registers an MCP server definition for future requests.
- addMcpServer(String, String, String, String) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Adds one or more MCP server tools from configuration.
- addMcpServers() - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Reads sequential MCP server configuration groups and registers them with the concrete provider implementation.
- addPrompt(String, String, ToolFunction, Role, ParamDescriptor...) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Registers a prompt callback for providers that support prompt tools.
- addPrompt(FunctionTools, Method, String, String, Role) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Configures and registers a single prompt method.
- addPrompts(FunctionTools) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Registers all annotated prompt methods from the given
FunctionToolsinstance. - addPrompts(FunctionTools) - Method in interface org.machanism.machai.ai.provider.Genai
-
Scans the provided
FunctionToolsinstance for methods annotated withPrompt, and registers each prompt for use during a run. - addPrompts(FunctionTools) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Scans the provided
FunctionToolsinstance for methods annotated withPrompt, and registers each prompt for use during a run. - addPrompts(FunctionTools) - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Does nothing; no prompt tools are registered.
- addResource(URI, String, String, ToolFunction, ParamDescriptor...) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Registers a resource callback for providers that support resource management tools.
- addResource(FunctionTools, Method, String[], String, String) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Resolves resource endpoints from declared arrays and binds them to the implementation context.
- addResources(FunctionTools) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Scans the provided
FunctionToolsinstance for methods annotated withResource, and registers each resource for use during a run. - addResources(FunctionTools) - Method in interface org.machanism.machai.ai.provider.Genai
-
Scans the provided
FunctionToolsinstance for methods annotated withResource, and registers each resource for use during a run. - addResources(FunctionTools) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Scans the provided
FunctionToolsinstance for methods annotated withResource, and registers each resource for use during a run. - addResources(FunctionTools) - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Does nothing; no resource tools are registered.
- addTool(String, String, ToolFunction, ParamDescriptor...) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Adds a tool to the provider.
- addTool(String, String, ToolFunction, ParamDescriptor...) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Registers a local function tool.
- addTool(String, String, ToolFunction, ParamDescriptor...) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Registers a function tool for the current provider instance.
- addTool(String, String, ToolFunction, ParamDescriptor...) - Method in class org.machanism.machai.ai.provider.impl.ToolsProvider
-
Registers a tool function with the provider.
- addTool(FunctionTools, Method, String, String) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Configures and registers a single tool method.
- addTools(FunctionTools) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Registers all annotated tool methods from the given
FunctionToolsinstance. - addTools(FunctionTools) - Method in interface org.machanism.machai.ai.provider.Genai
-
Registers a set of tool functions that may be invoked during a run.
- addTools(FunctionTools) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Registers a set of tool functions that may be invoked during a run.
- addTools(FunctionTools) - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Does nothing; no function tools are registered.
- addUsage(String, Usage) - Static method in class org.machanism.machai.ai.manager.UsageStatistics
-
Adds a single
Usagerecord for a specific model identifier. - addWebSearch() - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Registers a web-search capability when enabled in configuration.
- addWebSearch(String, String, String, String) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Registers a provider-specific web-search tool.
- addWebSearch(String, String, String, String) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Registers a web search tool and optional location hints.
- addWebSearch(String, String, String, String) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Adds the built-in OpenAI web search tool when configured.
- AI_CLIENT_CLASS_NAME_PATTERN - Static variable in class org.machanism.machai.ai.manager.GenaiProviderManager
- ANTHROPIC_API_KEY - Static variable in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Configuration property name that contains the Anthropic API key or authorization token.
- ANTHROPIC_BASE_URL - Static variable in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Configuration property that overrides the Anthropic API base URL.
- AnthropicProvider - Class in org.machanism.machai.ai.provider.impl
-
Anthropic-backed implementation of Machai's
Genaiabstraction. - AnthropicProvider() - Constructor for class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Creates an Anthropic provider instance.
- apply(JsonNode, Object...) - Method in interface org.machanism.machai.ai.tools.ToolFunction
-
Executes the tool with the given parameters and variable context instances.
- applyTools(Genai, Class<?>) - Method in class org.machanism.machai.ai.tools.FunctionToolsLoader
-
Applies all discovered
FunctionToolsinstallers to the given provider, filtered by application class compatibility. - ASSISTANT - Enum constant in enum org.machanism.machai.ai.tools.Role
-
Represents the AI assistant or provider.
- AUTH_URL - Static variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Default OpenID Connect token endpoint for CodeMie.
- AUTH_URL_PROP_NAME - Static variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Configuration key used to override the default token endpoint.
B
- BASE_URL - Static variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Base URL for the CodeMie Code Assistant API.
C
- call(MessageCreateParams) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
- call(ResponseCreateParams) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
- CALL_MSG - Static variable in class org.machanism.machai.ai.provider.ToolLogger
-
Format used when a tool is invoked.
- callFunction(BetaToolUseBlock) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
- callFunction(ResponseFunctionToolCall) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Executes a function tool call by finding a registered tool with the same name and delegating to its handler.
- captureUsage(BetaMessage) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Captures token usage and updates global usage statistics.
- captureUsage(Optional<ResponseUsage>) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Captures and records usage statistics from an optional
ResponseUsageinstance. - chatModel - Variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Active model identifier used in
Genai.perform(). - CLAUDE_COMPATIBLE_MODELS_PREFIXES - Static variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Model prefixes delegated to the Anthropic-compatible provider.
- ClaudeProviderExtension(String, String, String) - Constructor for class org.machanism.machai.ai.provider.impl.CodeMieProvider.ClaudeProviderExtension
-
Creates an Anthropic extension with the credentials used for token refresh.
- clear() - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Clears the provider state.
- clear() - Method in interface org.machanism.machai.ai.provider.Genai
-
Clears any stored files and session/provider state.
- clear() - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Clears any stored files and session/provider state.
- clear() - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Clears accumulated conversation inputs.
- clear() - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Clears the accumulated prompt buffer.
- clear() - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Clears all accumulated inputs for the next request.
- CodeMieProvider - Class in org.machanism.machai.ai.provider.impl
-
Genaiimplementation that integrates with EPAM CodeMie. - CodeMieProvider() - Constructor for class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Creates a CodeMie provider instance.
- CodeMieProvider.ClaudeProviderExtension - Class in org.machanism.machai.ai.provider.impl
-
Anthropic provider extension that refreshes the CodeMie access token.
- CodeMieProvider.OpenAIProviderExtension - Class in org.machanism.machai.ai.provider.impl
-
OpenAI provider extension that refreshes the CodeMie access token.
- config - Variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Configuration source used to initialize clients and provider features.
- convertToType(Parameter, String) - Static method in class org.machanism.machai.ai.provider.TypeConverter
-
Converts a string input to an object of the type specified by the given
Parameter. - createResponseBuilder(List<BetaMessageParam>) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
- createResponseBuilder(List<ResponseInputItem>) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Builds the request parameters for the OpenAI Responses API.
D
- DEFAULT_WEBSEARCH_TYPE_NAME - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Default web search type name.
- defaultValue - Variable in class org.machanism.machai.ai.tools.ParamDescriptor
- defaultValue() - Element in annotation type org.machanism.machai.ai.tools.Param
-
Optional default value for the parameter.
- description - Variable in class org.machanism.machai.ai.tools.ParamDescriptor
-
Description of the parameter's purpose or usage.
- description() - Element in annotation type org.machanism.machai.ai.tools.Param
-
Description of the parameter's purpose and usage.
- description() - Element in annotation type org.machanism.machai.ai.tools.Prompt
-
Description of the prompt's purpose and content.
- description() - Element in annotation type org.machanism.machai.ai.tools.Resource
-
Description of the resource's purpose, structure, or content.
- description() - Element in annotation type org.machanism.machai.ai.tools.Tool
-
Description of the tool's purpose and functionality.
E
- embedding(String, long) - Method in interface org.machanism.machai.ai.provider.EmbeddingProvider
-
Computes an embedding vector for the provided text.
- embedding(String, long) - Method in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Requests an embedding vector for the given input text.
- embedding(String, long) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Requests an embedding vector for the given input text.
- EmbeddingProvider - Interface in org.machanism.machai.ai.provider
-
EmbeddingProvider defines the contract for AI embedding providers.
- enabledTools - Variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
List of specific tool names that are enabled on this provider instance.
- ERROR_MSG - Static variable in class org.machanism.machai.ai.provider.ToolLogger
-
Format used when a tool invocation fails.
- ERROR_TOOL_RESULT_PREFIX - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Prefix prepended to tool invocation error messages that are returned back to the LLM.
- errorHandling - Variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Flag indicating if standard runtime exceptions should be wrapped or handled conversationally.
- ErrorResultException - Exception in org.machanism.machai.ai.tools
-
A runtime exception used to signal a tool or processing error, with a structured error payload that is serialized to JSON and included in the exception message.
- ErrorResultException(Object) - Constructor for exception org.machanism.machai.ai.tools.ErrorResultException
-
Creates a new exception with a message that is the JSON representation of the given object.
- ErrorResultException(Object, Exception) - Constructor for exception org.machanism.machai.ai.tools.ErrorResultException
-
Creates a new exception with a message that is the JSON representation of the given object, combined with additional error details from another exception.
- ErrorResultException(String) - Constructor for exception org.machanism.machai.ai.tools.ErrorResultException
-
Creates a new exception using the given string directly as the message, without JSON serialization.
- extractMessageText(ResponseOutputItem) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Extracts text content from a message output item.
- extractReasoningText(ResponseOutputItem) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Extracts reasoning text from a response output item when present.
F
- fillParamDesc(Method) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Analyzes method signature annotations to build an array of parameter descriptions.
- firstNonBlankReasoning(List<ResponseReasoningItem.Content>) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Returns the first non-blank reasoning fragment.
- functionTools - Variable in class org.machanism.machai.ai.tools.FunctionToolsLoader
-
List of discovered
FunctionToolsinstances, loaded from the classpath. - FunctionTools - Interface in org.machanism.machai.ai.tools
-
Service-provider interface (SPI) for installing host-provided function tools.
- FunctionToolsLoader - Class in org.machanism.machai.ai.tools
-
Discovers and applies
FunctionToolsimplementations using Java'sServiceLoadermechanism. - FunctionToolsLoader() - Constructor for class org.machanism.machai.ai.tools.FunctionToolsLoader
-
Constructs a new
FunctionToolsLoaderand discovers availableFunctionToolsimplementations usingServiceLoader.
G
- Genai - Interface in org.machanism.machai.ai.provider
-
Contract for a generative-AI provider integration.
- GenaiAdapter - Class in org.machanism.machai.ai.provider
-
Delegating
Genaiimplementation. - GenaiAdapter() - Constructor for class org.machanism.machai.ai.provider.GenaiAdapter
-
Creates an adapter without a delegate.
- GenaiProviderManager - Class in org.machanism.machai.ai.manager
-
Utility class for dynamically loading and initializing generative AI providers and embedding providers.
- GenaiProviderManager() - Constructor for class org.machanism.machai.ai.manager.GenaiProviderManager
-
Private constructor to prevent instantiation of this utility class.
- get(Class<?>) - Static method in class org.machanism.machai.ai.provider.TypeConverter
-
Returns the simplified type name for the given Java class.
- getAllModelUsages() - Static method in class org.machanism.machai.ai.manager.UsageStatistics
-
Returns the aggregated usage map for all models.
- getClient() - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Creates and configures an Anthropic client.
- getClient() - Method in class org.machanism.machai.ai.provider.impl.CodeMieProvider.ClaudeProviderExtension
-
Refreshes the access token and creates the configured Anthropic client.
- getClient() - Method in class org.machanism.machai.ai.provider.impl.CodeMieProvider.OpenAIProviderExtension
-
Refreshes the access token and creates the configured OpenAI client.
- getClient() - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Returns the underlying OpenAI client.
- getConfigurator() - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Returns the configurator context source.
- getDefaultValue() - Method in class org.machanism.machai.ai.tools.ParamDescriptor
- getDescription() - Method in class org.machanism.machai.ai.tools.ParamDescriptor
-
Returns a description of the parameter's purpose or usage.
- getEmbeddingProvider(String, Configurator) - Static method in class org.machanism.machai.ai.manager.GenaiProviderManager
-
Dynamically loads and initializes an
EmbeddingProviderbased on the specified provider/model string. - getEnabledTools() - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Returns the array of currently active tool names.
- getInputCachedTokens() - Method in class org.machanism.machai.ai.manager.Usage
-
Returns the number of cached input tokens reported by the provider.
- getInputTokens() - Method in class org.machanism.machai.ai.manager.Usage
-
Returns the number of input tokens consumed by the request.
- getName() - Method in class org.machanism.machai.ai.tools.ParamDescriptor
-
Returns the parameter's name.
- getOutputTokens() - Method in class org.machanism.machai.ai.manager.Usage
-
Returns the number of output tokens generated by the response.
- getParamByType(Class<T>, Object[]) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Filters parameter arrays to find the first assignment-compatible instance of the specified type.
- getParamValue(JsonNode, String, String) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Retrieves the value for a parameter from the given JSON node, or returns the default value if not present.
- getProjectDir() - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Returns the current project directory.
- getProvider(String, Configurator) - Static method in class org.machanism.machai.ai.manager.GenaiProviderManager
-
Dynamically loads and initializes a
Genaiprovider based on the specified provider/model string. - getTimeout() - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Returns the configured request timeout.
- getToken(String, String, String) - Static method in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Requests an OAuth 2.0 access token from the given token endpoint.
- getType() - Method in class org.machanism.machai.ai.tools.ParamDescriptor
-
Returns the parameter's data type.
- getUsageForModel(String) - Static method in class org.machanism.machai.ai.manager.UsageStatistics
-
Returns the aggregated usage entries for a specific model.
H
- handleFunctionCall(BetaToolUseBlock) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
- handleFunctionCall(ResponseFunctionToolCall) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Records a function call in the conversation, executes it, and appends the resulting function output item.
I
- init() - Static method in class org.machanism.machai.ai.manager.UsageStatistics
-
Initializes the usage statistics module.
- init(String, Configurator) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Initializes the provider from the given configuration.
- init(String, Configurator) - Method in interface org.machanism.machai.ai.provider.EmbeddingProvider
-
Initializes the provider with application configuration.
- init(String, Configurator) - Method in interface org.machanism.machai.ai.provider.Genai
-
Initializes the provider with application configuration.
- init(String, Configurator) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Initializes the provider with application configuration.
- init(String, Configurator) - Method in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Initializes the provider using configuration values.
- init(String, Configurator) - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Does nothing; the given model and configurator are discarded.
- inputCachedTokens - Variable in class org.machanism.machai.ai.manager.Usage
-
Number of cached input tokens reported by the provider.
- inputs - Variable in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Accumulated Anthropic message inputs for the current conversation.
- inputs - Variable in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Accumulated request input items for the current conversation.
- inputTokens - Variable in class org.machanism.machai.ai.manager.Usage
-
Number of input or prompt tokens consumed by the request.
- instructions - Variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Optional instructions applied to the request.
- instructions(String) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Sets system-level instructions applied to subsequent requests.
- instructions(String) - Method in interface org.machanism.machai.ai.provider.Genai
-
Sets system/session instructions for the current conversation.
- instructions(String) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Sets system/session instructions for the current conversation.
- instructions(String) - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Does nothing; the given instructions are discarded.
- interpolateDescription(String) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Interpolates system metadata variables (e.g., OS Name) inside the annotation's tool description text before registering it with the LLM.
- invoke(FunctionTools, Method, JsonNode, Object...) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Dynamically invokes the specified method on the given tools instance, matching arguments dynamically.
- isErrorHandling() - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Returns whether runtime tool errors are handled conversationally.
- isLoadable(String) - Static method in class org.machanism.machai.ai.manager.GenaiProviderManager
-
Checks whether the specified class name can be loaded.
- isRequired() - Method in class org.machanism.machai.ai.tools.ParamDescriptor
-
Indicates whether the parameter is required.
- isSupportedFor(Class<?>, Class<? extends FunctionTools>) - Method in class org.machanism.machai.ai.tools.FunctionToolsLoader
-
Checks whether the given
FunctionToolsimplementation supports assignment to the specified application class.
L
- LINE_SEPARATOR - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Line separator used when composing prompts.
- LOG_LINE_LENG - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Maximum length for log lines.
- logError(String, File, Throwable) - Method in class org.machanism.machai.ai.provider.ToolLogger
-
Logs errors that occurred during tool method execution.
- logger - Static variable in class org.machanism.machai.ai.manager.UsageStatistics
-
Logger used for reporting aggregated token usage.
- logger - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Logger instance for this provider.
- logger - Static variable in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Logger used for provider diagnostics and request lifecycle messages.
- logger - Static variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Logger used for authentication and provider-delegation diagnostics.
- logger - Static variable in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Logger used when diagnostic logging is enabled with the
logmodel. - logger - Static variable in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Logger instance for this provider.
- logger - Static variable in class org.machanism.machai.ai.provider.impl.ToolsProvider
-
Logger instance for this provider.
- logger - Static variable in class org.machanism.machai.ai.provider.ToolLogger
-
Logger used to write tool execution messages.
- logger - Static variable in class org.machanism.machai.ai.tools.FunctionToolsLoader
-
Logger for debug output during tool discovery and application.
- loggingOn - Variable in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Whether provider calls should be logged at INFO level.
- logInput(String, JsonNode, File) - Method in class org.machanism.machai.ai.provider.ToolLogger
-
Logs tool invocation input details.
- logResult(String, File, Object) - Method in class org.machanism.machai.ai.provider.ToolLogger
-
Logs tool invocation execution results.
- logUsage() - Static method in class org.machanism.machai.ai.manager.UsageStatistics
-
Logs usage summaries for every model currently present in the registry.
- logUsageForModel(String) - Static method in class org.machanism.machai.ai.manager.UsageStatistics
-
Logs a summary of the aggregated
Usagerecords for a specific model.
M
- MAX_OUTPUT_TOKENS - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Default maximum number of tokens the model may generate.
- maxOutputTokens - Variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Maximum number of output tokens for responses.
- maxToolCalls - Variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Maximum number of tool calls permitted per response.
- MCP_PROP_NAME_PREFIX - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Prefix for MCP property names.
- mcpServers - Variable in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
MCP server definitions forwarded to Anthropic with each request.
- message(Object, Exception) - Static method in exception org.machanism.machai.ai.tools.ErrorResultException
-
Constructs a detailed error message by combining the provided message object and exception details.
- mimeType() - Element in annotation type org.machanism.machai.ai.tools.Resource
-
The MIME type of the resource content.
- modelUsages - Static variable in class org.machanism.machai.ai.manager.UsageStatistics
-
In-memory registry of usage entries grouped by model identifier.
N
- name - Variable in class org.machanism.machai.ai.tools.ParamDescriptor
-
The parameter's name.
- name() - Element in annotation type org.machanism.machai.ai.tools.Param
-
Optional parameter name.
- name() - Element in annotation type org.machanism.machai.ai.tools.Prompt
-
Optional prompt name.
- name() - Element in annotation type org.machanism.machai.ai.tools.Tool
-
Optional tool name.
- NoneProvider - Class in org.machanism.machai.ai.provider.impl
-
No-op implementation of
Genaithat performs no AI processing. - NoneProvider() - Constructor for class org.machanism.machai.ai.provider.impl.NoneProvider
- normalize(String) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Normalizes a string for case-insensitive comparisons.
- NOT_DEFINED - Static variable in annotation type org.machanism.machai.ai.tools.Param
-
Placeholder value indicating that the parameter name or default value is not defined.
- NOT_DEFINED - Static variable in annotation type org.machanism.machai.ai.tools.Prompt
-
Placeholder value indicating that the prompt name is not defined.
- NOT_DEFINED - Static variable in annotation type org.machanism.machai.ai.tools.Resource
-
Placeholder value indicating that a property is not defined.
- NOT_DEFINED - Static variable in annotation type org.machanism.machai.ai.tools.Tool
-
Placeholder value indicating that the tool name is not defined.
- NULL - Static variable in annotation type org.machanism.machai.ai.tools.Param
-
Placeholder value indicating a null parameter value.
O
- OPENAI_API_KEY - Static variable in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Configuration/environment key used by OpenAI-compatible clients to provide the API key.
- OPENAI_BASE_URL_NAME - Static variable in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Configuration/environment key used to override the OpenAI-compatible base URL.
- OPENAI_COMPATIBLE_MODELS_PREFIXES - Static variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
Model prefixes delegated to the OpenAI-compatible provider.
- OpenAIProvider - Class in org.machanism.machai.ai.provider.impl
-
OpenAI-backed
Genaiimplementation. - OpenAIProvider() - Constructor for class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Creates an OpenAI provider instance.
- OpenAIProviderExtension(String, String, String) - Constructor for class org.machanism.machai.ai.provider.impl.CodeMieProvider.OpenAIProviderExtension
-
Creates an OpenAI extension with the credentials used for token refresh.
- org.machanism.machai.ai.manager - package org.machanism.machai.ai.manager
-
Coordinates provider construction and token-usage collection for the application's generative-AI integrations.
- org.machanism.machai.ai.provider - package org.machanism.machai.ai.provider
-
Defines the provider abstraction layer used by Machai to integrate with concrete generative AI platforms through a consistent application-facing API.
- org.machanism.machai.ai.provider.impl - package org.machanism.machai.ai.provider.impl
-
Provides concrete implementations of the Machai generative AI provider abstraction.
- org.machanism.machai.ai.tools - package org.machanism.machai.ai.tools
-
Contracts and runtime metadata for exposing Java capabilities as AI tools, prompts, and resources.
- outputTokens - Variable in class org.machanism.machai.ai.manager.Usage
-
Number of output or completion tokens produced by the request.
P
- PARAGRAPH_SEPARATOR - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Paragraph separator used when composing prompts.
- Param - Annotation Type in org.machanism.machai.ai.tools
- ParamDescriptor - Class in org.machanism.machai.ai.tools
-
Descriptor for a parameter used in tool or prompt definitions within the AI provider framework.
- ParamDescriptor(String, String, boolean, String, Object) - Constructor for class org.machanism.machai.ai.tools.ParamDescriptor
-
Constructs a new
ParamDescriptorwith the specified properties. - parseResponse(BetaMessage) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
- parseResponse(Response) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Parses the given response and handles function tool calls.
- password - Variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider.ClaudeProviderExtension
-
Password or client secret supplied to the token endpoint.
- password - Variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider.OpenAIProviderExtension
-
Password or client secret supplied to the token endpoint.
- PASSWORD_PROP_NAME - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Environment variable name for authenticating with the GenAI provider.
- perform() - Method in interface org.machanism.machai.ai.provider.Genai
-
Executes the provider to produce a response based on the accumulated prompts and state.
- perform() - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Executes the provider to produce a response based on the accumulated prompts and state.
- perform() - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Sends the accumulated conversation and returns the final text response.
- perform() - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Performs no AI processing.
- perform() - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Executes a request using the currently configured model, inputs, and tools.
- perform() - Method in class org.machanism.machai.ai.provider.impl.ToolsProvider
-
Executes the provider's perform logic.
- primitiveTypeMapping(Class<?>) - Static method in class org.machanism.machai.ai.provider.TypeConverter
-
Maps a primitive Java
Classtype to its equivalent Object wrapper class representation. - PROJECT_DIR_PARAM_NAME - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Name of the project directory parameter.
- projectDir - Variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Working directory passed to tool handlers as contextual information.
- prompt(String) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Sets the prompt text for the provider.
- prompt(String) - Method in interface org.machanism.machai.ai.provider.Genai
-
Adds a user prompt to the current session.
- prompt(String) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Adds a user prompt to the current session.
- prompt(String) - Method in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Adds a non-blank user prompt.
- prompt(String) - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Does nothing; the given prompt text is discarded.
- prompt(String) - Method in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Adds a text prompt to the current request input.
- prompt(String) - Method in class org.machanism.machai.ai.provider.impl.ToolsProvider
-
Adds a prompt text to the provider's prompt list.
- Prompt - Annotation Type in org.machanism.machai.ai.tools
-
Annotation to mark a method as a prompt within the AI provider framework.
- PROMPT - Enum constant in enum org.machanism.machai.ai.provider.ToolLogger.Type
-
Indicates the logged operation is related to prompt template processing or construction.
- prompts - Variable in class org.machanism.machai.ai.provider.impl.ToolsProvider
-
List of collected prompt texts.
- provider - Variable in class org.machanism.machai.ai.provider.GenaiAdapter
-
Delegate provider.
R
- required - Variable in class org.machanism.machai.ai.tools.ParamDescriptor
-
Indicates whether the parameter is required.
- resolveClassName(String) - Static method in class org.machanism.machai.ai.manager.GenaiProviderManager
-
Resolves the provider class name based on the provider name and a conventional naming pattern.
- resolvedAuthUrl - Variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider.ClaudeProviderExtension
-
Token endpoint used to obtain the access token.
- resolvedAuthUrl - Variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider.OpenAIProviderExtension
-
Token endpoint used to obtain the access token.
- Resource - Annotation Type in org.machanism.machai.ai.tools
-
Annotation used to declare a method as an executable resource provider within the generative-AI tools system.
- RESOURCE - Enum constant in enum org.machanism.machai.ai.provider.ToolLogger.Type
-
Indicates the logged operation involves accessing or processing an external resource.
- RETURNS_MSG - Static variable in class org.machanism.machai.ai.provider.ToolLogger
-
Format used when a tool returns a result.
- role() - Element in annotation type org.machanism.machai.ai.tools.Prompt
-
The participant role associated with the prompt.
- Role - Enum in org.machanism.machai.ai.tools
-
Enumeration representing participant roles in an AI interaction context.
- Role() - Constructor for enum org.machanism.machai.ai.tools.Role
S
- safelyInvokeTool(String, ToolFunction, JsonNode, File) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Safely invokes a tool function and converts
IOExceptions into a textual error payload suitable for the model conversation. - serialVersionUID - Static variable in exception org.machanism.machai.ai.tools.ErrorResultException
- serialVersionUID - Static variable in exception org.machanism.machai.ai.tools.SpecialException
- SESSION_ID_PARAM_NAME - Static variable in interface org.machanism.machai.ai.tools.ToolFunction
-
Standard parameter name for session identification in tool requests.
- setDefaultValue(Object) - Method in class org.machanism.machai.ai.tools.ParamDescriptor
- setEnabledTools(String[]) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Configures the list of tool names that are enabled and allowed to be used by the AI provider.
- setEnabledTools(String[]) - Method in interface org.machanism.machai.ai.provider.Genai
-
Configures the list of tool names that are enabled and allowed to be used by the AI provider.
- setEnabledTools(String[]) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Configures the list of tool names that are enabled and allowed to be used by the AI provider.
- setEnabledTools(String[]) - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Does nothing; the given enabled-tools list is discarded.
- setErrorHandling(boolean) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Configures how runtime tool errors are handled by the invocation logic.
- setErrorHandling(boolean) - Method in interface org.machanism.machai.ai.provider.Genai
-
Configures whether tool invocation errors should be returned to the model for conversational recovery or propagated as exceptions.
- setErrorHandling(boolean) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Configures whether tool invocation errors should be returned to the model for conversational recovery or propagated as exceptions.
- setErrorHandling(boolean) - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Does nothing; the given error-handling flag is discarded.
- setProjectDir(File) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Sets the project directory.
- setProjectDir(File) - Method in interface org.machanism.machai.ai.provider.Genai
-
Sets the working directory for the provider, which may be used by tool handlers.
- setProjectDir(File) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Sets the working directory for the provider, which may be used by tool handlers.
- setProjectDir(File) - Method in class org.machanism.machai.ai.provider.impl.NoneProvider
-
Does nothing; the given project directory is discarded.
- setProvider(Genai) - Method in class org.machanism.machai.ai.provider.GenaiAdapter
-
Sets the delegate provider.
- setTimeout(long, OpenAIProvider) - Method in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Sets the timeout value used by provider client creation.
- SpecialException - Exception in org.machanism.machai.ai.tools
-
Exception used to signal the end of a task without terminating the application.
- SpecialException(Exception) - Constructor for exception org.machanism.machai.ai.tools.SpecialException
-
Constructs a new
SpecialExceptionthat wraps another exception. - SpecialException(String) - Constructor for exception org.machanism.machai.ai.tools.SpecialException
-
Constructs a new
EndTaskExceptionwith the specified detail message. - SupportedFor - Annotation Type in org.machanism.machai.ai.tools
-
Indicates which application classes a
FunctionToolsimplementation supports.
T
- timeoutSec - Variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Request timeout in seconds;
0means SDK defaults are used. - Tool - Annotation Type in org.machanism.machai.ai.tools
-
Annotation to mark a method as a tool function within the AI provider framework.
- TOOL - Enum constant in enum org.machanism.machai.ai.provider.ToolLogger.Type
-
Indicates the logged operation represents the execution of an AI function tool.
- ToolFunction - Interface in org.machanism.machai.ai.tools
-
Functional interface representing a tool callable by a provider during a run.
- ToolLogger - Class in org.machanism.machai.ai.provider
-
Internal logging utility for tool inputs, results, and execution errors.
- ToolLogger(ToolLogger.Type, FunctionTools) - Constructor for class org.machanism.machai.ai.provider.ToolLogger
-
Creates an instance of ToolLogger.
- ToolLogger.Type - Enum in org.machanism.machai.ai.provider
-
Defines the types of operations whose activity can be logged.
- toolMap - Variable in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Mapping between Anthropic tool definitions and local functions.
- toolMap - Variable in class org.machanism.machai.ai.provider.impl.OpenAIProvider
-
Maps tools to handler functions.
- toolMap - Variable in class org.machanism.machai.ai.provider.impl.ToolsProvider
-
Map of registered tool functions by tool name.
- ToolsProvider - Class in org.machanism.machai.ai.provider.impl
-
AI provider implementation for managing and invoking host-defined function tools.
- ToolsProvider() - Constructor for class org.machanism.machai.ai.provider.impl.ToolsProvider
-
Constructs a new
ToolsProviderwith a default configuration. - type - Variable in class org.machanism.machai.ai.provider.ToolLogger
-
Category assigned to messages emitted by this logger.
- type - Variable in class org.machanism.machai.ai.tools.ParamDescriptor
-
The parameter's data type.
- Type() - Constructor for enum org.machanism.machai.ai.provider.ToolLogger.Type
- TypeConverter - Class in org.machanism.machai.ai.provider
-
Utility class for converting between Java types and their string representations, as well as mapping Java types to simplified type names (e.g., "string", "integer", "array").
- TypeConverter() - Constructor for class org.machanism.machai.ai.provider.TypeConverter
-
Creates a type converter utility instance.
- typeMap - Static variable in class org.machanism.machai.ai.provider.TypeConverter
-
Immutable mapping from Java classes to simplified type names.
U
- uri() - Element in annotation type org.machanism.machai.ai.tools.Resource
-
One or more unique URIs associated with this resource.
- urlEncode(String) - Static method in class org.machanism.machai.ai.provider.impl.CodeMieProvider
-
URL-encodes a value for
application/x-www-form-urlencodedrequest bodies. - Usage - Class in org.machanism.machai.ai.manager
-
Immutable token-usage metrics for a single generative AI interaction.
- Usage(long, long, long) - Constructor for class org.machanism.machai.ai.manager.Usage
-
Creates a usage record.
- UsageStatistics - Class in org.machanism.machai.ai.manager
-
Central registry for aggregated GenAI token-usage statistics.
- UsageStatistics() - Constructor for class org.machanism.machai.ai.manager.UsageStatistics
-
Private constructor to prevent instantiation of this usage statistics utility class.
- USER - Enum constant in enum org.machanism.machai.ai.tools.Role
-
Represents the end user or client.
- username - Variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider.ClaudeProviderExtension
-
User name supplied to the CodeMie token endpoint.
- username - Variable in class org.machanism.machai.ai.provider.impl.CodeMieProvider.OpenAIProviderExtension
-
User name supplied to the CodeMie token endpoint.
- USERNAME_PROP_NAME - Static variable in class org.machanism.machai.ai.provider.AbstractAIProvider
-
Environment variable name for authenticating with the GenAI provider.
V
- value() - Element in annotation type org.machanism.machai.ai.tools.SupportedFor
-
The set of application classes for which the annotated
FunctionToolsimplementation is compatible. - valueOf(String) - Static method in enum org.machanism.machai.ai.provider.ToolLogger.Type
-
Returns the enum constant of this type with the specified name.
- valueOf(String) - Static method in enum org.machanism.machai.ai.tools.Role
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum org.machanism.machai.ai.provider.ToolLogger.Type
-
Returns an array containing the constants of this enum type, in the order they are declared.
- values() - Static method in enum org.machanism.machai.ai.tools.Role
-
Returns an array containing the constants of this enum type, in the order they are declared.
W
- webSearchTool - Variable in class org.machanism.machai.ai.provider.impl.AnthropicProvider
-
Anthropic web search tool instance registered for outgoing requests, or
null. - writeValueAsString(Object) - Method in class org.machanism.machai.ai.provider.ToolLogger
-
Utility method that safely serializes any payload object into a JSON string format.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form