Skip to content

Move streaming to StreamCallbacks.jl #65

@svilupp

Description

@svilupp

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

Why?

  • provides an implementation that can be shared across other providers (Anthropic, OpenAI, etc)
  • Implements more of the SSE "standard" (eg, includes event names, does proper splitting, catches message overflow between "masterchunks", etc)
  • Allows easy extensibility for users (to choose the sink, logging, etc.)

Downsides

  • Opinionated
  • Extra-dependency (lightweight though)
  • 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)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions