Class GeminiProvider

java.lang.Object
ai.doctruth.GeminiProvider
All Implemented Interfaces:
LlmProvider

public non-sealed class GeminiProvider extends Object implements LlmProvider
Google Gemini generateContent provider. Per ADR 0003 the vendor SDK is NOT on the classpath; this class is a thin facade that delegates to a hand-rolled GeminiHttpClient (JDK HttpClient + Jackson + Failsafe via RetryGate).

non-sealed so test code (and advanced users) can anonymously subclass to supply canned responses or wrap behaviour.

Since:
0.1.0
  • Constructor Details

    • GeminiProvider

      public GeminiProvider(String apiKey)
      Production constructor — talks to generativelanguage.googleapis.com.
    • GeminiProvider

      public GeminiProvider(String apiKey, URI endpoint, String model)
      Test / advanced-user constructor: point at an alternative base URL (e.g. WireMock) or pin a specific model id.
      Parameters:
      apiKey - Gemini API key; non-null and non-blank.
      endpoint - base URL for the API (the client appends /v1beta/models/{model}:generateContent); non-null.
      model - Gemini model id; non-null and non-blank.
  • Method Details