StreamingOptions

org.llm4s.llmconnect.streaming.StreamingOptions
See theStreamingOptions companion object
case class StreamingOptions(onStart: () => Unit, onChunk: StreamedChunk => Unit, onError: LLMError => Unit, onComplete: Completion => Unit, bufferSize: Int, connectionTimeout: Long, readTimeout: Long)

Options for streaming completions with callbacks for different events. Provides a more flexible alternative to the simple onChunk callback.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withOnChunk(handler: StreamedChunk => Unit): StreamingOptions

Create a copy with a different onChunk handler

Create a copy with a different onChunk handler

Attributes

def withOnComplete(handler: Completion => Unit): StreamingOptions

Create a copy with a different onComplete handler

Create a copy with a different onComplete handler

Attributes

def withOnError(handler: LLMError => Unit): StreamingOptions

Create a copy with a different onError handler

Create a copy with a different onError handler

Attributes

def withOnStart(handler: () => Unit): StreamingOptions

Create a copy with a different onStart handler

Create a copy with a different onStart handler

Attributes

def withTimeouts(connection: Long, read: Long): StreamingOptions

Create a copy with different timeout settings

Create a copy with different timeout settings

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product