Interface StreamingPromptRunner.Streaming

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • withPrompt

         abstract StreamingPromptRunner.Streaming withPrompt(String prompt)

        Configure the streaming operation with a single prompt message.

        Parameters:
        prompt - The prompt text to send to the LLM
        Returns:

        StreamingPromptRunner.Streaming for method chaining

      • withMessages

         abstract StreamingPromptRunner.Streaming withMessages(List<Message> messages)

        Configure the streaming operation with a list of messages.

        Parameters:
        messages - The conversation messages to send to the LLM
        Returns:

        StreamingPromptRunner.Streaming for method chaining

      • createObjectStream

         abstract <T extends Any> Flux<T> createObjectStream(Class<T> itemClass)

        Create a reactive stream of objects of the specified type. Objects are emitted as they become available during LLM processing.

        Parameters:
        itemClass - The class of objects to create
        Returns:

        Flux emitting objects as they are parsed from the LLM response

      • createObjectStreamWithThinking

         abstract <T extends Any> Flux<StreamingEvent<T>> createObjectStreamWithThinking(Class<T> itemClass)

        Create a reactive stream with both objects and thinking content. Provides access to the LLM's reasoning process alongside the results.

        Parameters:
        itemClass - The class of objects to create
        Returns:

        Flux emitting StreamingEvent instances for objects and thinking

      • generateStream

         abstract Flux<String> generateStream()

        Generate a reactive stream of text chunks as they arrive from the LLM.

        Returns:

        Flux emitting text chunks as they arrive from the LLM