Llm4sProviderModule

org.llm4s.llmconnect.spi.Llm4sProviderModule

A unit of provider registration: everything one module contributes.

The discovered unit is a module rather than a single ProviderDescriptor so that one artifact can supply several related providers — llm4s-openai contributes OpenAI, Azure, OpenRouter and Requesty from a single entry.

Implementations must be a plain class with a public no-arg constructor, '''not''' a Scala object: java.util.ServiceLoader instantiates the named class, and an object exposes its instance as a MODULE$ field instead. Delegate to an object from the class if you want one:

class MyProviderModule extends Llm4sProviderModule:
 def chatProviders: Seq[ProviderDescriptor] = Seq(MyProvider)

Classpath discovery via META-INF/services arrives with PR 3 of #1131; until then a module is registered explicitly through ProviderRegistry.of or ProviderRegistry.withModule.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Concrete methods

The chat providers this module supplies.

The chat providers this module supplies.

Attributes