SpringAiLLMClient

constructor(chatModel: ChatModel, provider: LLMProvider, clock: Clock, dispatcher: CoroutineDispatcher, chatOptionsCustomizer: ChatOptionsCustomizer, moderationModel: ModerationModel?)(source)

Parameters

chatModel

the Spring AI chat model to delegate to

provider

the LLMProvider to report for this client

clock

the clock used for creating response metadata timestamps

dispatcher

the CoroutineDispatcher used for blocking model calls

chatOptionsCustomizer

optional customizer for provider-specific ChatOptions tuning

moderationModel

optional Spring AI ModerationModel for content moderation; if null, moderate throws UnsupportedOperationException