Class StreamingChatGenerator<State extends AgentState>
java.lang.Object
org.bsc.async.AsyncGenerator.WithResult<StreamingOutput<State>>
org.bsc.langgraph4j.langchain4j.generators.StreamingChatGenerator<State>
- All Implemented Interfaces:
Iterable<StreamingOutput<State>>,org.bsc.async.AsyncGenerator<StreamingOutput<State>>,org.bsc.async.AsyncGenerator.HasResultValue,org.bsc.async.AsyncGeneratorOperators<StreamingOutput<State>>
public class StreamingChatGenerator<State extends AgentState>
extends org.bsc.async.AsyncGenerator.WithResult<StreamingOutput<State>>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class for constructing instances of LLMStreamingGenerator.Nested classes/interfaces inherited from interface org.bsc.async.AsyncGenerator
org.bsc.async.AsyncGenerator.Data<E extends Object>, org.bsc.async.AsyncGenerator.Embed<E extends Object>, org.bsc.async.AsyncGenerator.EmbedCompletionHandler, org.bsc.async.AsyncGenerator.HasResultValue, org.bsc.async.AsyncGenerator.WithEmbed<E extends Object>, org.bsc.async.AsyncGenerator.WithResult<E extends Object> -
Field Summary
Fields inherited from class org.bsc.async.AsyncGenerator.WithResult
delegate -
Method Summary
Modifier and TypeMethodDescriptionstatic <State extends AgentState>
StreamingChatGenerator.Builder<State>builder()Creates a new Builder instance for LLMStreamingGenerator.dev.langchain4j.model.chat.response.StreamingChatResponseHandlerhandler()Returns the StreamingResponseHandler associated with this generator.Methods inherited from class org.bsc.async.AsyncGenerator.WithResult
delegate, next, resultValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bsc.async.AsyncGenerator
async, iterator, stream, toCompletableFutureMethods inherited from interface org.bsc.async.AsyncGeneratorOperators
collectAsync, executor, filter, flatMap, forEachAsync, mapMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
builder
Creates a new Builder instance for LLMStreamingGenerator.- Type Parameters:
State- the type of the state extending AgentState- Returns:
- a new Builder instance
-
handler
public dev.langchain4j.model.chat.response.StreamingChatResponseHandler handler()Returns the StreamingResponseHandler associated with this generator.- Returns:
- the handler for streaming responses
-