Class LLMStreamingGenerator<T,State extends AgentState>
java.lang.Object
org.bsc.async.AsyncGenerator.Base<E>
org.bsc.async.AsyncGenerator.BaseCancellable<E>
org.bsc.async.AsyncGenerator.WithResult<StreamingOutput<State>>
org.bsc.langgraph4j.langchain4j.generators.LLMStreamingGenerator<T,State>
- Type Parameters:
T- the type of the data being processedState- the type of the state extending AgentState
- All Implemented Interfaces:
AutoCloseable,Iterable<StreamingOutput<State>>,org.bsc.async.AsyncGenerator<StreamingOutput<State>>,org.bsc.async.AsyncGenerator.Cancellable<StreamingOutput<State>>,org.bsc.async.AsyncGenerator.HasResultValue,org.bsc.async.AsyncGenerator.IsCancellable
@Deprecated(forRemoval=true)
public class LLMStreamingGenerator<T,State extends AgentState>
extends org.bsc.async.AsyncGenerator.WithResult<StreamingOutput<State>>
Deprecated, for removal: This API element is subject to removal in a future version.
LLMStreamingGenerator is a class that extends AsyncGenerator to handle streaming outputs
for a given type T and state that extends AgentState.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classLLMStreamingGenerator.Builder<T,State extends AgentState> Deprecated, for removal: This API element is subject to removal in a future version.Builder class for constructing instances of LLMStreamingGenerator.Nested classes/interfaces inherited from interface org.bsc.async.AsyncGenerator
org.bsc.async.AsyncGenerator.Base<E extends Object>, org.bsc.async.AsyncGenerator.BaseCancellable<E extends Object>, org.bsc.async.AsyncGenerator.Cancellable<E extends Object>, 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.IsCancellable, 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
delegateFields inherited from interface org.bsc.async.AsyncGenerator.IsCancellable
CANCELLED -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,State extends AgentState>
LLMStreamingGenerator.Builder<T,State> builder()Deprecated, for removal: This API element is subject to removal in a future version.Creates a new Builder instance for LLMStreamingGenerator.dev.langchain4j.model.StreamingResponseHandler<T>handler()Deprecated, for removal: This API element is subject to removal in a future version.Returns the StreamingResponseHandler associated with this generator.Methods inherited from class org.bsc.async.AsyncGenerator.WithResult
cancel, delegate, executor, next, resultValueMethods inherited from class org.bsc.async.AsyncGenerator.BaseCancellable
isCancelledMethods inherited from class org.bsc.async.AsyncGenerator.Base
close, isClosedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bsc.async.AsyncGenerator
flatMap, forEachAsync, iterator, map, reduce, reduceAsync, stream, toCompletableFuture, toCompletableFutureAsyncMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
builder
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new Builder instance for LLMStreamingGenerator.- Type Parameters:
T- the type of the data being processedState- the type of the state extending AgentState- Returns:
- a new Builder instance
-
handler
Deprecated, for removal: This API element is subject to removal in a future version.Returns the StreamingResponseHandler associated with this generator.- Returns:
- the handler for streaming responses
-
StreamingChatGeneratorinstead