Learn R Programming

openaiRtools (version 0.2.2)

StreamIterator: Stream Iterator Class

Description

R6 class for iterating over streaming response chunks.

Arguments

Methods


Method new()

Usage

StreamIterator$new(chunks)


Method next_chunk()

Usage

StreamIterator$next_chunk()


Method has_more()

Usage

StreamIterator$has_more()


Method reset()

Usage

StreamIterator$reset()


Method as_list()

Usage

StreamIterator$as_list()


Method get_full_text()

Usage

StreamIterator$get_full_text()


Method clone()

The objects of this class are cloneable with this method.

Usage

StreamIterator$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.