Interface StreamingChatModelReply
-
- All Implemented Interfaces:
public interface StreamingChatModelReplyRepresents different types of replies that can be received from an AI language model during streaming. This sealed interface provides type-safe handling of both intermediate tokens and final completion responses.
Konstantin Pavlov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classStreamingChatModelReply.PartialResponseRepresents a partial response received from an AI language model during a streaming interaction.
This data class is used to encapsulate an intermediate token that the model generates as part of its streaming output. Partial responses are often used in scenarios where the model's output is produced incrementally, enabling real-time updates to the user or downstream processes.
public final classStreamingChatModelReply.CompleteResponseRepresents a final completion response received from the AI language model during the streaming chat process.
This data class encapsulates the complete response, which typically contains the final output of a model's reply in the context of a conversation.
public final classStreamingChatModelReply.ErrorRepresents an error that occurred during the streaming process when generating a reply from the AI language model. This type of reply is used to indicate a failure in the operation and provides details about the cause of the error.
-