coro icon indicating copy to clipboard operation
coro copied to clipboard

Allow `generator` to take any function

Open hadley opened this issue 1 year ago • 0 comments

Mostly because it's useful to do this:

openai_chat_stream <- function(...) {...}

.onLoad <- function(...) {
  openai_chat_stream <<- coro::generator(openai_chat_stream)
}

Commit that made this an error: https://github.com/r-lib/coro/commit/c3791eb41e3a1ac5f951daef9f8a11ac02ed8f30

hadley avatar Sep 19 '24 12:09 hadley