Package org.machanism.machai.ai
The package groups the application-facing components that allow Machai to communicate with generative AI services without binding callers directly to a specific vendor SDK. Higher-level code can resolve and configure providers, submit prompts or instructions, register callable tools, request embeddings, and inspect usage statistics through stable contracts.
Package responsibilities
org.machanism.machai.ai.providerdefines the common provider API for text generation, embeddings, tool-aware execution, request logging, configuration, and provider delegation.org.machanism.machai.ai.provider.implcontains concrete provider integrations for supported model backends, including OpenAI-compatible, Anthropic Claude, CodeMie, and tool-focused provider workflows.org.machanism.machai.ai.managercoordinates provider selection, model resolution, and token or request usage tracking across generation operations.org.machanism.machai.ai.toolsdefines annotations, descriptors, roles, prompt metadata, and loader utilities used to expose Java methods as model-callable function tools.
Typical usage
Clients generally obtain a configured generative AI provider through the manager layer, enrich it with prompts, instructions, optional file context, and annotated tools, then invoke the provider API to execute a generation or embedding request. The shared abstractions in this package keep those workflows consistent across supported backend providers while preserving access to usage information for accounting, diagnostics, and optimization.