AI.Stream.OpenAITransformer (AI SDK v0.0.1-rc.0)

View Source

Stream transformer for OpenAI-compatible streams.

This transformer handles the specific format of events emitted by the OpenAI Chat API and its compatible implementations, converting them to standardized AI.Stream.Event structs.

Features:

  • Converts raw events to standardized Event structs
  • Filters out unnecessary metadata chunks
  • Maintains proper order of text chunks