Package 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 services.
This package contains the core Genai
contract and shared support types that allow the rest of the application to work
with provider implementations through a uniform API. Providers are responsible for
collecting prompts and instructions, optionally registering callable tools,
generating embeddings, executing model requests, reporting usage, and handling
provider-specific configuration.
Core types
Genaidefines the common lifecycle and operations for AI-backed interactions, including initialization, prompting, execution, tool registration, embedding generation, usage inspection, and session cleanup.GenaiAdapterprovides a reusable delegating implementation that forwards all operations to anotherGenaiinstance, making it suitable for adapter and decorator patterns.
Available provider packages
openai: OpenAI Responses API integration with support for prompts, tool calling, input logging, embeddings, and usage tracking.codemie: EPAM CodeMie integration that acquires OAuth 2.0 tokens and delegates requests to OpenAI-, Gemini-, or Claude-compatible providers based on the configured model family.gemini: Gemini provider integration scaffold that documents the intended Gemini-backed lifecycle and request model.none: No-op provider used when AI execution is disabled, offline, or limited to prompt logging and flow preservation.claude: Claude provider placeholder for future Anthropic-backed integration.
Usage model
Application code typically obtains a concrete implementation from provider management infrastructure, initializes it with configuration, assembles instructions and prompts, optionally configures tools or input logging, and then invokes the provider to obtain a response.
-
ClassDescriptionContract for a generative-AI provider integration.Delegating
Genaiimplementation.