JuliaML / OpenAI.jl

OpenAI API wrapper for Julia
https://juliaml.github.io/OpenAI.jl/dev/
MIT License
94 stars 19 forks source link

Move streaming to StreamCallbacks.jl #65

Open svilupp opened 1 month ago

svilupp commented 1 month ago

I would like to propose moving streaming functionality to a separate package (made by me): https://github.com/svilupp/StreamCallbacks.jl

Why?

Downsides

I've been using it in PromptingTools.jl for a few releases already and it seems to work well.

svilupp commented 1 week ago

Bump here.

Is there any interest in refactoring the functionality with a new dep? The current implementation is not correct and will lead to more errors.

cpfiffer commented 1 week ago

I would say it's probably better to separate them out -- I'd be happy to see StreamingCallbacks.jl implemented here. As to this point:

By default, it builds the standard Response afterwards (to allow standard downstream functionality as well), which might be wasteful for some users/workflows (but the cost and time are sooo tiny compared to the generation time)

Not a concern on my end, if anything that strikes me as pretty ergonomic.

roryl23 commented 2 days ago

If the current implementation is not correct and will lead to errors, I say full steam ahead.