Class HandlerWithoutInvocation

java.lang.Object
dev.langchain4j.internal.HandlerWithoutInvocation
All Implemented Interfaces:
StreamingChatResponseHandler

public final class HandlerWithoutInvocation extends Object implements StreamingChatResponseHandler
Wraps the handler an AI Service passes to its streaming chat model, so that the handler runs without the current invocation, also when the model calls it on the thread of the call, during the call. The handler calls code of the caller (for example the handlers of a TokenStream), which is not part of the work of the invocation.