Builder

A Java-friendly builder for SpringAiLLMClient.

The only required property is chatModel; all others have sensible defaults.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Builds a new SpringAiLLMClient instance.

Link copied to clipboard
fun chatModel(chatModel: ChatModel): SpringAiLLMClient.Builder

Sets the Spring AI ChatModel to delegate to. Required.

Link copied to clipboard

Sets the customizer for provider-specific ChatOptions tuning. Default is ChatOptionsCustomizer.NOOP.

Link copied to clipboard

Sets the clock used for creating response metadata timestamps. Default is kotlin.time.Clock.System.

Link copied to clipboard

Sets the CoroutineDispatcher used for blocking model calls. Default is Dispatchers.IO.

Link copied to clipboard
fun moderationModel(moderationModel: ModerationModel?): SpringAiLLMClient.Builder

Sets the optional Spring AI ModerationModel for content moderation. Default is null.

Link copied to clipboard

Sets the LLMProvider to report for this client. Default is SpringAiLLMProvider.