if (FALSE) {
# Simple streaming with default output
goose_stream("Explain R functions")
# Custom callback for processing chunks
goose_stream("Write a function", callback = function(chunk) {
message("Received: ", nchar(chunk), " characters")
cat(chunk)
})
}
Run the code above in your browser using DataLab