Class NaruModelProtocolTypes

java.lang.Object
net.thevpc.naru.ext.models.NaruModelProtocolTypes

public final class NaruModelProtocolTypes extends Object
Registry of wire-protocol types available to config-driven providers.

Built-in types: openapi (OpenAI-compatible), anthropic (Anthropic Messages API) and gemini (native Google generateContent). Additional types can be registered programmatically via register(NaruModelProtocolType) before the custom provider is used; there is no need to add a provider Java class.

  • Field Details

    • OPENAPI

      public static final String OPENAPI
      See Also:
    • ANTHROPIC

      public static final String ANTHROPIC
      See Also:
    • GEMINI

      public static final String GEMINI
      Google's first-class generateContent API, as opposed to the OpenAI-compatible route. Needed for CachedContent resource caching, which the compatibility layer does not expose.
      See Also:
  • Method Details

    • register

      public static void register(NaruModelProtocolType type)
    • defaultType

      public static NaruModelProtocolType defaultType()
    • of

      public static net.thevpc.nuts.util.NOptional<NaruModelProtocolType> of(String type)
      Resolves a protocol type by its id (openapi, anthropic, gemini, ...). Case-insensitive; unknown ids return an empty optional.
    • names

      public static Set<String> names()