LlmService

Framework-agnostic LLM service abstraction, parallel to com.embabel.common.ai.model.EmbeddingService.

Implementations wrap specific LLM backends (Spring AI, direct API clients, etc.) and provide a consistent interface for creating message senders.

The type parameter THIS enables fluent builder-style methods that preserve the concrete type through method chaining.

Parameters

THIS

The concrete implementation type for fluent method chaining

See also

for the Spring AI implementation

for the interface used to make LLM calls

Inheritors

Functions

Link copied to clipboard
abstract fun createMessageSender(options: <Error class: unknown class>): LlmMessageSender

Create a message sender for this LLM configured with the given options.

Link copied to clipboard

Returns a copy of this LLM service with the specified knowledge cutoff date.

Link copied to clipboard
abstract fun withPromptContributor(promptContributor: <Error class: unknown class>): THIS

Returns a copy of this LLM service with an additional prompt contributor.