Package uno.anahata.ai.gemini
package uno.anahata.ai.gemini
This package serves as the primary bridge between the application and the Google Gemini API.
It encapsulates all direct interactions with the
com.google.genai client library,
providing a clean abstraction layer that separates API-specific concerns from the core
application logic.
Key Components:
GeminiAPI: Manages the lifecycle of the Gemini client, including API key loading, key rotation, and client instantiation. It ensures that the application can securely and reliably connect to the Gemini service.GeminiAdapter: A sophisticated utility class responsible for translating data structures between the application's domain and the Gemini API's required format. Its most critical function is the dynamic generation ofSchemaobjects from Java types, which is the cornerstone of the automatic tool-to-function mapping. It also includes vital sanitization logic to enforce the presence of unique IDs on all tool calls returned by the model.
-
ClassesClassDescriptionA utility class for adapting Java types and objects to the Gemini API's data structures.Manages the connection to the Gemini API, including API key rotation and model selection.
