Interface StreamingChatModel

All Superinterfaces:
StreamingModel<Prompt,ChatResponse>
All Known Subinterfaces:
ChatModel
All Known Implementing Classes:
AnthropicChatModel, AzureOpenAiChatModel, BedrockAi21Jurassic2ChatModel, BedrockAnthropic3ChatModel, BedrockAnthropicChatModel, BedrockCohereChatModel, BedrockLlamaChatModel, BedrockTitanChatModel, HuggingfaceChatModel, MiniMaxChatModel, MistralAiChatModel, MoonshotChatModel, OllamaChatModel, OpenAiChatModel, QianFanChatModel, VertexAiGeminiChatModel, VertexAiPaLm2ChatModel, WatsonxAiChatModel, ZhiPuAiChatModel
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface StreamingChatModel extends StreamingModel<Prompt,ChatResponse>
  • Method Summary

    Modifier and Type
    Method
    Description
    default reactor.core.publisher.Flux<String>
    stream(String message)
     
    default reactor.core.publisher.Flux<String>
    stream(Message... messages)
     
    reactor.core.publisher.Flux<ChatResponse>
    stream(Prompt prompt)
    Executes a method call to the AI model.
  • Method Details

    • stream

      default reactor.core.publisher.Flux<String> stream(String message)
    • stream

      default reactor.core.publisher.Flux<String> stream(Message... messages)
    • stream

      reactor.core.publisher.Flux<ChatResponse> stream(Prompt prompt)
      Description copied from interface: StreamingModel
      Executes a method call to the AI model.
      Specified by:
      stream in interface StreamingModel<Prompt,ChatResponse>
      Parameters:
      prompt - the request object to be sent to the AI model
      Returns:
      the streaming response from the AI model