• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • AndroidPlatformLLMClient
  • AndroidPlatformLLMClient Class

    LLMClient implementation backed by Android's on-device Gemini Nano via the ML Kit GenAI Prompt API. More...

    Header: #include <AndroidPlatformLLMClient>
    Since: 1.0
    Inherits: LLMClient

    Detailed Description

    On Android targets this routes chat requests through a Java bridge (org.octomy.llm.AndroidGenAIBridge) that wraps the ML Kit GenAI Prompt API. The bridge dispatches token / completion / error events back through JNI native methods, which this class marshals to its owner thread and emits as standard LLMClient signals.

    On non-Android targets the client compiles as a no-op stub: isAvailable() returns false and chat()/streamChat() emit an error so that the registry can still surface the provider in the UI without breaking desktop builds.

    See also LLMClient and LLMManager.