OllamaStreamingGenerateResponseSpecification

class OllamaStreamingGenerateResponseSpecification(responseFlow: Flow<String>? = null, responseChunks: List<String>? = null, delayBetweenChunks: Duration = 0.1.seconds, delay: Duration = 0.seconds, var doneReason: String? = "stop") : AbstractStreamingResponseSpecification<GenerateRequest, String, String> (source)

Specification for configuring streaming generate completion responses.

This class is used to specify the content and behavior of streaming responses to generate completion requests. It allows specifying the response chunks, response flow, done reason, and delay between chunks.

Constructors

constructor(responseFlow: Flow<String>? = null, responseChunks: List<String>? = null, delayBetweenChunks: Duration = 0.1.seconds, delay: Duration = 0.seconds, doneReason: String? = "stop")

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The reason why the generation completed (e.g., "stop", "length")

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun chunks(chunks: List<String>)
open override fun chunks(vararg chunks: String)
Link copied to clipboard
open override fun delayMillis(value: Long)
Link copied to clipboard

Sets the reason for completion of the generation response.

Link copied to clipboard
open override fun stream(stream: Stream<String>)