Interface ResponseStream

All Superinterfaces:
AutoCloseable, Closeable, Iterator<Response>

@Experimental public interface ResponseStream extends Iterator<Response>, Closeable
A stream of response fragments. The implementation of this class may use Closeable.close() to properly closes any resources related to the AI request. The usage of this Keep in mind to close this response stream appropriately after usage.
Since:
5.2.240708
  • Method Details

    • stream

      @NotNull default @NotNull Stream<Response> stream()
      Creates a Stream for this iterator instance.
      Returns:
      The new stream.
      Since:
      5.2.240708