stream_struct 0.1.2 copy "stream_struct: ^0.1.2" to clipboard
stream_struct: ^0.1.2 copied to clipboard

Stream an LLM's structured output as it arrives: tolerant partial JSON parsing that fills in the typed object token by token. Provider-agnostic, you bring the token stream.

0.1.2 #

  • Docs: sharpen the pub.dev description to lead with the value and the terms people search.

0.1.1 #

  • Shorten the pubspec description so it fits pub.dev's 180-character guideline; no API or behaviour change.

0.1.0 #

  • Initial release.
  • parsePartialJson: tolerant decode of a truncated JSON buffer into the value it holds so far (closes open string values and containers, drops dangling keys, colons, and commas).
  • streamPartialJson / streamPartialJsonFrom: turn a delta stream into a stream of the growing value, skipping unparseable and unchanged frames.
  • streamPartial<T>: map growing objects into a typed value with a hand-written builder.
  • Provider delta adapters: openAiDelta, anthropicDelta, geminiDelta.

Planned for a later release: generated builders so streamPartial<T> needs no hand-written mapping.

0
likes
0
points
304
downloads

Publisher

verified publisherdeveloperyusuf.com

Weekly Downloads

Stream an LLM's structured output as it arrives: tolerant partial JSON parsing that fills in the typed object token by token. Provider-agnostic, you bring the token stream.

Repository (GitHub)
View/report issues

Topics

#llm #ai #json #streaming #structured-output

License

unknown (license)

Dependencies

meta

More

Packages that depend on stream_struct