Package-level declarations
Types
Link copied to clipboard
class LangChain4jChatModel(model: ChatModel, streamingModel: StreamingChatModel? = null) : ChatModel
A ChatModel that calls any LangChain4j chat model, so an agent built with toolAgent or toolLoop works with every provider LangChain4j supports.
Functions
Link copied to clipboard
fun <State> chatMessagesNode(model: ChatModel, messages: suspend (State) -> List<ChatMessage>, update: suspend (State, ChatResponse) -> State): NodeAction<State>
Creates a NodeAction that sends a whole conversation (system, user, AI and tool messages) built from the current state to model. The node gets the full ChatResponse, so it can handle tool execution requests.
Link copied to clipboard
Sends a single user message to this ChatModel and returns the model's text reply.
Sends a conversation to this ChatModel and returns the full ChatResponse (AI message, tool execution requests, token usage). Like the single-message overload, it runs on Dispatchers.IO.