LangChainClient

class LangChainClient(languageModel: LangChainConfig, clientBuilder: (LangChainConfig, ChatCompletionSettings?) -> ChatLanguageModel, eventHandler: EventPublisher? = null) : ChatCompleter

Wraps a LangChain4j ChatLanguageModel to provide a ChatCompleter interface.

Constructors

Link copied to clipboard
constructor(languageModel: LangChainConfig, clientBuilder: (LangChainConfig, ChatCompletionSettings?) -> ChatLanguageModel, eventHandler: EventPublisher? = null)

Functions

Link copied to clipboard
open suspend override fun complete(messages: List<ConversationMessage>, functions: List<LLMFunction>?, settings: ChatCompletionSettings?): Result<AssistantMessage, ArcException>