streamOpenAIFileContent

Streams the content of a file from the OpenAI Files API as a Flow of byte arrays.

Return

A Flow emitting chunks of the file content.

Parameters

fileId

The ID of the file.

Samples

// To stream file content use streamOpenAIFileContent() function.
client.streamOpenAIFileContent("file_id").collect { bytesChunk ->
    println(bytesChunk.contentToString())
}