Package net.thevpc.naru.ext.models
Interface NaruModelProtocolType
public interface NaruModelProtocolType
Factory that builds a
NaruModelProtocol for a given wire-protocol type
(currently openapi and anthropic).
This is the extension hook for config-driven providers (custom.*
endpoints): registering a new NaruModelProtocolType makes it usable via
custom.endpoints.<name>.type=<type> with zero new Java provider classes.
-
Method Summary
Modifier and TypeMethodDescriptioncreate(NaruModelProvider provider, NaruModelConfig model, String configPrefix, String chatPath, NaruModelCapabilities capabilities, String defaultBaseUrl) name()Protocol type id, e.g.
-
Method Details
-
name
String name()Protocol type id, e.g.openapioranthropic. -
create
NaruModelProtocol create(NaruModelProvider provider, NaruModelConfig model, String configPrefix, String chatPath, NaruModelCapabilities capabilities, String defaultBaseUrl) - Parameters:
provider- the provider owning the protocolmodel- the wire model config (real model name)configPrefix- env prefix used to read settings (e.g.custom.endpoints.foo)chatPath- relative chat endpoint path (e.g.v1/chat/completions)capabilities- resolved capabilitiesdefaultBaseUrl- fallback base url when<configPrefix>.urlis not set
-