Interface StreamingChatModelReply

  • All Implemented Interfaces:

    
    public interface StreamingChatModelReply
    
                        

    Represents 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.

    Author:

    Konstantin Pavlov

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public final class StreamingChatModelReply.PartialResponse

      Represents 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 class StreamingChatModelReply.CompleteResponse

      Represents 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 class StreamingChatModelReply.Error

      Represents 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.

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail